Exemple #1
0
def Font(*args, **metadata):
    """ Returns a trait whose value must be a GUI toolkit-specific font.

    .. deprecated:: 6.1.0
        ``Font`` trait in this package will be removed in the future. It is
        replaced by ``Font`` trait in TraitsUI package.
    """
    from traitsui.toolkit_traits import FontTrait

    return FontTrait(*args, **metadata)
Exemple #2
0
def TraitsUIFont(*args, **metadata):
    """ Returns a trait whose value must be a GUI toolkit-specific font.

    This is copied from the deprecated trait that is in traits.api.  It adds
    a deferred dependency on TraitsUI.

    This trait will be replaced by native Pyface font traits in Pyface 8.0.
    New code should not use this trait.
    """
    from traitsui.toolkit_traits import FontTrait

    return FontTrait(*args, **metadata)
Exemple #3
0
def Font(*args, **metadata):
    """ Returns a trait whose value must be a GUI toolkit-specific font.

    Description
    -----------
    For wxPython, the returned trait accepts any of the following:

    * a wx.Font instance
    * a wx.FontPtr instance
    * a string describing the font, including one or more of the font family,
      size, weight, style, and typeface name.

    Default Value
    -------------
    For wxPython, 'Arial 10'
    """
    from traitsui.toolkit_traits import FontTrait

    return FontTrait(*args, **metadata)