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 _richtext.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13const int wxRICHTEXT_FORMAT_STYLE_EDITOR; 14const int wxRICHTEXT_FORMAT_FONT; 15const int wxRICHTEXT_FORMAT_TABS; 16const int wxRICHTEXT_FORMAT_BULLETS; 17const int wxRICHTEXT_FORMAT_INDENTS_SPACING; 18class wxRichTextFormattingDialogFactory : wxObject 19{ 20 %Docstring 21 RichTextFormattingDialogFactory() 22 23 This class provides pages for wxRichTextFormattingDialog, and allows 24 other customization of the dialog. 25 %End 26 %TypeHeaderCode 27 #include <wx/richtext/richtextformatdlg.h> 28 %End 29 30public: 31 wxRichTextFormattingDialogFactory(); 32 33 virtual 34 ~wxRichTextFormattingDialogFactory(); 35 36 virtual 37 bool CreateButtons( 38 wxRichTextFormattingDialog * dialog 39 ); 40 %Docstring 41 CreateButtons(dialog) -> bool 42 43 Creates the main dialog buttons. 44 %End 45 46 virtual 47 wxPanel * CreatePage( 48 int page, 49 wxString & title, 50 wxRichTextFormattingDialog * dialog 51 ); 52 %Docstring 53 CreatePage(page, title, dialog) -> wx.Panel 54 55 Creates a page, given a page identifier. 56 %End 57 58 virtual 59 bool CreatePages( 60 long pages, 61 wxRichTextFormattingDialog * dialog 62 ); 63 %Docstring 64 CreatePages(pages, dialog) -> bool 65 66 Creates all pages under the dialog's book control, also calling 67 AddPage(). 68 %End 69 70 virtual 71 int GetPageId( 72 int i 73 ) const; 74 %Docstring 75 GetPageId(i) -> int 76 77 Enumerate all available page identifiers. 78 %End 79 80 virtual 81 int GetPageIdCount() const; 82 %Docstring 83 GetPageIdCount() -> int 84 85 Gets the number of available page identifiers. 86 %End 87 88 virtual 89 int GetPageImage( 90 int id 91 ) const; 92 %Docstring 93 GetPageImage(id) -> int 94 95 Gets the image index for the given page identifier. 96 %End 97 98 virtual 99 bool SetSheetStyle( 100 wxRichTextFormattingDialog * dialog 101 ); 102 %Docstring 103 SetSheetStyle(dialog) -> bool 104 105 Set the property sheet style, called at the start of 106 wxRichTextFormattingDialog::Create. 107 %End 108 109 virtual 110 bool ShowHelp( 111 int page, 112 wxRichTextFormattingDialog * dialog 113 ); 114 %Docstring 115 ShowHelp(page, dialog) -> bool 116 117 Invokes help for the dialog. 118 %End 119 120 public: 121 122 123 %Property(name=PageIdCount, get=GetPageIdCount) 124}; // end of class wxRichTextFormattingDialogFactory 125 126 127class wxRichTextFormattingDialog : wxPropertySheetDialog 128{ 129 %Docstring 130 RichTextFormattingDialog() 131 RichTextFormattingDialog(flags, parent, title="Formatting", id=wx.ID_ANY, pos=wx.DefaultPosition, sz=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE) 132 133 This dialog allows the user to edit a character and/or paragraph 134 style. 135 %End 136 %TypeHeaderCode 137 #include <wx/richtext/richtextformatdlg.h> 138 %End 139 140public: 141 enum 142 { 143 Option_AllowPixelFontSize 144 }; 145 146 wxRichTextFormattingDialog(); 147 %PreMethodCode 148 if (!wxPyCheckForApp()) return NULL; 149 %End 150 151 wxRichTextFormattingDialog( 152 long flags, 153 wxWindow * parent, 154 const wxString & title = "Formatting", 155 wxWindowID id = wxID_ANY, 156 const wxPoint & pos = wxDefaultPosition, 157 const wxSize & sz = wxDefaultSize, 158 long style = wxDEFAULT_DIALOG_STYLE 159 ) /Transfer/; 160 %PreMethodCode 161 if (!wxPyCheckForApp()) return NULL; 162 %End 163 164 ~wxRichTextFormattingDialog(); 165 166 wxTextAttr & GetAttributes(); 167 %Docstring 168 GetAttributes() -> wx.TextAttr 169 170 Gets the attributes being edited. 171 %End 172 173 bool ApplyStyle( 174 wxRichTextCtrl * ctrl, 175 const wxRichTextRange & range, 176 int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE 177 ); 178 %Docstring 179 ApplyStyle(ctrl, range, flags=RICHTEXT_SETSTYLE_WITH_UNDO|RICHTEXT_SETSTYLE_OPTIMIZE) -> bool 180 181 Apply attributes to the given range, only changing attributes that 182 need to be changed. 183 %End 184 185 bool Create( 186 long flags, 187 wxWindow * parent, 188 const wxString & title = wxGetTranslation("Formatting"), 189 wxWindowID id = wxID_ANY, 190 const wxPoint & pos = wxDefaultPosition, 191 const wxSize & sz = wxDefaultSize, 192 long style = wxDEFAULT_DIALOG_STYLE 193 ) /TransferThis/; 194 %Docstring 195 Create(flags, parent, title=wx.GetTranslation("Formatting"), id=wx.ID_ANY, pos=wx.DefaultPosition, sz=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE) -> bool 196 197 Creation: see wxRichTextFormattingDialog() "the constructor" for 198 details about the parameters. 199 %End 200 201 wxImageList * GetImageList() const; 202 %Docstring 203 GetImageList() -> wx.ImageList 204 205 Returns the image list associated with the dialog, used for example if 206 showing the dialog as a toolbook. 207 %End 208 209 bool GetStyle( 210 wxRichTextCtrl * ctrl, 211 const wxRichTextRange & range 212 ); 213 %Docstring 214 GetStyle(ctrl, range) -> bool 215 216 Gets common attributes from the given range and calls SetAttributes(). 217 %End 218 219 wxRichTextStyleDefinition * GetStyleDefinition() const; 220 %Docstring 221 GetStyleDefinition() -> RichTextStyleDefinition 222 223 Gets the associated style definition, if any. 224 %End 225 226 wxRichTextStyleSheet * GetStyleSheet() const; 227 %Docstring 228 GetStyleSheet() -> RichTextStyleSheet 229 230 Gets the associated style sheet, if any. 231 %End 232 233 void SetAttributes( 234 const wxTextAttr & attr 235 ); 236 %Docstring 237 SetAttributes(attr) 238 239 Sets the attributes to be edited. 240 %End 241 242 void SetOptions( 243 int options 244 ); 245 %Docstring 246 SetOptions(options) 247 248 Sets the dialog options, determining what the interface presents to 249 the user. 250 %End 251 252 int GetOptions() const; 253 %Docstring 254 GetOptions() -> int 255 256 Gets the dialog options, determining what the interface presents to 257 the user. 258 %End 259 260 bool HasOption( 261 int option 262 ) const; 263 %Docstring 264 HasOption(option) -> bool 265 266 Returns true if the given option is present. 267 %End 268 269 void SetImageList( 270 wxImageList * imageList 271 ); 272 %Docstring 273 SetImageList(imageList) 274 275 Sets the image list associated with the dialog's property sheet. 276 %End 277 278 bool SetStyle( 279 const wxTextAttr & style, 280 bool update = true 281 ); 282 %Docstring 283 SetStyle(style, update=True) -> bool 284 285 Sets the attributes and optionally updates the display, if update is 286 true. 287 %End 288 289 bool SetStyleDefinition( 290 const wxRichTextStyleDefinition & styleDef, 291 wxRichTextStyleSheet * sheet, 292 bool update = true 293 ); 294 %Docstring 295 SetStyleDefinition(styleDef, sheet, update=True) -> bool 296 297 Sets the style definition and optionally update the display, if update 298 is true. 299 %End 300 301 bool UpdateDisplay(); 302 %Docstring 303 UpdateDisplay() -> bool 304 305 Updates the display. 306 %End 307 308 static 309 wxRichTextFormattingDialog * GetDialog( 310 wxWindow * win 311 ); 312 %Docstring 313 GetDialog(win) -> RichTextFormattingDialog 314 315 Helper for pages to get the top-level dialog. 316 %End 317 318 static 319 wxTextAttr * GetDialogAttributes( 320 wxWindow * win 321 ); 322 %Docstring 323 GetDialogAttributes(win) -> wx.TextAttr 324 325 Helper for pages to get the attributes. 326 %End 327 328 static 329 wxRichTextStyleDefinition * GetDialogStyleDefinition( 330 wxWindow * win 331 ); 332 %Docstring 333 GetDialogStyleDefinition(win) -> RichTextStyleDefinition 334 335 Helper for pages to get the style. 336 %End 337 338 static 339 wxRichTextFormattingDialogFactory * GetFormattingDialogFactory(); 340 %Docstring 341 GetFormattingDialogFactory() -> RichTextFormattingDialogFactory 342 343 Returns the object to be used to customize the dialog and provide 344 pages. 345 %End 346 347 static 348 void SetFormattingDialogFactory( 349 wxRichTextFormattingDialogFactory * factory 350 ); 351 %Docstring 352 SetFormattingDialogFactory(factory) 353 354 Sets the formatting factory object to be used for customization and 355 page creation. 356 %End 357 358 public: 359 virtual wxPoint GetClientAreaOrigin() const; 360 virtual bool Validate(); 361 virtual bool TransferDataToWindow(); 362 virtual bool TransferDataFromWindow(); 363 virtual void InitDialog(); 364 virtual bool AcceptsFocus() const; 365 virtual bool AcceptsFocusRecursively() const; 366 virtual bool AcceptsFocusFromKeyboard() const; 367 virtual void AddChild( wxWindowBase *child ); 368 virtual void RemoveChild( wxWindowBase *child ); 369 virtual void InheritAttributes(); 370 virtual bool ShouldInheritColours() const; 371 virtual void OnInternalIdle(); 372 virtual wxWindow *GetMainWindowOfCompositeControl(); 373 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 374 virtual void SetCanFocus(bool canFocus); 375 virtual bool Destroy(); 376 virtual void SetValidator( const wxValidator &validator ); 377 virtual wxValidator* GetValidator(); 378 379 380 protected: 381 virtual bool ProcessEvent(wxEvent & event); 382 virtual void DoEnable(bool enable); 383 virtual void DoGetPosition(int *x, int *y) const; 384 virtual void DoGetSize(int *width, int *height) const; 385 virtual void DoGetClientSize(int *width, int *height) const; 386 virtual wxSize DoGetBestSize() const; 387 virtual wxSize DoGetBestClientSize() const; 388 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 389 virtual void DoSetClientSize(int width, int height); 390 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 391 virtual wxSize DoGetBorderSize() const; 392 virtual void DoMoveWindow(int x, int y, int width, int height); 393 virtual void DoSetWindowVariant( wxWindowVariant variant); 394 virtual wxBorder GetDefaultBorder() const; 395 virtual wxBorder GetDefaultBorderForControl() const; 396 virtual void DoFreeze(); 397 virtual void DoThaw(); 398 virtual bool HasTransparentBackground(); 399 virtual bool TryBefore(wxEvent& event); 400 virtual bool TryAfter(wxEvent& event); 401 402 403 public: 404 405 406 static 407 wxVisualAttributes GetClassDefaultAttributes( 408 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 409 ); 410 %Docstring 411 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 412 %End 413 %PreMethodCode 414 if (!wxPyCheckForApp()) return NULL; 415 %End 416 417 public: 418 419 420 %Property(name=Attributes, get=GetAttributes, set=SetAttributes) 421 %Property(name=ImageList, get=GetImageList, set=SetImageList) 422 %Property(name=Options, get=GetOptions, set=SetOptions) 423 %Property(name=StyleDefinition, get=GetStyleDefinition, set=SetStyleDefinition) 424 %Property(name=StyleSheet, get=GetStyleSheet) 425}; // end of class wxRichTextFormattingDialog 426 427 428 429//--------------------------------------------------------------------------- 430 431