Fun with PWM  0.32
TkBlock.TkBlock Class Reference

Base class for objects that use part of the TkInter window. More...

Inheritance diagram for TkBlock.TkBlock:
Footer.Footer Logo.Logo TkBlock.TkPage TkConsole.TkConsole TkJoystickManager.TkJoystick TkJoystickManager.TkJoystickAxis TkJoystickManager.TkJoystickButton TkJoystickManager.TkJoystickDualAxis TkNotifier.TkNotifier TkPreFlightManager.TkPreFlightLogo TkPreFlightManager.TkPreFlightScreens TkResourceManager.TkResourceManager TkServoGrid.TkServoGrid

Public Member Functions

def __init__ (self, parent, gui, options)
 
def setup (self)
 
def initWidget (self)
 
def addMenu (self, menu, label="-")
 
def open (self)
 
def close (self)
 
def genericView (self, parent, value)
 
def numberView (self, parent, value)
 
def stringView (self, parent, value)
 
def dictView (self, parent, value)
 
def iterView (self, parent, value)
 

Public Attributes

 gui
 
 parent
 
 height
 
 variables
 
 notifier
 
 colours
 
 fonts
 
 images
 
 wrap
 
 canvas
 
 widget
 
 yScroller
 
 xScroller
 
 widgets
 
 gridrow
 

Detailed Description

Base class for objects that use part of the TkInter window.

Constructor & Destructor Documentation

§ __init__()

def TkBlock.TkBlock.__init__ (   self,
  parent,
  gui,
  options 
)
TkBlock is a base class. Any class containing Tkinter objects should extend it.
- initializes common attributes
- creates a wrapped widget which applies the settings from the theme profile
- provides generic views for data
- provides open and close functions

@param parent
@param gui
@param options

Member Function Documentation

§ addMenu()

def TkBlock.TkBlock.addMenu (   self,
  menu,
  label = "-" 
)
Convenience function to make use of a menu index if one is supplied by the profile

§ close()

def TkBlock.TkBlock.close (   self)
Calling close causes this block to be hidden within Tkinter

§ dictView()

def TkBlock.TkBlock.dictView (   self,
  parent,
  value 
)
Formats a dict for display within Tkinter

@param parent
@param value

@return Tkinter.Frame

§ genericView()

def TkBlock.TkBlock.genericView (   self,
  parent,
  value 
)
Within a view method, this can be used to display any variable
    supports: int, float, long, str, unicode, dict and list

@param parent
@param value

@return Tkinter.Frame

§ initWidget()

def TkBlock.TkBlock.initWidget (   self)
Initializes the common Tkinter objects required to be displayed

§ iterView()

def TkBlock.TkBlock.iterView (   self,
  parent,
  value 
)
Formats a list for display within Tkinter

@param parent
@param value

@return Tkinter.Frame

§ numberView()

def TkBlock.TkBlock.numberView (   self,
  parent,
  value 
)
Formats a number for display within Tkinter

@param parent
@param value

@return Tkinter.Label

§ open()

def TkBlock.TkBlock.open (   self)
Calling open causes this block to be displayed within Tkinter
normally called at the top of a view method 

§ setup()

def TkBlock.TkBlock.setup (   self)
override this for menu setup

§ stringView()

def TkBlock.TkBlock.stringView (   self,
  parent,
  value 
)
Formats a string for display within Tkinter

@param parent
@param value

@return Tkinter.Label

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