]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/richtextformattingdialog.tex
Applied patch [ 1747059 ] wxAUIDefaultTabArt wxAUI_NB_BOTTOM
[wxWidgets.git] / docs / latex / wx / richtextformattingdialog.tex
CommitLineData
62a268cc
JS
1\section{\class{wxRichTextFormattingDialog}}\label{wxrichtextformattingdialog}
2
3This dialog allows the user to edit a character and/or paragraph style.
4
5In the constructor, specify the pages that will be created. Use GetStyle
6to retrieve the common style for a given range, and then use ApplyStyle
7to apply the user-selected formatting to a control. For example:
8
9\begin{verbatim}
10 wxRichTextRange range;
11 if (m_richTextCtrl->HasSelection())
12 range = m_richTextCtrl->GetSelectionRange();
13 else
14 range = wxRichTextRange(0, m_richTextCtrl->GetLastPosition()+1);
15
16 int pages = wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS;
17
18 wxRichTextFormattingDialog formatDlg(pages, this);
19 formatDlg.GetStyle(m_richTextCtrl, range);
20
21 if (formatDlg.ShowModal() == wxID_OK)
22 {
23 formatDlg.ApplyStyle(m_richTextCtrl, range);
24 }
25\end{verbatim}
26
27\wxheading{Derived from}
28
7376079d
VZ
29\helpref{wxPropertySheetDialog}{wxpropertysheetdialog}\\
30\helpref{wxDialog}{wxdialog}\\
31\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
32\helpref{wxWindow}{wxwindow}\\
33\helpref{wxEvtHandler}{wxevthandler}\\
34\helpref{wxObject}{wxobject}
62a268cc
JS
35
36\wxheading{Include files}
37
38<wx/richtext/richtextformatdlg.h>
39
a7af285d
VZ
40\wxheading{Library}
41
42\helpref{wxRichtext}{librarieslist}
43
62a268cc
JS
44\wxheading{Data structures}
45
46The following flags passed to the dialog constructor indicate the pages to
47be created:
48
49\begin{verbatim}
50#define wxRICHTEXT_FORMAT_STYLE_EDITOR 0x0001
51#define wxRICHTEXT_FORMAT_FONT 0x0002
52#define wxRICHTEXT_FORMAT_TABS 0x0004
53#define wxRICHTEXT_FORMAT_BULLETS 0x0008
54#define wxRICHTEXT_FORMAT_INDENTS_SPACING 0x0010
55\end{verbatim}
56
57\latexignore{\rtfignore{\wxheading{Members}}}
58
59
60\membersection{wxRichTextFormattingDialog::wxRichTextFormattingDialog}\label{wxrichtextformattingdialogwxrichtextformattingdialog}
61
62\func{}{wxRichTextFormattingDialog}{\param{long }{flags}, \param{wxWindow* }{parent}, \param{const wxString\& }{title = \_("Formatting")}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{sz = wxDefaultSize}, \param{long }{style = wxDEFAULT\_DIALOG\_STYLE}}
63
64\func{}{wxRichTextFormattingDialog}{\void}
65
66Constructors.
67
68\wxheading{Parameters}
69
70\docparam{flags}{The pages to show.}
71
72\docparam{parent}{The dialog's parent.}
73
74\docparam{id}{The dialog's identifier.}
75
76\docparam{title}{The dialog's caption.}
77
78\docparam{pos}{The dialog's position.}
79
80\docparam{size}{The dialog's size.}
81
82\docparam{style}{The dialog's window style.}
83
84
85\membersection{wxRichTextFormattingDialog::\destruct{wxRichTextFormattingDialog}}\label{wxrichtextformattingdialogdtor}
86
87\func{}{\destruct{wxRichTextFormattingDialog}}{\void}
88
89Destructor.
90
91\membersection{wxRichTextFormattingDialog::ApplyStyle}\label{wxrichtextformattingdialogapplystyle}
92
93\func{bool}{ApplyStyle}{\param{wxRichTextCtrl* }{ctrl}, \param{const wxRichTextRange\& }{range}, \param{int }{flags = wxRICHTEXT\_SETSTYLE\_WITH\_UNDO|wxRICHTEXT\_SETSTYLE\_OPTIMIZE}}
94
95Apply attributes to the given range, only changing attributes that need to be changed.
96
97\membersection{wxRichTextFormattingDialog::Create}\label{wxrichtextformattingdialogcreate}
98
99\func{bool}{Create}{\param{long }{flags}, \param{wxWindow* }{parent}, \param{const wxString\& }{title}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{sz = wxDefaultSize}, \param{long }{style = wxDEFAULT\_DIALOG\_STYLE}}
100
101Creation: see \helpref{the constructor}{wxrichtextformattingdialog} for details about the parameters.
102
103\membersection{wxRichTextFormattingDialog::GetAttributes}\label{wxrichtextformattingdialoggetattributes}
104
105\constfunc{const wxTextAttrEx\&}{GetAttributes}{\void}
106
107\func{wxTextAttrEx\&}{GetAttributes}{\void}
108
109Gets the attributes being edited.
110
111\membersection{wxRichTextFormattingDialog::GetDialog}\label{wxrichtextformattingdialoggetdialog}
112
113\func{wxRichTextFormattingDialog*}{GetDialog}{\param{wxWindow* }{win}}
114
115Helper for pages to get the top-level dialog.
116
117\membersection{wxRichTextFormattingDialog::GetDialogAttributes}\label{wxrichtextformattingdialoggetdialogattributes}
118
119\func{wxTextAttrEx*}{GetDialogAttributes}{\param{wxWindow* }{win}}
120
121Helper for pages to get the attributes.
122
123\membersection{wxRichTextFormattingDialog::GetDialogStyleDefinition}\label{wxrichtextformattingdialoggetdialogstyledefinition}
124
125\func{wxRichTextStyleDefinition*}{GetDialogStyleDefinition}{\param{wxWindow* }{win}}
126
127Helper for pages to get the style.
128
129\membersection{wxRichTextFormattingDialog::GetFormattingDialogFactory}\label{wxrichtextformattingdialoggetformattingdialogfactory}
130
131\func{wxRichTextFormattingDialogFactory*}{GetFormattingDialogFactory}{\void}
132
133Returns the object to be used to customize the dialog and provide pages.
134
135\membersection{wxRichTextFormattingDialog::GetImageList}\label{wxrichtextformattingdialoggetimagelist}
136
137\constfunc{wxImageList*}{GetImageList}{\void}
138
139Returns the image list associated with the dialog, used for example if showing the dialog as a toolbook.
140
141\membersection{wxRichTextFormattingDialog::GetStyle}\label{wxrichtextformattingdialoggetstyle}
142
143\func{bool}{GetStyle}{\param{wxRichTextCtrl* }{ctrl}, \param{const wxRichTextRange\& }{range}}
144
145Gets common attributes from the given range and calls SetAttributes. Attributes that do not have common values in the given range
146will be omitted from the style's flags.
147
148\membersection{wxRichTextFormattingDialog::GetStyleDefinition}\label{wxrichtextformattingdialoggetstyledefinition}
149
150\constfunc{wxRichTextStyleDefinition*}{GetStyleDefinition}{\void}
151
152Gets the associated style definition, if any.
153
154\membersection{wxRichTextFormattingDialog::GetStyleSheet}\label{wxrichtextformattingdialoggetstylesheet}
155
156\constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
157
158Gets the associated style sheet, if any.
159
160\membersection{wxRichTextFormattingDialog::SetAttributes}\label{wxrichtextformattingdialogsetattributes}
161
162\func{void}{SetAttributes}{\param{const wxTextAttrEx\& }{attr}}
163
164Sets the attributes to be edited.
165
166\membersection{wxRichTextFormattingDialog::SetFormattingDialogFactory}\label{wxrichtextformattingdialogsetformattingdialogfactory}
167
168\func{void}{SetFormattingDialogFactory}{\param{wxRichTextFormattingDialogFactory* }{factory}}
169
170Sets the formatting factory object to be used for customization and page creation.
171It deletes the existing factory object.
172
173\membersection{wxRichTextFormattingDialog::SetImageList}\label{wxrichtextformattingdialogsetimagelist}
174
175\func{void}{SetImageList}{\param{wxImageList* }{imageList}}
176
177Sets the image list associated with the dialog's property sheet.
178
179\membersection{wxRichTextFormattingDialog::SetStyle}\label{wxrichtextformattingdialogsetstyle}
180
181\func{bool}{SetStyle}{\param{const wxTextAttrEx\& }{style}, \param{bool }{update = true}}
182
183Sets the attributes and optionally updates the display, if {\it update} is \true.
184
185\membersection{wxRichTextFormattingDialog::SetStyleDefinition}\label{wxrichtextformattingdialogsetstyledefinition}
186
187\func{bool}{SetStyleDefinition}{\param{const wxRichTextStyleDefinition\& }{styleDef}, \param{wxRichTextStyleSheet* }{sheet}, \param{bool }{update = true}}
188
189Sets the style definition and optionally update the display, if {\it update} is \true.
190
191\membersection{wxRichTextFormattingDialog::UpdateDisplay}\label{wxrichtextformattingdialogupdatedisplay}
192
193\func{bool}{UpdateDisplay}{\void}
194
195Updates the display.
196
197
198%
199% automatically generated by HelpGen $Revision$ from
200% richtextformatdlg.h at 10/Oct/06 15:42:06
201%
202
203
204\section{\class{wxRichTextFormattingDialogFactory}}\label{wxrichtextformattingdialogfactory}
205
206This class provides pages for wxRichTextFormattingDialog, and allows other customization of the dialog.
207A default instance of this class is provided automatically. If you wish to change the behaviour of the
208formatting dialog (for example add or replace a page), you may derive from this class,
209override one or more functions, and call the static function wxRichTextFormattingDialog::SetFormattingDialogFactory.
210
211\wxheading{Derived from}
212
213\helpref{wxObject}{wxobject}
214
215\wxheading{Include files}
216
217<wx/richtext/richtextformatdlg.h>
218
a7af285d
VZ
219\wxheading{Library}
220
221\helpref{wxRichtext}{librarieslist}
222
62a268cc
JS
223\latexignore{\rtfignore{\wxheading{Members}}}
224
225
226\membersection{wxRichTextFormattingDialogFactory::wxRichTextFormattingDialogFactory}\label{wxrichtextformattingdialogfactorywxrichtextformattingdialogfactory}
227
228\func{}{wxRichTextFormattingDialogFactory}{\void}
229
230Constructor.
231
232\membersection{wxRichTextFormattingDialogFactory::\destruct{wxRichTextFormattingDialogFactory}}\label{wxrichtextformattingdialogfactorydtor}
233
234\func{}{\destruct{wxRichTextFormattingDialogFactory}}{\void}
235
236Destructor.
237
238\membersection{wxRichTextFormattingDialogFactory::CreateButtons}\label{wxrichtextformattingdialogfactorycreatebuttons}
239
240\func{virtual bool}{CreateButtons}{\param{wxRichTextFormattingDialog* }{dialog}}
241
242Creates the main dialog buttons.
243
244\membersection{wxRichTextFormattingDialogFactory::CreatePage}\label{wxrichtextformattingdialogfactorycreatepage}
245
246\func{virtual wxPanel*}{CreatePage}{\param{int }{page}, \param{wxString\& }{title}, \param{wxRichTextFormattingDialog* }{dialog}}
247
248Creates a page, given a page identifier.
249
250\membersection{wxRichTextFormattingDialogFactory::CreatePages}\label{wxrichtextformattingdialogfactorycreatepages}
251
252\func{virtual bool}{CreatePages}{\param{long }{pages}, \param{wxRichTextFormattingDialog* }{dialog}}
253
254Creates all pages under the dialog's book control, also calling AddPage.
255
256\membersection{wxRichTextFormattingDialogFactory::GetPageId}\label{wxrichtextformattingdialogfactorygetpageid}
257
258\constfunc{virtual int}{GetPageId}{\param{int }{i}}
259
260Enumerate all available page identifiers.
261
262\membersection{wxRichTextFormattingDialogFactory::GetPageIdCount}\label{wxrichtextformattingdialogfactorygetpageidcount}
263
264\constfunc{virtual int}{GetPageIdCount}{\void}
265
266Gets the number of available page identifiers.
267
268\membersection{wxRichTextFormattingDialogFactory::GetPageImage}\label{wxrichtextformattingdialogfactorygetpageimage}
269
270\constfunc{virtual int}{GetPageImage}{\param{int }{id}}
271
272Gets the image index for the given page identifier.
273
274\membersection{wxRichTextFormattingDialogFactory::SetSheetStyle}\label{wxrichtextformattingdialogfactorysetsheetstyle}
275
276\func{virtual bool}{SetSheetStyle}{\param{wxRichTextFormattingDialog* }{dialog}}
277
278Set the property sheet style, called at the start of wxRichTextFormattingDialog::Create.
279
280\membersection{wxRichTextFormattingDialogFactory::ShowHelp}\label{wxrichtextformattingdialogfactoryshowhelp}
281
282\func{virtual bool}{ShowHelp}{\param{int }{page}, \param{wxRichTextFormattingDialog* }{dialog}}
283
284Invokes help for the dialog.
285