]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/richtextstylesheet.tex
API change: a single SELECTION_CHANGED not lots of SELECT and UNSELECT events
[wxWidgets.git] / docs / latex / wx / richtextstylesheet.tex
1 \section{\class{wxRichTextStyleSheet}}\label{wxrichtextstylesheet}
2
3 A style sheet contains named paragraph and character styles that make it
4 easy for a user to apply combinations of attributes to a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
5
6 You can use a \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox} in your
7 user interface to show available styles to the user, and allow application
8 of styles to the control.
9
10 \wxheading{Derived from}
11
12 \helpref{wxObject}{wxobject}
13
14 \wxheading{Include files}
15
16 <wx/richtext/richtextstyles.h>
17
18 \wxheading{Library}
19
20 \helpref{wxRichtext}{librarieslist}
21
22 \wxheading{Data structures}
23
24 \latexignore{\rtfignore{\wxheading{Members}}}
25
26 \membersection{wxRichTextStyleSheet::wxRichTextStyleSheet}\label{wxrichtextstylesheetwxrichtextstylesheet}
27
28 \func{}{wxRichTextStyleSheet}{\void}
29
30 Constructor.
31
32 \membersection{wxRichTextStyleSheet::\destruct{wxRichTextStyleSheet}}\label{wxrichtextstylesheetdtor}
33
34 \func{}{\destruct{wxRichTextStyleSheet}}{\void}
35
36 Destructor.
37
38 \membersection{wxRichTextStyleSheet::AddCharacterStyle}\label{wxrichtextstylesheetaddcharacterstyle}
39
40 \func{bool}{AddCharacterStyle}{\param{wxRichTextCharacterStyleDefinition* }{def}}
41
42 Adds a definition to the character style list.
43
44 \membersection{wxRichTextStyleSheet::AddListStyle}\label{wxrichtextstylesheetaddliststyle}
45
46 \func{bool}{AddListStyle}{\param{wxRichTextListStyleDefinition* }{def}}
47
48 Adds a definition to the list style list.
49
50 \membersection{wxRichTextStyleSheet::AddParagraphStyle}\label{wxrichtextstylesheetaddparagraphstyle}
51
52 \func{bool}{AddParagraphStyle}{\param{wxRichTextParagraphStyleDefinition* }{def}}
53
54 Adds a definition to the paragraph style list.
55
56 \membersection{wxRichTextStyleSheet::AddStyle}\label{wxrichtextstylesheetaddstyle}
57
58 \func{bool}{AddStyle}{\param{wxRichTextStyleDefinition* }{def}}
59
60 Adds a definition to the appropriate style list.
61
62 \membersection{wxRichTextStyleSheet::DeleteStyles}\label{wxrichtextstylesheetdeletestyles}
63
64 \func{void}{DeleteStyles}{\void}
65
66 Deletes all styles.
67
68 \membersection{wxRichTextStyleSheet::FindCharacterStyle}\label{wxrichtextstylesheetfindcharacterstyle}
69
70 \constfunc{wxRichTextCharacterStyleDefinition*}{FindCharacterStyle}{\param{const wxString\& }{name}}
71
72 Finds a character definition by name.
73
74 \membersection{wxRichTextStyleSheet::FindListStyle}\label{wxrichtextstylesheetfindliststyle}
75
76 \constfunc{wxRichTextListStyleDefinition*}{FindListStyle}{\param{const wxString\& }{name}}
77
78 Finds a list definition by name.
79
80 \membersection{wxRichTextStyleSheet::FindParagraphStyle}\label{wxrichtextstylesheetfindparagraphstyle}
81
82 \constfunc{wxRichTextParagraphStyleDefinition*}{FindParagraphStyle}{\param{const wxString\& }{name}}
83
84 Finds a paragraph definition by name.
85
86 \membersection{wxRichTextStyleSheet::FindStyle}\label{wxrichtextstylesheetfindstyle}
87
88 \constfunc{wxRichTextStyleDefinition*}{FindStyle}{\param{const wxString\& }{name}}
89
90 Finds a style definition by name.
91
92 \membersection{wxRichTextStyleSheet::GetCharacterStyle}\label{wxrichtextstylesheetgetcharacterstyle}
93
94 \constfunc{wxRichTextCharacterStyleDefinition*}{GetCharacterStyle}{\param{size\_t }{n}}
95
96 Returns the {\it n}th character style.
97
98 \membersection{wxRichTextStyleSheet::GetCharacterStyleCount}\label{wxrichtextstylesheetgetcharacterstylecount}
99
100 \constfunc{size\_t}{GetCharacterStyleCount}{\void}
101
102 Returns the number of character styles.
103
104 \membersection{wxRichTextStyleSheet::GetDescription}\label{wxrichtextstylesheetgetdescription}
105
106 \constfunc{const wxString\&}{GetDescription}{\void}
107
108 Returns the style sheet's description.
109
110 \membersection{wxRichTextStyleSheet::GetListStyle}\label{wxrichtextstylesheetgetliststyle}
111
112 \constfunc{wxRichTextListStyleDefinition*}{GetListStyle}{\param{size\_t }{n}}
113
114 Returns the {\it n}th list style.
115
116 \membersection{wxRichTextStyleSheet::GetListStyleCount}\label{wxrichtextstylesheetgetliststylecount}
117
118 \constfunc{size\_t}{GetListStyleCount}{\void}
119
120 Returns the number of list styles.
121
122 \membersection{wxRichTextStyleSheet::GetName}\label{wxrichtextstylesheetgetname}
123
124 \constfunc{const wxString\&}{GetName}{\void}
125
126 Returns the style sheet's name.
127
128 \membersection{wxRichTextStyleSheet::GetParagraphStyle}\label{wxrichtextstylesheetgetparagraphstyle}
129
130 \constfunc{wxRichTextParagraphStyleDefinition*}{GetParagraphStyle}{\param{size\_t }{n}}
131
132 Returns the {\it n}th paragraph style.
133
134 \membersection{wxRichTextStyleSheet::GetParagraphStyleCount}\label{wxrichtextstylesheetgetparagraphstylecount}
135
136 \constfunc{size\_t}{GetParagraphStyleCount}{\void}
137
138 Returns the number of paragraph styles.
139
140 \membersection{wxRichTextStyleSheet::RemoveCharacterStyle}\label{wxrichtextstylesheetremovecharacterstyle}
141
142 \func{bool}{RemoveCharacterStyle}{\param{wxRichTextStyleDefinition* }{def}, \param{bool }{deleteStyle = false}}
143
144 Removes a character style.
145
146 \membersection{wxRichTextStyleSheet::RemoveListStyle}\label{wxrichtextstylesheetremoveliststyle}
147
148 \func{bool}{RemoveListStyle}{\param{wxRichTextStyleDefinition* }{def}, \param{bool }{deleteStyle = false}}
149
150 Removes a list style.
151
152 \membersection{wxRichTextStyleSheet::RemoveParagraphStyle}\label{wxrichtextstylesheetremoveparagraphstyle}
153
154 \func{bool}{RemoveParagraphStyle}{\param{wxRichTextStyleDefinition* }{def}, \param{bool }{deleteStyle = false}}
155
156 Removes a paragraph style.
157
158 \membersection{wxRichTextStyleSheet::RemoveStyle}\label{wxrichtextstylesheetremovestyle}
159
160 \func{bool}{RemoveStyle}{\param{wxRichTextStyleDefinition* }{def}, \param{bool }{deleteStyle = false}}
161
162 Removes a style.
163
164 \membersection{wxRichTextStyleSheet::SetDescription}\label{wxrichtextstylesheetsetdescription}
165
166 \func{void}{SetDescription}{\param{const wxString\& }{descr}}
167
168 Sets the style sheet's description.
169
170 \membersection{wxRichTextStyleSheet::SetName}\label{wxrichtextstylesheetsetname}
171
172 \func{void}{SetName}{\param{const wxString\& }{name}}
173
174 Sets the style sheet's name.
175