1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/fontdlg.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18class wxFontData : wxObject 19{ 20 %Docstring 21 FontData() 22 23 This class holds a variety of information related to font dialogs. 24 %End 25 %TypeHeaderCode 26 #include <wx/fontdata.h> 27 %End 28 29public: 30 wxFontData(); 31 32 void EnableEffects( 33 bool enable 34 ); 35 %Docstring 36 EnableEffects(enable) 37 38 Enables or disables "effects" under Windows or generic only. 39 %End 40 41 bool GetAllowSymbols() const; 42 %Docstring 43 GetAllowSymbols() -> bool 44 45 Under Windows, returns a flag determining whether symbol fonts can be 46 selected. 47 %End 48 49 wxFont GetChosenFont() const; 50 %Docstring 51 GetChosenFont() -> Font 52 53 Gets the font chosen by the user if the user pressed OK 54 (wxFontDialog::ShowModal() returned wxID_OK). 55 %End 56 57 const wxColour & GetColour() const; 58 %Docstring 59 GetColour() -> Colour 60 61 Gets the colour associated with the font dialog. 62 %End 63 64 bool GetEnableEffects() const; 65 %Docstring 66 GetEnableEffects() -> bool 67 68 Determines whether "effects" are enabled under Windows. 69 %End 70 71 wxFont GetInitialFont() const; 72 %Docstring 73 GetInitialFont() -> Font 74 75 Gets the font that will be initially used by the font dialog. 76 %End 77 78 bool GetShowHelp() const; 79 %Docstring 80 GetShowHelp() -> bool 81 82 Returns true if the Help button will be shown (Windows only). 83 %End 84 85 void SetAllowSymbols( 86 bool allowSymbols 87 ); 88 %Docstring 89 SetAllowSymbols(allowSymbols) 90 91 Under Windows, determines whether symbol fonts can be selected. 92 %End 93 94 void SetChosenFont( 95 const wxFont & font 96 ); 97 %Docstring 98 SetChosenFont(font) 99 100 Sets the font that will be returned to the user (for internal use 101 only). 102 %End 103 104 void SetColour( 105 const wxColour & colour 106 ); 107 %Docstring 108 SetColour(colour) 109 110 Sets the colour that will be used for the font foreground colour. 111 %End 112 113 void SetInitialFont( 114 const wxFont & font 115 ); 116 %Docstring 117 SetInitialFont(font) 118 119 Sets the font that will be initially used by the font dialog. 120 %End 121 122 void SetRange( 123 int min, 124 int max 125 ); 126 %Docstring 127 SetRange(min, max) 128 129 Sets the valid range for the font point size (Windows only). 130 %End 131 132 void SetShowHelp( 133 bool showHelp 134 ); 135 %Docstring 136 SetShowHelp(showHelp) 137 138 Determines whether the Help button will be displayed in the font 139 dialog (Windows only). 140 %End 141 142 public: 143 144 145 %Property(name=AllowSymbols, get=GetAllowSymbols, set=SetAllowSymbols) 146 %Property(name=ChosenFont, get=GetChosenFont, set=SetChosenFont) 147 %Property(name=Colour, get=GetColour, set=SetColour) 148 %Property(name=InitialFont, get=GetInitialFont, set=SetInitialFont) 149 %Property(name=ShowHelp, get=GetShowHelp, set=SetShowHelp) 150}; // end of class wxFontData 151 152 153class wxFontDialog : wxDialog 154{ 155 %Docstring 156 FontDialog() 157 FontDialog(parent) 158 FontDialog(parent, data) 159 160 This class represents the font chooser dialog. 161 %End 162 %TypeHeaderCode 163 #include <wx/fontdlg.h> 164 %End 165 166public: 167 wxFontDialog(); 168 %PreMethodCode 169 if (!wxPyCheckForApp()) return NULL; 170 %End 171 172 wxFontDialog( 173 wxWindow * parent 174 ) /Transfer/; 175 %PreMethodCode 176 if (!wxPyCheckForApp()) return NULL; 177 %End 178 179 wxFontDialog( 180 wxWindow * parent, 181 const wxFontData & data 182 ); 183 %PreMethodCode 184 if (!wxPyCheckForApp()) return NULL; 185 %End 186 187 wxFontData & GetFontData(); 188 %Docstring 189 GetFontData() -> FontData 190 191 Returns the font data associated with the font dialog. 192 %End 193 194 bool Create( 195 wxWindow * parent 196 ) /TransferThis/; 197 %Docstring 198 Create(parent) -> bool 199 Create(parent, data) -> bool 200 201 Creates the dialog if the wxFontDialog object had been initialized 202 using the default constructor. 203 %End 204 205 bool Create( 206 wxWindow * parent, 207 const wxFontData & data 208 ); 209 210 int ShowModal(); 211 %Docstring 212 ShowModal() -> int 213 214 Shows the dialog, returning wxID_OK if the user pressed Ok, and 215 wxID_CANCEL otherwise. 216 %End 217 218 public: 219 virtual wxPoint GetClientAreaOrigin() const; 220 virtual bool Validate(); 221 virtual bool TransferDataToWindow(); 222 virtual bool TransferDataFromWindow(); 223 virtual void InitDialog(); 224 virtual bool AcceptsFocus() const; 225 virtual bool AcceptsFocusRecursively() const; 226 virtual bool AcceptsFocusFromKeyboard() const; 227 virtual void AddChild( wxWindowBase *child ); 228 virtual void RemoveChild( wxWindowBase *child ); 229 virtual void InheritAttributes(); 230 virtual bool ShouldInheritColours() const; 231 virtual void OnInternalIdle(); 232 virtual wxWindow *GetMainWindowOfCompositeControl(); 233 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 234 virtual void SetCanFocus(bool canFocus); 235 virtual bool Destroy(); 236 virtual void SetValidator( const wxValidator &validator ); 237 virtual wxValidator* GetValidator(); 238 239 240 protected: 241 virtual bool ProcessEvent(wxEvent & event); 242 virtual void DoEnable(bool enable); 243 virtual void DoGetPosition(int *x, int *y) const; 244 virtual void DoGetSize(int *width, int *height) const; 245 virtual void DoGetClientSize(int *width, int *height) const; 246 virtual wxSize DoGetBestSize() const; 247 virtual wxSize DoGetBestClientSize() const; 248 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 249 virtual void DoSetClientSize(int width, int height); 250 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 251 virtual wxSize DoGetBorderSize() const; 252 virtual void DoMoveWindow(int x, int y, int width, int height); 253 virtual void DoSetWindowVariant( wxWindowVariant variant); 254 virtual wxBorder GetDefaultBorder() const; 255 virtual wxBorder GetDefaultBorderForControl() const; 256 virtual void DoFreeze(); 257 virtual void DoThaw(); 258 virtual bool HasTransparentBackground(); 259 virtual bool TryBefore(wxEvent& event); 260 virtual bool TryAfter(wxEvent& event); 261 262 263 public: 264 265 266 static 267 wxVisualAttributes GetClassDefaultAttributes( 268 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 269 ); 270 %Docstring 271 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 272 %End 273 %PreMethodCode 274 if (!wxPyCheckForApp()) return NULL; 275 %End 276 277 public: 278 279 280 %Property(name=FontData, get=GetFontData) 281}; // end of class wxFontDialog 282 283 284wxFont wxGetFontFromUser( 285 wxWindow * parent, 286 const wxFont & fontInit, 287 const wxString & caption = wxEmptyString 288); 289%Docstring 290 GetFontFromUser(parent, fontInit, caption=EmptyString) -> Font 291 292 Shows the font selection dialog and returns the font selected by user 293 or invalid font (use wxFont::IsOk() to test whether a font is valid) 294 if the dialog was cancelled. 295%End 296%PreMethodCode 297 if (!wxPyCheckForApp()) return NULL; 298%End 299 300 301//--------------------------------------------------------------------------- 302 303