Panda3D
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
Public Member Functions | Public Attributes | List of all members
DirectOptionMenu Class Reference
Inheritance diagram for DirectOptionMenu:
DirectButton DirectFrame DirectGuiWidget DirectGuiBase

Public Member Functions

def __init__
 
def commandFunc
 
def get
 
def hidePopupMenu
 
def index
 
def selectHighlightedIndex
 
def set
 
def setItems
 
def showPopupMenu
 
- Public Member Functions inherited from DirectButton
def __init__
 
def commandFunc
 
def setClickSound
 
def setCommandButtons
 
def setRolloverSound
 
- Public Member Functions inherited from DirectFrame
def __init__
 
def destroy
 
def setGeom
 
def setImage
 
def setText
 
- Public Member Functions inherited from DirectGuiWidget
def __init__
 
def copyOptions
 
def destroy
 
def disableEdit
 
def editStart
 
def editStop
 
def enableEdit
 
def frameInitialiseFunc
 
def getBounds
 
def getCenter
 
def getFrameType
 
def getHeight
 
def getWidth
 
def guiDragTask
 
def guiScaleTask
 
def printConfig
 
def resetFrameSize
 
def setBorderUvWidth
 
def setBorderWidth
 
def setFrameColor
 
def setFrameSize
 
def setFrameTexture
 
def setFrameVisibleScale
 
def setProp
 
def setRelief
 
def setState
 
def taskName
 
def uniqueName
 
def updateFrameStyle
 
- Public Member Functions inherited from DirectGuiBase
def __init__
 
def __setitem__
 
def addoptions
 
def bind
 
def cget
 
def component
 
def components
 
def configure
 
def createcomponent
 
def defineoptions
 
def destroy
 
def destroycomponent
 
def hascomponent
 
def initialiseoptions
 
def isinitoption
 
def options
 
def postInitialiseFunc
 
def unbind
 

Public Attributes

 cancelFrame
 
 highlightedIndex
 
 initFrameSize
 
 maxHeight
 
 maxWidth
 
 maxX
 
 maxZ
 
 minX
 
 minZ
 
 popupMarker
 
 popupMenu
 
 selectedIndex
 
- Public Attributes inherited from DirectGuiWidget
 bounds
 
 frameStyle
 
 guiId
 
 guiItem
 
 ll
 
 stateNodePath
 
 ur
 
- Public Attributes inherited from DirectGuiBase
 fInit
 
 guiId
 
 postInitialiseFuncList
 

Additional Inherited Members

- Static Public Attributes inherited from DirectFrame
tuple DefDynGroups = ('text', 'geom', 'image')
 
- Static Public Attributes inherited from DirectGuiWidget
float gridSpacing = 0.05
 
dictionary guiDict = {}
 
tuple guiEdit = get_config_showbase()
 
 inactiveInitState = DGG.NORMAL
 
int snapToGrid = 0
 

Detailed Description

DirectOptionMenu(parent) - Create a DirectButton which pops up a
menu which can be used to select from a list of items.
Execute button command (passing the selected item through) if defined
To cancel the popup menu click anywhere on the screen outside of the
popup menu.  No command is executed in this case.

Constructor & Destructor Documentation

def __init__ (   self,
  parent = None,
  kw 
)

Member Function Documentation

def commandFunc (   self,
  event 
)
Override popup menu button's command func
Command is executed in response to selecting menu items
def get (   self)
Get currently selected item 
def hidePopupMenu (   self,
  event = None 
)
Put away popup and cancel frame 
def index (   self,
  index 
)
def selectHighlightedIndex (   self,
  event = None 
)
Check to see if item is highlighted (by cursor being within
that item).  If so, selected it.  If not, do nothing
def set (   self,
  index,
  fCommand = 1 
)
def setItems (   self)
self['items'] = itemList
Create new popup menu to reflect specified set of items
def showPopupMenu (   self,
  event = None 
)
Make popup visible and try to position it just to right of
mouse click with currently selected item aligned with button.
Adjust popup position if default position puts it outside of
visible screen region

Member Data Documentation

cancelFrame
highlightedIndex
initFrameSize
maxHeight
maxWidth
maxX
maxZ
minX
minZ
popupMarker
popupMenu
selectedIndex