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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.richtext.RichTextStyleOrganiserDialog:
==========================================================================================================================================
|phoenix_title| **wx.richtext.RichTextStyleOrganiserDialog**
==========================================================================================================================================
This class shows a style sheet and allows the user to edit, add and remove styles.
It can also be used as a style browser, for example if the application is not using a permanent :ref:`wx.richtext.RichTextStyleComboCtrl` or :ref:`wx.richtext.RichTextStyleListCtrl` to present styles.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>RichTextStyleOrganiserDialog</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.richtext.RichTextStyleOrganiserDialog_inheritance.png" alt="Inheritance diagram of RichTextStyleOrganiserDialog" usemap="#dummy" class="inheritance"/></center>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.richtext.RichTextStyleOrganiserDialog.html" title="wx.richtext.RichTextStyleOrganiserDialog" alt="" coords="5,469,297,499"/> <area shape="rect" id="node2" href="wx.Dialog.html" title="wx.Dialog" alt="" coords="108,392,195,421"/> <area shape="rect" id="node3" href="wx.TopLevelWindow.html" title="wx.TopLevelWindow" alt="" coords="74,315,229,344"/> <area shape="rect" id="node4" href="wx.NonOwnedWindow.html" title="wx.NonOwnedWindow" alt="" coords="67,237,235,267"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="103,160,200,189"/> <area shape="rect" id="node6" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="93,83,210,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="wx.Object" alt="" coords="48,5,135,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="159,5,266,35"/> </map>
</p>
</div>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.__init__` Default constructor.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.ApplyStyle` Applies the selected style to selection in the given control or the control passed to the constructor.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.Create` Creates the dialog.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetClassDefaultAttributes`
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags` Returns the flags used to control the interface presented to the user.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering` Returns ``True`` if the user has opted to restart numbering.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl` Returns the associated rich text control (if any).
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle` Returns selected style name.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition` Returns selected style definition.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet` Returns the associated style sheet.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags` Sets the flags used to control the interface presented to the user.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering` Checks or unchecks the restart numbering checkbox.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl` Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetShowToolTips` Determines whether tooltips will be shown.
:meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet` Sets the associated style sheet.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.Flags` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.RestartNumbering` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.RichTextCtrl` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.SelectedStyle` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.SelectedStyleDefinition` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition`
:attr:`~wx.richtext.RichTextStyleOrganiserDialog.StyleSheet` See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.richtext.RichTextStyleOrganiserDialog(Dialog)
**Possible constructors**::
RichTextStyleOrganiserDialog()
RichTextStyleOrganiserDialog(flags, sheet, ctrl, parent, id=ID_ANY,
caption=_("StyleOrganiser"), pos=DefaultPosition, size=DefaultSize,
style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)
This class shows a style sheet and allows the user to edit, add and
remove styles.
.. method:: __init__(self, *args, **kw)
|overload| Overloaded Implementations:
:html:`<hr class="overloadsep" /><br />`
**__init__** `(self)`
Default constructor.
:html:`<hr class="overloadsep" /><br />`
**__init__** `(self, flags, sheet, ctrl, parent, id=ID_ANY, caption=_("StyleOrganiser"), pos=DefaultPosition, size=DefaultSize, style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)`
Constructor.
To create a dialog, pass a bitlist of `flags` (see below), a style sheet, a text control to apply a selected style to (or ``None``), followed by the usual window parameters.
To specify the operations available to the user, pass a combination of these values to `flags:`
- ``wx.richtext.RICHTEXT_ORGANISER_DELETE_STYLES``: Provides a button for deleting styles.
- ``wx.richtext.RICHTEXT_ORGANISER_CREATE_STYLES``: Provides buttons for creating styles.
- ``wx.richtext.RICHTEXT_ORGANISER_APPLY_STYLES``: Provides a button for applying the currently selected style to the selection.
- ``wx.richtext.RICHTEXT_ORGANISER_EDIT_STYLES``: Provides a button for editing styles.
- ``wx.richtext.RICHTEXT_ORGANISER_RENAME_STYLES``: Provides a button for renaming styles.
- ``wx.richtext.RICHTEXT_ORGANISER_OK_CANCEL``: Provides ``wx.OK`` and Cancel buttons.
- ``wx.richtext.RICHTEXT_ORGANISER_RENUMBER``: Provides a checkbox for specifying that the selection should be renumbered.
The following flags determine what will be displayed in the style list:
- ``wx.richtext.RICHTEXT_ORGANISER_SHOW_CHARACTER``: Displays character styles only.
- ``wx.richtext.RICHTEXT_ORGANISER_SHOW_PARAGRAPH``: Displays paragraph styles only.
- ``wx.richtext.RICHTEXT_ORGANISER_SHOW_LIST``: Displays list styles only.
- ``wx.richtext.RICHTEXT_ORGANISER_SHOW_ALL``: Displays all styles.
The following symbols define commonly-used combinations of flags:
- ``wx.richtext.RICHTEXT_ORGANISER_ORGANISE``: Enable all style editing operations so the dialog behaves as a style organiser.
- ``wx.richtext.RICHTEXT_ORGANISER_BROWSE``: Show a list of all styles and their previews, but only allow application of a style or cancellation of the dialog. This makes the dialog behave as a style browser.
- ``wx.richtext.RICHTEXT_ORGANISER_BROWSE_NUMBERING``: Enables only list style browsing, plus a control to specify renumbering. This allows the dialog to be used for applying list styles to the selection.
:param `flags`:
:type `flags`: int
:param `sheet`:
:type `sheet`: wx.richtext.RichTextStyleSheet
:param `ctrl`:
:type `ctrl`: wx.richtext.RichTextCtrl
:param `parent`:
:type `parent`: wx.Window
:param `id`:
:type `id`: wx.WindowID
:param `caption`:
:type `caption`: string
:param `pos`:
:type `pos`: wx.Point
:param `size`:
:type `size`: wx.Size
:param `style`:
:type `style`: long
:html:`<hr class="overloadsep" /><br />`
.. method:: ApplyStyle(self, ctrl=None)
Applies the selected style to selection in the given control or the control passed to the constructor.
:param `ctrl`:
:type `ctrl`: wx.richtext.RichTextCtrl
:rtype: `bool`
.. method:: Create(self, flags, sheet, ctrl, parent, id=ID_ANY, caption=GetTranslation("StyleOrganiser"), pos=DefaultPosition, size=Size(400,300), style=DEFAULT_DIALOG_STYLE|RESIZE_BORDER|SYSTEM_MENU|CLOSE_BOX)
Creates the dialog.
See the constructor.
:param `flags`:
:type `flags`: int
:param `sheet`:
:type `sheet`: wx.richtext.RichTextStyleSheet
:param `ctrl`:
:type `ctrl`: wx.richtext.RichTextCtrl
:param `parent`:
:type `parent`: wx.Window
:param `id`:
:type `id`: wx.WindowID
:param `caption`:
:type `caption`: string
:param `pos`:
:type `pos`: wx.Point
:param `size`:
:type `size`: wx.Size
:param `style`:
:type `style`: long
:rtype: `bool`
.. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
:param `variant`:
:type `variant`: wx.WindowVariant
:rtype: :ref:`VisualAttributes`
.. method:: GetFlags(self)
Returns the flags used to control the interface presented to the user.
:rtype: `int`
.. method:: GetRestartNumbering(self)
Returns ``True`` if the user has opted to restart numbering.
:rtype: `bool`
.. method:: GetRichTextCtrl(self)
Returns the associated rich text control (if any).
:rtype: :ref:`wx.richtext.RichTextCtrl`
.. method:: GetSelectedStyle(self)
Returns selected style name.
:rtype: `string`
.. method:: GetSelectedStyleDefinition(self)
Returns selected style definition.
:rtype: :ref:`wx.richtext.RichTextStyleDefinition`
.. method:: GetStyleSheet(self)
Returns the associated style sheet.
:rtype: :ref:`wx.richtext.RichTextStyleSheet`
.. method:: SetFlags(self, flags)
Sets the flags used to control the interface presented to the user.
:param `flags`:
:type `flags`: int
.. method:: SetRestartNumbering(self, restartNumbering)
Checks or unchecks the restart numbering checkbox.
:param `restartNumbering`:
:type `restartNumbering`: bool
.. method:: SetRichTextCtrl(self, ctrl)
Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.
:param `ctrl`:
:type `ctrl`: wx.richtext.RichTextCtrl
.. staticmethod:: SetShowToolTips(show)
Determines whether tooltips will be shown.
:param `show`:
:type `show`: bool
.. method:: SetStyleSheet(self, sheet)
Sets the associated style sheet.
:param `sheet`:
:type `sheet`: wx.richtext.RichTextStyleSheet
.. attribute:: Flags
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetFlags` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetFlags`
.. attribute:: RestartNumbering
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRestartNumbering` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRestartNumbering`
.. attribute:: RichTextCtrl
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetRichTextCtrl`
.. attribute:: SelectedStyle
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyle`
.. attribute:: SelectedStyleDefinition
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetSelectedStyleDefinition`
.. attribute:: StyleSheet
See :meth:`~wx.richtext.RichTextStyleOrganiserDialog.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleOrganiserDialog.SetStyleSheet`
|