API Reference for Enthought Tool Suite 3.2.0
Trait definition for a wxPython-based font.
fh = TraitWXFont()
Mapping of strings to valid wxFont families
font_families = { Const('default') : Getattr(Name('wx'), 'DEFAULT'), Const('decorative') : Getattr(Name('wx'), 'DECORATIVE'), Const('roman') : Getattr(Name('wx'), 'ROMAN'), Const('script') : Getattr(Name('wx'), 'SCRIPT'), Const('swiss') : Getattr(Name('wx'), 'SWISS'), Const('modern') : Getattr(Name('wx'), 'MODERN') }
Strings to ignore in text representations of fonts
font_noise = [ 'pt', 'point', 'family' ]
Mapping of strings to wxFont styles
font_styles = { Const('slant') : Getattr(Name('wx'), 'SLANT'), Const('italic') : Getattr(Name('wx'), 'ITALIC') }
Mapping of strings wxFont weights
font_weights = { Const('light') : Getattr(Name('wx'), 'LIGHT'), Const('bold') : Getattr(Name('wx'), 'BOLD') }
WxFont = Trait(create_traitsfont('Arial 10'), fh, editor = get_font_editor)
Create a TraitFont object from a string description.
Converts a wx.Font into a string description of itself.
| Local name | Refers to |
|---|---|
| Trait | enthought.traits.traits.Trait |
| TraitError | enthought.traits.trait_errors.TraitError |
| TraitHandler | enthought.traits.trait_handlers.TraitHandler |
| wx | wx |
© Copyright 2002-2009 Enthought, Inc.