Panda3D
Public Member Functions | Public Attributes | Static Public Attributes

OkDialog Class Reference

Inheritance diagram for OkDialog:
DirectDialog DirectFrame DirectGuiWidget DirectGuiBase

List of all members.

Public Member Functions

def __init__
def __setitem__
def addoptions
def bind
def buttonCommand
def cget
def cleanup
def component
def components
def configure
def configureDialog
def copyOptions
def createcomponent
def defineoptions
def destroy
def destroycomponent
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 hascomponent
def hide
def initialiseoptions
def isinitoption
def options
def postInitialiseFunc
def printConfig
def resetFrameSize
def setBorderUvWidth
def setBorderWidth
def setFrameColor
def setFrameSize
def setFrameTexture
def setFrameVisibleScale
def setGeom
def setImage
def setMessage
def setProp
def setRelief
def setState
def setText
def show
def taskName
def unbind
def uniqueName
def updateFrameStyle

Public Attributes

 bounds
 buttonList
 fInit
 frameStyle
 guiId
 guiItem
 ll
 numButtons
 postInitialiseFuncList
 stateNodePath
 ur

Static Public Attributes

dictionary AllDialogs = {}
tuple DefDynGroups = ('text', 'geom', 'image')
float gridSpacing = 0.05
dictionary guiDict = {}
tuple guiEdit = config.GetBool('direct-gui-edit', 0)
 inactiveInitState = DGG.NORMAL
int PanelIndex = 0
int snapToGrid = 0

Constructor & Destructor Documentation

def __init__ (   self,
  parent = None,
  kw 
)
DirectDialog(kw)

Creates a popup dialog to alert and/or interact with user.
Some of the main keywords that can be used to customize the dialog:
    Keyword              Definition
    -------              ----------
    text                 Text message/query displayed to user
    geom                 Geometry to be displayed in dialog
    buttonTextList       List of text to show on each button
    buttonGeomList       List of geometry to show on each button
    buttonImageList      List of images to show on each button
    buttonValueList      List of values sent to dialog command for
                 each button.  If value is [] then the
                 ordinal rank of the button is used as
                 its value
    buttonHotKeyList     List of hotkeys to bind to each button.
                 Typing hotkey is equivalent to pressing
                 the corresponding button.
    suppressKeys         Set to true if you wish to suppress keys
                 (i.e. Dialog eats key event), false if
                 you wish Dialog to pass along key event
    buttonSize           4-tuple used to specify custom size for
                 each button (to make bigger then geom/text
                 for example)
    pad                  Space between border and interior graphics
    topPad               Extra space added above text/geom/image
    midPad               Extra space added between text/buttons
    sidePad              Extra space added to either side of
                 text/buttons
    buttonPadSF          Scale factor used to expand/contract
                 button horizontal spacing
    command              Callback command used when a button is
                 pressed.  Value supplied to command
                 depends on values in buttonValueList

 Note: Number of buttons on the dialog depends upon the maximum
       length of any button[Text|Geom|Image|Value]List specified.
       Values of None are substituted for lists that are shorter
       than the max length
 

Reimplemented from DirectDialog.


Member Function Documentation

def __setitem__ (   self,
  key,
  value 
) [inherited]
def addoptions (   self,
  optionDefs,
  optionkeywords 
) [inherited]
addoptions(optionDefs) - add option def to option info 
def bind (   self,
  event,
  command,
  extraArgs = [] 
) [inherited]
Bind the command (which should expect one arg) to the specified
event (such as ENTER, EXIT, B1PRESS, B1CLICK, etc.)
See DirectGuiGlobals for possible events
def buttonCommand (   self,
  value,
  event = None 
) [inherited]
def cget (   self,
  option 
) [inherited]
Get current configuration setting for this option
def cleanup (   self) [inherited]
def component (   self,
  name 
) [inherited]
def components (   self) [inherited]
def configure (   self,
  option = None,
  kw 
) [inherited]
configure(option = None)
Query or configure the megawidget options.
def configureDialog (   self) [inherited]
def copyOptions (   self,
  other 
) [inherited]
Copy other's options into our self so we look and feel like other
def createcomponent (   self,
  componentName,
  componentAliases,
  componentGroup,
  widgetClass,
  widgetArgs,
  kw 
) [inherited]
Create a component (during construction or later) for this widget.
def defineoptions (   self,
  keywords,
  optionDefs,
  dynamicGroups = () 
) [inherited]
defineoptions(keywords, optionDefs, dynamicGroups = {}) 
def destroy (   self) [inherited]

