|
Panda3D
|
Public Member Functions | |
| __init__ (self, parent=None, **kw) | |
| commandFunc (self, event) | |
| get (self) | |
| hidePopupMenu (self, event=None) | |
| index (self, index) | |
| selectHighlightedIndex (self, event=None) | |
| set (self, index, fCommand=1) | |
| setItems (self) | |
| showPopupMenu (self, event=None) | |
Public Member Functions inherited from DirectButton | |
| __init__ (self, parent=None, **kw) | |
| setClickSound (self) | |
| setCommandButtons (self) | |
| setRolloverSound (self) | |
Public Member Functions inherited from DirectFrame | |
| __init__ (self, parent=None, **kw) | |
| clearGeom (self) | |
| clearImage (self) | |
| clearText (self) | |
| destroy (self) | |
| setGeom (self, geom=None) | |
| setImage (self, image=None) | |
| setText (self, text=None) | |
Public Member Functions inherited from DirectGuiWidget | |
| __init__ (self, parent=None, **kw) | |
| copyOptions (self, other) | |
| disableEdit (self) | |
| editStart (self, event) | |
| editStop (self, event) | |
| enableEdit (self) | |
| frameInitialiseFunc (self) | |
| getBounds (self, state=0) | |
| getCenter (self) | |
| getFrameType (self, state=0) | |
| getHeight (self) | |
| getWidth (self) | |
| guiDragTask (self, state) | |
| guiScaleTask (self, state) | |
| printConfig (self, indent=0) | |
| resetFrameSize (self) | |
| setBorderUvWidth (self) | |
| setBorderWidth (self) | |
| setFrameColor (self) | |
| setFrameSize (self, fClearFrame=0) | |
| setFrameTexture (self) | |
| setFrameVisibleScale (self) | |
| setProp (self, propString, value) | |
| setRelief (self, fSetStyle=1) | |
| setState (self) | |
| taskName (self, idString) | |
| uniqueName (self, idString) | |
| updateFrameStyle (self) | |
Public Member Functions inherited from DirectGuiBase | |
| __init__ (self) | |
| __setitem__ (self, key, value) | |
| addoptions (self, optionDefs, optionkeywords) | |
| bind (self, event, command, extraArgs=[]) | |
| cget (self, option) | |
| component (self, name) | |
| components (self) | |
| configure (self, option=None, **kw) | |
| createcomponent (self, componentName, componentAliases, componentGroup, widgetClass, *widgetArgs, **kw) | |
| defineoptions (self, keywords, optionDefs, dynamicGroups=()) | |
| destroycomponent (self, name) | |
| hascomponent (self, component) | |
| initialiseoptions (self, myClass) | |
| isinitoption (self, option) | |
| options (self) | |
| postInitialiseFunc (self) | |
| unbind (self, event) | |
Public Member Functions inherited from DirectObject | |
| __init__ (self) | |
| accept (self, event, method, extraArgs=[]) | |
| acceptOnce (self, event, method, extraArgs=[]) | |
| addTask (self, *args, **kwargs) | |
| detectLeaks (self) | |
| doMethodLater (self, *args, **kwargs) | |
| getAllAccepting (self) | |
| ignore (self, event) | |
| ignoreAll (self) | |
| isAccepting (self, event) | |
| isIgnoring (self, event) | |
| removeAllTasks (self) | |
| removeTask (self, taskOrName) | |
Public Attributes | |
| cancelFrame | |
| hidePopupMenu | |
| highlightedIndex = None | |
| initFrameSize = self['frameSize'] | |
| initPopupMarkerPos = self['popupMarker_pos'] | |
| maxHeight = self.maxZ - self.minZ | |
| maxWidth = self.maxX - self.minX | |
| maxX = None: | |
| maxZ = None: | |
| minX = None | |
| minZ = None: | |
| popupMarker | |
| popupMenu = None | |
| selectedIndex = None | |
| selectHighlightedIndex | |
| showPopupMenu | |
Public Attributes inherited from DirectGuiWidget | |
| list | bounds = self['frameSize'] |
| editStart | |
| editStop | |
| ll | |
| printConfig | |
| stateNodePath = self.guiDict.get(parts[-1]) | |
| ur | |
Public Attributes inherited from DirectGuiBase | |
| int | fInit = 1 |
| str | guiId = 'guiObject' |
| list | postInitialiseFuncList = [] |
Protected Member Functions | |
| _highlightItem (self, item, index) | |
| _unhighlightItem (self, item, frameColor) | |
Protected Member Functions inherited from DirectObject | |
| _addTask (self, task) | |
| _clearTask (self, task) | |
Protected Attributes | |
| tuple | _prevItemTextScale = kw['item_text_scale'] |
Protected Attributes inherited from DirectGuiBase | |
| dict | _constructorKeywords = tmp |
| tuple | _dynamicGroups = () |
| dict | _optionInfo = {} |
Protected Attributes inherited from DirectObject | |
| dict | _taskList = {} |
Additional Inherited Members | |
Static Public Attributes inherited from DirectFrame | |
| tuple | DefDynGroups = ('text', 'geom', 'image') |
Static Public Attributes inherited from DirectGuiWidget | |
| float | gridSpacing = 0.05 |
| dict | guiDict = {} |
| guiEdit = ShowBaseGlobal.config.GetBool('direct-gui-edit', False) | |
| inactiveInitState = DGG.NORMAL | |
| int | snapToGrid = 0 |
Static Public Attributes inherited from DirectObject | |
| accept_once = acceptOnce | |
| add_task = addTask | |
| detect_leaks = detectLeaks | |
| do_method_later = doMethodLater | |
| get_all_accepting = getAllAccepting | |
| ignore_all = ignoreAll | |
| is_accepting = isAccepting | |
| is_ignoring = isIgnoring | |
| remove_all_tasks = removeAllTasks | |
| remove_task = removeTask | |
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.
| __init__ | ( | self, | |
| parent = None, | |||
| ** | kw ) |
|
protected |
Set frame color of highlighted item, record index
|
protected |
Clear frame color, clear highlightedIndex
| commandFunc | ( | self, | |
| event ) |
Override popup menu button's command func Command is executed in response to selecting menu items
Reimplemented from DirectButton.
| get | ( | self | ) |
Get currently selected item
| hidePopupMenu | ( | self, | |
| event = None ) |
Put away popup and cancel frame
| index | ( | self, | |
| index ) |
| 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
| set | ( | self, | |
| index, | |||
| fCommand = 1 ) |
| setItems | ( | self | ) |
self['items'] = itemList Create new popup menu to reflect specified set of items
| 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
|
protected |
| cancelFrame |
| hidePopupMenu |
| highlightedIndex = None |
| initFrameSize = self['frameSize'] |
| initPopupMarkerPos = self['popupMarker_pos'] |
| maxHeight = self.maxZ - self.minZ |
| maxWidth = self.maxX - self.minX |
| maxX = None: |
| maxZ = None: |
| minX = None |
| minZ = None: |
| popupMarker |
| popupMenu = None |
| selectedIndex = None |
| selectHighlightedIndex |
| showPopupMenu |