pyui.theme
index
c:\ninja\projects\pyui\pyui\theme.py

Pyui Themes.
Themes are a method of customizing the drawing of widgets in a pyui GUI.
 
This modules keeps NO state for the drable objects - it just draws them on demand
from the widgets themselves which hold all the state.
 
The constants for the theme objects live in pyui/locals.py

 
Modules
            
pyui.locals
pyui
 
Classes
            
dataTheme
 
class dataTheme
      Theme objects (like buttons) are drawn through methods for each type of widget.
It returns the rect that the object draw fit into.
 
The rect passed in should always be in window coordinates.
 
Each theme has a 3 "BACK" fills.
 
   Methods defined here:
__init__(self, renderer, w, h)
draw3DRect(self, rect, color, reverse)
Draw a 3D rectangle to the screen or a surface. Defaults to the screen.
(internal)
drawBack1(self, rect)
drawBack2(self, rect)
drawBack3(self, rect)
drawButton(self, rect, title, hasFocus, status, enabled)
Options are:  button title and the up/down status.
status == 0: normal
status == 1: rollover
status == 2: down
drawCheckBox(self, rect, text, checkState)
drawEdit(self, rect, text, hasFocus, caretPos, selectPos)
drawFrame(self, rect, title)
Draw frame objects.
Frame objects are complex multi-part widgets. In order to allow the theme some flexibility of how to
position and draw various interactive frame elements, the drawFrame() method returns a list of hit
regions. Each element is a tuple consisting of a (region Id, rect). Region IDs are defined in locals.py.
The hit list is in top to bottom order for easier iteration.
drawGradient(self, rect, vertical, c1, c2)
drawImageButton(self, rect, filename, title, hasFocus, status)
drawLabel(self, rect, title, color)
drawListBoxItem(self, rect, title, selected, color)
drawMenu(self, rect)
drawMenuBar(self, rect)
drawMenuBarItem(self, rect, title, selected)
drawMenuItem(self, rect, title, selected, icon=None)
drawOutlineRect(self, rect, color, thick=1)
drawScrollBar(self, rect)
drawScrollButtonDown(self, rect)
drawScrollButtonUp(self, rect)
drawSliderBar(self, rect, range, position, BARWIDTH=8)
drawSplitter(self, rect)
drawTabHeader(self, rect)
drawTabItem(self, rect, title, active)
drawToolTip(self, text, rect)
getBgColor(self)
getColorKey(self)
getFgColor(self)
getFrameBorderBottom(self)
getFrameBorderLeft(self)
getFrameBorderRight(self)
getFrameBorderTop(self)
### Information about the theme..
getTabsHeight(self)
getThemeConstant(self, constantID)
Gets a theme constant.
setArrowCursor(self)
### mouse cursor functions
setButtonCursor(self)
setResizeCursor(self)
setWaitCursor(self)
shadeBorder(self, rect, d, reverse)
Draw a 3D rectangle to the screen or a surface. Defaults to the screen.
(internal)

Data and non-method functions defined here:
__doc__ = 'Theme objects (like buttons) are drawn through m...nates.\n\n Each theme has a 3 "BACK" fills.\n '
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'pyui.theme'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
emptyRect = [0, 0, 0, 0]
list() -> new list
list(sequence) -> new list initialized from sequence's items
 
Data
             __file__ = r'.\pyui\theme.pyc'
__name__ = 'pyui.theme'