Reimplemented from DirectFrame.

def destroycomponent (   self,
  name 
) [inherited]
def disableEdit (   self) [inherited]
def editStart (   self,
  event 
) [inherited]
def editStop (   self,
  event 
) [inherited]
def enableEdit (   self) [inherited]
def frameInitialiseFunc (   self) [inherited]
def getBounds (   self,
  state = 0 
) [inherited]

Reimplemented in DirectEntry.

def getCenter (   self) [inherited]
def getFrameType (   self,
  state = 0 
) [inherited]
def getHeight (   self) [inherited]
def getWidth (   self) [inherited]
def guiDragTask (   self,
  state 
) [inherited]
def guiScaleTask (   self,
  state 
) [inherited]
def hascomponent (   self,
  component 
) [inherited]
def hide (   self) [inherited]
def initialiseoptions (   self,
  myClass 
) [inherited]
Call all initialisation functions to initialize widget
options to default of keyword value
def isinitoption (   self,
  option 
) [inherited]
Is this opition one that can only be specified at construction?
def options (   self) [inherited]
Print out a list of available widget options.
Does not include subcomponent options.
def postInitialiseFunc (   self) [inherited]
def printConfig (   self,
  indent = 0 
) [inherited]
def resetFrameSize (   self) [inherited]

Reimplemented in DirectCheckButton, and DirectRadioButton.

def setBorderUvWidth (   self) [inherited]
def setBorderWidth (   self) [inherited]
def setFrameColor (   self) [inherited]
def setFrameSize (   self,
  fClearFrame = 0 
) [inherited]

Reimplemented in DirectCheckButton, and DirectRadioButton.

def setFrameTexture (   self) [inherited]
def setFrameVisibleScale (   self) [inherited]
def setGeom (   self) [inherited]
def setImage (   self) [inherited]
def setMessage (   self,
  message 
) [inherited]
def setProp (   self,
  propString,
  value 
) [inherited]
Allows you to set a property like frame['text'] = 'Joe' in
a function instead of an assignment.
This is useful for setting properties inside function intervals
where must input a function and extraArgs, not an assignment.
def setRelief (   self,
  fSetStyle = 1 
) [inherited]
def setState (   self) [inherited]
def setText (   self) [inherited]
def show (   self) [inherited]
def taskName (   self,
  idString 
) [inherited]
def unbind (   self,
  event 
) [inherited]
Unbind the specified event
def uniqueName (   self,
  idString 
) [inherited]
def updateFrameStyle (   self) [inherited]

Member Data Documentation

dictionary AllDialogs = {} [static, inherited]
bounds [inherited]
buttonList [inherited]
tuple DefDynGroups = ('text', 'geom', 'image') [static, inherited]
fInit [inherited]
frameStyle [inherited]
float gridSpacing = 0.05 [static, inherited]
dictionary guiDict = {} [static, inherited]
tuple guiEdit = config.GetBool('direct-gui-edit', 0) [static, inherited]
guiId [inherited]

Reimplemented from DirectGuiBase.

guiItem [inherited]
inactiveInitState = DGG.NORMAL [static, inherited]
ll [inherited]

Reimplemented in DirectEntry.

numButtons [inherited]
int PanelIndex = 0 [static, inherited]
int snapToGrid = 0 [static, inherited]
stateNodePath [inherited]
ur [inherited]

Reimplemented in DirectEntry.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties