Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
•All Data Structures Namespaces Files Functions Variables
GUIRadioButton Class Reference
Inheritance diagram for GUIRadioButton:
GUICheckButton GUIButton GUIStaticImage GUIElement

Public Member Functions

def __init__
 
def onChange
 
def onClick
 
def groupUncheck
 
- Public Member Functions inherited from GUICheckButton
def __init__
 
def setNeutralState
 
def isChecked
 
def setChecked
 
def check
 
def uncheck
 
def toggleChecked
 
def onClick
 
def onChange
 
def onMessage
 
- Public Member Functions inherited from GUIButton
def __init__
 
def onMouseUp
 
def onMouseDown
 
def onMouseEnter
 
def onMouseLeave
 
def onMouseMove
 
def onClick
 
def draw
 
def setNeutralState
 
def undraw
 
def hide
 
def show
 
def redraw
 
def setCaption
 
def setState
 
def getState
 
def hasState
 
def isEnabled
 
def enable
 
def disable
 
def setEnable
 
def getGroup
 
def setGroup
 
def onMessage
 
- Public Member Functions inherited from GUIStaticImage
def __init__
 
def spriteIsValid
 
def draw
 
def undraw
 
def redraw
 
def setSprite
 
- Public Member Functions inherited from GUIElement
def __init__
 
def __str__
 
def __repr__
 
def show
 
def hide
 
def notifyNeedRedraw
 
def draw
 
def undraw
 
def redraw
 
def onMessage
 
def onClick
 
def onShow
 
def onHide
 
def onDraw
 
def onUndraw
 
def onRedraw
 
def focus
 
def setModal
 
def isInteractive
 

Static Public Member Functions

def staticGroupUncheck
 

Data Fields

 onChange_fn
 
 value
 
- Data Fields inherited from GUICheckButton
 checked
 
 group
 
 index
 
- Data Fields inherited from GUIButton
 sprites
 
 hotspot
 
 linkdesc
 
 linkstate
 
 state
 
 group
 
 enabled
 
 clickHandler
 
 textOverlay
 
 textcolor
 
 textbgcolor
 
 textfontsize
 
 pythonstr
 
 visible
 
- Data Fields inherited from GUIStaticImage
 sprite
 
 index
 
 spritestate
 
 redrawPreservesZ
 
 visible
 
- Data Fields inherited from GUIElement
 room
 
 owner
 
 visible
 
 redrawPreservesZ
 
 id
 

Detailed Description

Definition at line 1455 of file GUI.py.

Constructor & Destructor Documentation

def __init__ (   self,
  room,
  linkdesc,
  index,
  spritefiles,
  hotspot,
  radiogroup,
  value = None,
  onChange = (lambda group,newval,
  caller 
)

Definition at line 1456 of file GUI.py.

References GUIButton.setGroup(), and GUICheckButton.uncheck().

1457  def __init__(self,room,linkdesc,index,spritefiles,hotspot,radiogroup,value=None,onChange=(lambda group,newval,caller:None),**kwarg):
1458  """ Initializes the button (but does not draw it; use drawobjs()) """
1459  """ spritefiles: a dictionary, mapping states to sprites """
1460  """ 'checked' : normal, enabled and checked state """
1461  """ 'unchecked' : normal, enabled and unchecked state """
1462  """ 'disabled' : disabled (grayed) state """
1463  """ 'hot' : hot state (mouse over) """
1464  """ 'down' : down state (mouse clicking) """
1465  """ '*' : fallback state """
1466  """ Each state in spriteifiles must be a tuple of the form: """
1467  """ ( path , location ) """
1468  """ ( ) - empty, for "no change" """
1469  """ with 'location' being a GUIRect """
1470  """ NOTE FOR SUBLCASSERS: """
1471  """ onChange() may and will be issued for ANY changed element """
1472  """ that means that it would be wise to only perform an action """
1473  """ if self.isChecked() - also, be sure to call the base """
1474  """ implementation, or the radio button won't work properly. """
1475 
1476 
1477  GUICheckButton.__init__(self,room,linkdesc,index,spritefiles,hotspot,**kwarg)
1478  self.setGroup(radiogroup)
1479  self.uncheck()
1480  self.onChange_fn = onChange
1481  self.value = value

Member Function Documentation

def groupUncheck (   self)

Definition at line 1492 of file GUI.py.

References GUIButton.getGroup(), and GUIElement.room.

1493  def groupUncheck(self):
1494  GUIRadioButton.staticGroupUncheck(self.room,self.getGroup())
def onChange (   self,
  params 
)

Definition at line 1482 of file GUI.py.

References _Dummy.group, GUIButton.group, DialogBox.Item.id, DialogBox.id, GUIElement.id, GUICheckButton.isChecked(), GUIRadioButton.onChange_fn, SaveVariableCondition.value, _Stop.value, ErrorDuringImport.value, Boolean.value, DateTime.value, MiniFieldStorage.value, SetSaveVariable.value, Morsel.value, and GUIRadioButton.value.

1483  def onChange(self,params):
1484  if self.isChecked():
1485  GUIRootSingleton.broadcastRoomMessage(self.room.getIndex(),'uncheck', { 'group':self.group,'exclude':self.id } )
1486  self.onChange_fn(self.group,self.value,self)
def onClick (   self,
  params 
)

Definition at line 1487 of file GUI.py.

References GUICheckButton.isChecked().

1488  def onClick(self,params):
1489  # radio buttons can't be unchecked; another button in the group has to be clicked instead
1490  if (not self.isChecked()):
1491  GUICheckButton.onClick(self,params)
def staticGroupUncheck (   room,
  group 
)
static

Definition at line 1496 of file GUI.py.

1497  def staticGroupUncheck(room,group):
1498  GUIRootSingleton.broadcastRoomMessage(room.getIndex(),'uncheck', { 'group':group } )
1499 
1500 
1501 """----------------------------------------------------------------"""
1502 """ """
1503 """ GUISimpleListPicker - a simple (featureless) list picker """
1504 """ """
"""----------------------------------------------------------------"""

Field Documentation

onChange_fn

Definition at line 1479 of file GUI.py.

value

Definition at line 1480 of file GUI.py.


The documentation for this class was generated from the following file: