PCL
|
A ComboBox descendant class to select font faces. More...
#include <FontComboBox.h>
Public Types | |
using | font_event_handler = void(Control::*)(FontComboBox &sender, const String &font) |
Public Types inherited from pcl::ComboBox | |
using | edit_event_handler = void(Control::*)(ComboBox &sender) |
using | item_event_handler = void(Control::*)(ComboBox &sender, int itemIndex) |
Public Types inherited from pcl::Control | |
using | child_event_handler = void(Control::*)(Control &sender, Control &child) |
using | close_event_handler = void(Control::*)(Control &sender, bool &allowClose) |
using | event_handler = void(Control::*)(Control &sender) |
using | file_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers, bool &wantsFiles) |
using | file_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers) |
using | keyboard_event_handler = void(Control::*)(Control &sender, int key, unsigned modifiers, bool &wantsKey) |
using | mouse_button_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int button, unsigned buttons, unsigned modifiers) |
using | mouse_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, unsigned buttons, unsigned modifiers) |
using | mouse_wheel_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int delta, unsigned buttons, unsigned modifiers) |
using | move_event_handler = void(Control::*)(Control &sender, const pcl::Point &newPos, const pcl::Point &oldPos) |
using | paint_event_handler = void(Control::*)(Control &sender, const pcl::Rect &updateRect) |
using | resize_event_handler = void(Control::*)(Control &sender, int newWidth, int newHeight, int oldWidth, int oldHeight) |
using | view_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers, bool &wantsView) |
using | view_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers) |
Additional Inherited Members | |
Static Public Member Functions inherited from pcl::Control | |
static void | HideToolTip () |
static Control & | Null () |
static void | ShowToolTip (const Point &pos, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0)) |
static void | ShowToolTip (int x, int y, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0)) |
static String | ToolTipText () |
Static Public Member Functions inherited from pcl::UIObject | |
static UIObject & | Null () |
Protected Member Functions inherited from pcl::UIObject | |
UIObject ()=default | |
UIObject (const UIObject &x) | |
UIObject (UIObject &&x) | |
UIObject & | operator= (const UIObject &x) |
UIObject & | operator= (UIObject &&x) |
FontComboBox is a utility class that provides a simple list with all the installed fonts on the system, plus the set of standard font families - see the FontFamily namespace for the supported set of standard font families in the PixInsight/PCL platform.
Optionally, FontComboBox can restrict the list of font items to include only scalable, bitmapped or fixed-pitch fonts. The fonts list can also be restricted as a function of the available writing systems (Latin, Greek, Cyrillic, and so on).
Definition at line 86 of file FontComboBox.h.
pcl::FontComboBox::FontComboBox | ( | Control & | parent = Control::Null() | ) |
Constructs a FontComboBox as a child control of parent.
A default set of ComboBox items is created for the full set of fonts currently installed on the system.
|
inlineoverride |
Destroys a FontComboBox control.
Definition at line 101 of file FontComboBox.h.
void pcl::FontComboBox::AddFixedPitchFonts | ( | ) |
Adds a list of ComboBox items corresponding to all fixed-pitch fonts currently installed on the system.
|
inline |
Adds items for all installed fonts that support the Greek writing system.
This is a convenience member function, equivalent to: AddWritingSystem( "Greek" ).
Definition at line 290 of file FontComboBox.h.
void pcl::FontComboBox::AddItalicFonts | ( | ) |
Adds a list of ComboBox items corresponding to all italic fonts currently installed on the system.
|
inline |
Adds items for all installed fonts that support the Latin writing system.
This is a convenience member function, equivalent to: AddWritingSystem( "Latin" ).
Definition at line 266 of file FontComboBox.h.
void pcl::FontComboBox::AddScalableFonts | ( | ) |
Adds a list of ComboBox items corresponding to all scalable fonts currently installed on the system.
void pcl::FontComboBox::AddStandardFontFamilies | ( | ) |
Adds a list of ComboBox items corresponding to the standard font families available on the PixInsight/PCL platform. This includes the following fonts: Default, SansSerif, Serif, Script, Monospace, Decorative, and Symbol.
void pcl::FontComboBox::AddWritingSystem | ( | const String & | writingSystem | ) |
Adds a list of ComboBox items corresponding to all installed fonts that support the specified writing system.
|
inline |
Returns a Font object that corresponds to the currently selected ComboBox item, or a null font object (Font::Null()) if no item is currently selected.
size | The size in points of the returned font. |
This is a convenience member function, equivalent to: Font( CurrentFontFace(), size ).
Definition at line 128 of file FontComboBox.h.
String pcl::FontComboBox::CurrentFontFace | ( | ) | const |
Returns the face name of the font that corresponds to the currently selected ComboBox item, or an empty string if no item is currently selected.
void pcl::FontComboBox::RemoveFixedPitchFonts | ( | ) |
Removes all existing ComboBox items that correspond to fixed-pitch fonts.
|
inline |
Removes all existing ComboBox items that correspond to installed fonts supporting the Greek writing system.
Definition at line 301 of file FontComboBox.h.
void pcl::FontComboBox::RemoveItalicFonts | ( | ) |
Removes all existing ComboBox items that correspond to italic fonts.
|
inline |
Removes all existing ComboBox items that correspond to installed fonts supporting the Latin writing system.
Definition at line 277 of file FontComboBox.h.
void pcl::FontComboBox::RemoveScalableFonts | ( | ) |
Removes all existing ComboBox items that correspond to scalable fonts.
void pcl::FontComboBox::RemoveStandardFontFamilies | ( | ) |
Removes all existing ComboBox items that correspond to standard font families available on the PixInsight/PCL platform. See AddStandardFontFamilies() for more information.
void pcl::FontComboBox::RemoveWritingSystem | ( | const String & | writingSystem | ) |
Removes all existing ComboBox items that correspond to installed fonts supporting the specified writing system.
void pcl::FontComboBox::ResetFonts | ( | ) |
Resets this FontComboBox control to its default state: Replaces the current list of ComboBox items with a new set corresponding to the standard font families available on the PixInsight/PCL platform, plus all installed fonts on the system.
|
inline |
Selects the ComboBox item corresponding to the specified font.
If the specified font doesn't correspond to an installed or standard font family, or if font is Font::Null(), this member function leaves the ComboBox control with no selection, i.e. with its selected index equal to -1.
This is a convenience member function, equivalent to: SetCurrentFont( font.Face() ).
Definition at line 158 of file FontComboBox.h.
References pcl::Font::Face().
void pcl::FontComboBox::SetCurrentFont | ( | const String & | face | ) |
Selects the ComboBox item corresponding to the specified font face.
If the specified face doesn't correspond to an installed or standard font family, or if an empty string is specified, this member function leaves the ComboBox control with no selection, i.e. with its selected index equal to -1.