Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

wxFontPickerCtrl (3erl)

Name

wxFontPickerCtrl - Functions for wxFontPickerCtrl class

Synopsis

Please see following description for synopsis

Description

wxFontPickerCtrl(3)        Erlang Module Definition        wxFontPickerCtrl(3)



NAME
       wxFontPickerCtrl - Functions for wxFontPickerCtrl class

DESCRIPTION
       This  control allows the user to select a font. The generic implementa-
       tion is a button which brings up a wxFontDialog  when  clicked.  Native
       implementation  may  differ  but this is usually a (small) widget which
       give access to  the  font-chooser  dialog.  It  is  only  available  if
       wxUSE_FONTPICKERCTRL is set to 1 (the default).

       Styles

       This class supports the following styles:

       See: wxFontDialog, wxFontPickerEvent

       This class is derived (and can use functions) from: wxPickerBase wxCon-
       trol wxWindow wxEvtHandler

       wxWidgets docs: wxFontPickerCtrl

EVENTS
       Event types emitted from this class: command_fontpicker_changed

DATA TYPES
       wxFontPickerCtrl() = wx:wx_object()

EXPORTS
       new() -> wxFontPickerCtrl()

       new(Parent, Id) -> wxFontPickerCtrl()

              Types:

                 Parent = wxWindow:wxWindow()
                 Id = integer()

       new(Parent, Id, Options :: [Option]) -> wxFontPickerCtrl()

              Types:

                 Parent = wxWindow:wxWindow()
                 Id = integer()
                 Option =
                     {initial, wxFont:wxFont()} |
                     {pos, {X :: integer(), Y :: integer()}} |
                     {size, {W :: integer(), H :: integer()}} |
                     {style, integer()} |
                     {validator, wx:wx_object()}

              Initializes the object and calls create/4 with all  the  parame-
              ters.

       create(This, Parent, Id) -> boolean()

              Types:

                 This = wxFontPickerCtrl()
                 Parent = wxWindow:wxWindow()
                 Id = integer()

       create(This, Parent, Id, Options :: [Option]) -> boolean()

              Types:

                 This = wxFontPickerCtrl()
                 Parent = wxWindow:wxWindow()
                 Id = integer()
                 Option =
                     {initial, wxFont:wxFont()} |
                     {pos, {X :: integer(), Y :: integer()}} |
                     {size, {W :: integer(), H :: integer()}} |
                     {style, integer()} |
                     {validator, wx:wx_object()}

              Creates this widget with given parameters.

              Return: true if the control was successfully created or false if
              creation failed.

       getSelectedFont(This) -> wxFont:wxFont()

              Types:

                 This = wxFontPickerCtrl()

              Returns the currently selected font.

              Note that this function  is  completely  different  from  wxWin-
              dow:getFont/1.

       setSelectedFont(This, Font) -> ok

              Types:

                 This = wxFontPickerCtrl()
                 Font = wxFont:wxFont()

              Sets the currently selected font.

              Note  that  this  function  is  completely different from wxWin-
              dow:setFont/2.

       getMaxPointSize(This) -> integer()

              Types:

                 This = wxFontPickerCtrl()

              Returns the maximum point size value allowed for the user-chosen
              font.

       setMaxPointSize(This, Max) -> ok

              Types:

                 This = wxFontPickerCtrl()
                 Max = integer()

              Sets  the  maximum  point size value allowed for the user-chosen
              font.

              The default value is 100. Note that big fonts can require a  lot
              of  memory  and  CPU  time  both for creation and for rendering;
              thus, specially because the user has the option to  specify  the
              fontsize  through a text control (see wxFNTP_USE_TEXTCTRL), it's
              a good idea to put a limit to the maximum font  size  when  huge
              fonts do not make much sense.

       destroy(This :: wxFontPickerCtrl()) -> ok

              Destroys the object.



wxWidgets team.                    wx 2.1.1                wxFontPickerCtrl(3)