Package peppy :: Package lib :: Module userparams :: Class FontParam
[frames] | no frames]

Class FontParam

      object --+        
               |        
debug.debugmixin --+    
                   |    
               Param --+
                       |
                      FontParam

Font parameter that pops up a font dialog.

The wx.Font class is used as the value.

Instance Methods
 
getCtrl(self, parent, initial=None)
Create and editing control.
 
textToValue(self, text)
Convert the user's config text to the type expected by the python code.
 
valueToText(self, font)
Convert the user value to a string suitable to be written to the config file.
 
setValue(self, ctrl, value)
Populate the control given the user value.
 
getValue(self, ctrl)
Get the user value from the control.

Inherited from Param: OnCallback, __init__, __str__, getLabel, isSettable, isVisible, processCallback, setCallback, setInitialState, setValueWithoutCallback

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Methods

Inherited from debug.debugmixin: dprint

Class Variables

Inherited from Param: callback_event, default

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

getCtrl(self, parent, initial=None)

 

Create and editing control.

Given the parent window, create a user interface element to edit the param.

Overrides: Param.getCtrl
(inherited documentation)

textToValue(self, text)

 

Convert the user's config text to the type expected by the python code.

Subclasses should return the type expected by the user code.

Overrides: Param.textToValue
(inherited documentation)

valueToText(self, font)

 

Convert the user value to a string suitable to be written to the config file.

Subclasses should convert the value to a string that is acceptable to textToValue.

Overrides: Param.valueToText
(inherited documentation)

setValue(self, ctrl, value)

 

Populate the control given the user value.

If any conversion is needed to show the user value in the control, do it here.

Overrides: Param.setValue
(inherited documentation)

getValue(self, ctrl)

 

Get the user value from the control.

If the control doesn't automatically return a value of the correct type, convert it here.

Overrides: Param.getValue
(inherited documentation)