1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
/////////////////////////////////////////////////////////////////////////////
// Name: fontdata.h
// Purpose: interface of wxFontData
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxFontData
This class holds a variety of information related to font dialogs.
@library{wxcore}
@category{cmndlg,data}
@see @ref overview_cmndlg_font, wxFont, wxFontDialog
*/
class wxFontData : public wxObject
{
public:
/**
Constructor. Initializes @e fontColour to black, @e showHelp to @false,
@e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0
and @e maxSize to 0.
*/
wxFontData();
/**
Enables or disables "effects" under Windows or generic only. This
refers to the controls for manipulating colour, strikeout and underline
properties.
The default value is @true.
*/
void EnableEffects(bool enable);
/**
Under Windows, returns a flag determining whether symbol fonts can be
selected. Has no effect on other platforms.
The default value is @true.
*/
bool GetAllowSymbols() const;
/**
Gets the font chosen by the user if the user pressed OK
(wxFontDialog::ShowModal() returned wxID_OK).
*/
wxFont GetChosenFont() const;
/**
Gets the colour associated with the font dialog.
The default value is black.
*/
const wxColour& GetColour() const;
/**
Determines whether "effects" are enabled under Windows. This refers to
the controls for manipulating colour, strikeout and underline
properties.
The default value is @true.
*/
bool GetEnableEffects() const;
/**
Returns the state of the flags restricting the selection.
Note that currently these flags are only effectively used in wxMSW.
@returns
- @c wxFONTRESTRICT_NONE If no restriction applies, or a combination of
the following flags:
- @c wxFONTRESTRICT_SCALABLE To show only scalable fonts - no raster fonts.
- @c wxFONTRESTRICT_FIXEDPITCH To show only monospaced fonts.
The default value is @c wxFONTRESTRICT_NONE.
@since 3.1.4
*/
int GetRestrictSelection() const;
/**
Gets the font that will be initially used by the font dialog. This
should have previously been set by the application.
*/
wxFont GetInitialFont() const;
/**
Returns @true if the Help button will be shown (Windows only).
The default value is @false.
*/
bool GetShowHelp() const;
/**
Restricts the selection to a subset of the available fonts.
Note that currently these flags are only effectively used in wxMSW and
are ignored in the other ports.
Possible values are:
- @c wxFONTRESTRICT_NONE No restriction, show all fonts in the dialog.
- @c wxFONTRESTRICT_SCALABLE To show only scalable fonts - no raster fonts.
- @c wxFONTRESTRICT_FIXEDPITCH To show only monospaced fonts.
The default value is @c wxFONTRESTRICT_NONE.
@since 3.1.4
*/
void RestrictSelection(int flags);
/**
Under Windows, determines whether symbol fonts can be selected. Has no
effect on other platforms.
The default value is @true.
*/
void SetAllowSymbols(bool allowSymbols);
/**
Sets the font that will be returned to the user (for internal use
only).
*/
void SetChosenFont(const wxFont& font);
/**
Sets the colour that will be used for the font foreground colour.
The default colour is black.
*/
void SetColour(const wxColour& colour);
/**
Sets the font that will be initially used by the font dialog.
*/
void SetInitialFont(const wxFont& font);
/**
Sets the valid range for the font point size (Windows only).
The default is 0, 0 (unrestricted range).
*/
void SetRange(int min, int max);
/**
Determines whether the Help button will be displayed in the font dialog
(Windows only).
The default value is @false.
*/
void SetShowHelp(bool showHelp);
/**
Assignment operator for the font data.
*/
wxFontData& operator =(const wxFontData& data);
};
|