Public Member Functions | Static Public Member Functions

# wxRichTextStyleOrganiserDialog Class Reference
[Rich Text]

`#include <wx/richtext/richtextstyledlg.h>`

Inheritance diagram for wxRichTextStyleOrganiserDialog:
[legend]

## Detailed Description

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 wxRichTextStyleComboCtrl or wxRichTextStyleListCtrl to present styles.

##

Library: wxRichText
Category: Rich Text

## Public Member Functions
| wxRichTextStyleOrganiserDialog ()
| Default ctor.
| wxRichTextStyleOrganiserDialog (int flags, wxRichTextStyleSheet *sheet, wxRichTextCtrl *ctrl, wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Style Organiser"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
| Constructor.
bool | ApplyStyle (wxRichTextCtrl *ctrl=NULL)
| Applies the selected style to selection in the given control or the control passed to the constructor.
bool | Create (int flags, wxRichTextStyleSheet *sheet, wxRichTextCtrl *ctrl, wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=wxGetTranslation("Style Organiser"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
| Creates the dialog.
bool | GetRestartNumbering () const
| Returns true if the user has opted to restart numbering.
wxRichTextCtrl * | GetRichTextCtrl () const
| Returns the associated rich text control (if any).
wxString | GetSelectedStyle () const
| Returns selected style name.
wxRichTextStyleDefinition * | GetSelectedStyleDefinition () const
| Returns selected style definition.
wxRichTextStyleSheet * | GetStyleSheet () const
| Returns the associated style sheet.
void | SetFlags (int flags)
| Sets the flags used to control the interface presented to the user.
void | SetRestartNumbering (bool restartNumbering)
| Checks or unchecks the restart numbering checkbox.
void | SetRichTextCtrl (wxRichTextCtrl *ctrl)
| Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.
void | SetStyleSheet (wxRichTextStyleSheet *sheet)
| Sets the associated style sheet.
int | GetFlags () const
| Returns the flags used to control the interface presented to the user.
## Static Public Member Functions
static void | SetShowToolTips (bool show)
| Determines whether tooltips will be shown.

List of all members.

## Constructor & Destructor Documentation

wxRichTextStyleOrganiserDialog::wxRichTextStyleOrganiserDialog | ( |  | ) |

Default ctor.

wxRichTextStyleOrganiserDialog::wxRichTextStyleOrganiserDialog | ( | int | flags,
|  | wxRichTextStyleSheet * | sheet,
|  | wxRichTextCtrl * | ctrl,
|  | wxWindow * | parent,
|  | wxWindowID | id = `wxID_ANY`,
|  | const wxString & | caption = `_("Style Organiser")`,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_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 NULL), followed by the usual window parameters.

To specify the operations available to the user, pass a combination of these values to flags:

- wxRICHTEXT_ORGANISER_DELETE_STYLES: Provides a button for deleting styles.
- wxRICHTEXT_ORGANISER_CREATE_STYLES: Provides buttons for creating styles.
- wxRICHTEXT_ORGANISER_APPLY_STYLES: Provides a button for applying the currently selected style to the selection.
- wxRICHTEXT_ORGANISER_EDIT_STYLES: Provides a button for editing styles.
- wxRICHTEXT_ORGANISER_RENAME_STYLES: Provides a button for renaming styles.
- wxRICHTEXT_ORGANISER_OK_CANCEL: Provides OK and Cancel buttons.
- wxRICHTEXT_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:

- wxRICHTEXT_ORGANISER_SHOW_CHARACTER: Displays character styles only.
- wxRICHTEXT_ORGANISER_SHOW_PARAGRAPH: Displays paragraph styles only.
- wxRICHTEXT_ORGANISER_SHOW_LIST: Displays list styles only.
- wxRICHTEXT_ORGANISER_SHOW_ALL: Displays all styles.

The following symbols define commonly-used combinations of flags:

- wxRICHTEXT_ORGANISER_ORGANISE: Enable all style editing operations so the dialog behaves as a style organiser.
- wxRICHTEXT_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.
- wxRICHTEXT_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.

## Member Function Documentation

bool wxRichTextStyleOrganiserDialog::ApplyStyle | ( | wxRichTextCtrl * | ctrl = `NULL` | ) |

Applies the selected style to selection in the given control or the control passed to the constructor.

bool wxRichTextStyleOrganiserDialog::Create | ( | int | flags,
|  | wxRichTextStyleSheet * | sheet,
|  | wxRichTextCtrl * | ctrl,
|  | wxWindow * | parent,
|  | wxWindowID | id = `wxID_ANY`,
|  | const wxString & | caption = `wxGetTranslation("Style Organiser")`,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxSize(400, 300)`,
|  | long | style = `wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX` |
| ) |  |  |

Creates the dialog.

See the ctor.

int wxRichTextStyleOrganiserDialog::GetFlags | ( |  | ) | const

Returns the flags used to control the interface presented to the user.

bool wxRichTextStyleOrganiserDialog::GetRestartNumbering | ( |  | ) | const

Returns true if the user has opted to restart numbering.

wxRichTextCtrl* wxRichTextStyleOrganiserDialog::GetRichTextCtrl | ( |  | ) | const

Returns the associated rich text control (if any).

wxString wxRichTextStyleOrganiserDialog::GetSelectedStyle | ( |  | ) | const

Returns selected style name.

wxRichTextStyleDefinition* wxRichTextStyleOrganiserDialog::GetSelectedStyleDefinition | ( |  | ) | const

Returns selected style definition.

wxRichTextStyleSheet* wxRichTextStyleOrganiserDialog::GetStyleSheet | ( |  | ) | const

Returns the associated style sheet.

void wxRichTextStyleOrganiserDialog::SetFlags | ( | int | flags | ) |

Sets the flags used to control the interface presented to the user.

void wxRichTextStyleOrganiserDialog::SetRestartNumbering | ( | bool | restartNumbering | ) |

Checks or unchecks the restart numbering checkbox.

void wxRichTextStyleOrganiserDialog::SetRichTextCtrl | ( | wxRichTextCtrl * | ctrl | ) |

Sets the control to be associated with the dialog, for the purposes of applying a style to the selection.

static void wxRichTextStyleOrganiserDialog::SetShowToolTips | ( | bool | show | ) | `[static]`

Determines whether tooltips will be shown.

void wxRichTextStyleOrganiserDialog::SetStyleSheet | ( | wxRichTextStyleSheet * | sheet | ) |

Sets the associated style sheet.

|  | [ top ]