enable.trait_defs.ui.kiva_font_editor module¶
-
class
enable.trait_defs.ui.kiva_font_editor.
KivaFontEditor
(*args, **traits)[source]¶ Bases:
traitsui.editor_factory.EditorFactory
Editor factory for KivaFontEditors
-
format_func
= Callable(str_font)¶ The default format func displays a description of the font.
-
high_resolution
= Bool(True)¶ Switch to turn off high resolution rendering if needed.
-
sample_text
= Str()¶ Alternative text to display instead of the font description.
-
-
class
enable.trait_defs.ui.kiva_font_editor.
ReadOnlyEditor
(parent, **traits)[source]¶ Bases:
enable.trait_defs.ui.editor_with_component.EditorWithLabelComponent
An Editor which displays a label using the font.
-
init
(parent)[source]¶ Create and initialize the underlying toolkit widget.
This method must be overriden by subclasses. Implementations must ensure that the
control
trait is set to an appropriate toolkit object.- Parameters
parent (toolkit control) – The parent toolkit object of the editor’s toolkit objects.
-
-
class
enable.trait_defs.ui.kiva_font_editor.
SimpleEditor
(parent, **traits)[source]¶ Bases:
enable.trait_defs.ui.kiva_font_editor.ReadOnlyEditor
An Editor which displays a label using the font, click for font dialog.
Button tool connected to the Label component.
Display a Pyface FontDialog when the button tool is clicked.
-
enable.trait_defs.ui.kiva_font_editor.
WEIGHTS
= {100: ' Thin', 200: ' Extra-light', 300: ' Light', 400: '', 500: ' Medium', 600: ' Semi-bold', 700: ' Bold', 800: ' Extra-bold', 900: ' Heavy', 1000: ' Extra-heavy'}¶ A mapping of Kiva weight constants to strings.