Panda3D
Loading...
Searching...
No Matches
DirectScrolledList Class Reference
Inheritance diagram for DirectScrolledList:
DirectFrame DirectGuiWidget DirectGuiBase DirectObject

Public Member Functions

 __init__ (self, parent=None, **kw)
 
 addItem (self, item, refresh=1)
 
 destroy (self)
 
 getItemIndexForItemID (self, itemID)
 
 getSelectedIndex (self)
 
 getSelectedText (self)
 
 makeAllItems (self)
 
 recordMaxHeight (self)
 
 refresh (self)
 
 removeAllItems (self, refresh=1)
 
 removeAndDestroyAllItems (self, refresh=1)
 
 removeAndDestroyItem (self, item, refresh=1)
 
 removeItem (self, item, refresh=1)
 
 scrollBy (self, delta)
 
 scrollTo (self, index, centered=0)
 
 scrollToItemID (self, itemID, centered=0)
 
 selectListItem (self, item)
 
 setDecButtonCallback (self)
 
 setForceHeight (self)
 
 setIncButtonCallback (self)
 
 setNumItemsVisible (self)
 
 setScrollSpeed (self)
 
- Public Member Functions inherited from DirectFrame
 __init__ (self, parent=None, **kw)
 
 clearGeom (self)
 
 clearImage (self)
 
 clearText (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

 currentSelected = item
 
 decButton
 
 incButton
 
int index = 0
 
 itemFrame
 
float maxHeight = self.__forceHeight
 
int nextItemID = 10
 
- 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 = []
 

Static Public Attributes

 notify = DirectNotifyGlobal.directNotify.newCategory("DirectScrolledList")
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from DirectObject
 _addTask (self, task)
 
 _clearTask (self, task)
 
- Protected Attributes inherited from DirectGuiBase
dict _constructorKeywords = tmp
 
tuple _dynamicGroups = ()
 
dict _optionInfo = {}
 
- Protected Attributes inherited from DirectObject
dict _taskList = {}
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
parent = None,
** kw )

Member Function Documentation

◆ addItem()

addItem ( self,
item,
refresh = 1 )
Add this string and extraArg to the list

◆ destroy()

destroy ( self)

Reimplemented from DirectFrame.

◆ getItemIndexForItemID()

getItemIndexForItemID ( self,
itemID )

◆ getSelectedIndex()

getSelectedIndex ( self)

◆ getSelectedText()

getSelectedText ( self)

◆ makeAllItems()

makeAllItems ( self)

◆ recordMaxHeight()

recordMaxHeight ( self)

◆ refresh()

refresh ( self)
Update the list - useful when adding or deleting items
or changing properties that would affect the scrolling

◆ removeAllItems()

removeAllItems ( self,
refresh = 1 )
Remove this item from the panel
Warning 2006_10_19 tested only in the trolley metagame

◆ removeAndDestroyAllItems()

removeAndDestroyAllItems ( self,
refresh = 1 )
Remove and destroy all items from the panel.
Warning 2006_10_19 tested only in the trolley metagame

◆ removeAndDestroyItem()

removeAndDestroyItem ( self,
item,
refresh = 1 )
Remove and destroy this item from the panel.

◆ removeItem()

removeItem ( self,
item,
refresh = 1 )
Remove this item from the panel

◆ scrollBy()

scrollBy ( self,
delta )

◆ scrollTo()

scrollTo ( self,
index,
centered = 0 )
 scrolls list so selected index is at top, or centered in box

◆ scrollToItemID()

scrollToItemID ( self,
itemID,
centered = 0 )

◆ selectListItem()

selectListItem ( self,
item )

◆ setDecButtonCallback()

setDecButtonCallback ( self)

◆ setForceHeight()

setForceHeight ( self)

◆ setIncButtonCallback()

setIncButtonCallback ( self)

◆ setNumItemsVisible()

setNumItemsVisible ( self)

◆ setScrollSpeed()

setScrollSpeed ( self)

Member Data Documentation

◆ currentSelected

currentSelected = item

◆ decButton

decButton
Initial value:
= self.createcomponent("decButton", (), None,
DirectButton, (self,),
)

◆ incButton

incButton
Initial value:
= self.createcomponent("incButton", (), None,
DirectButton, (self,),
)

◆ index

index = 0

◆ itemFrame

itemFrame
Initial value:
= self.createcomponent("itemFrame", (), None,
DirectFrame, (self,),
)

◆ maxHeight

maxHeight = self.__forceHeight

◆ nextItemID

int nextItemID = 10

◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory("DirectScrolledList")
static