]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/richtextstylelistbox.tex
Always draw the selection of selected items, not just when they have
[wxWidgets.git] / docs / latex / wx / richtextstylelistbox.tex
1 \section{\class{wxRichTextStyleComboCtrl}}\label{wxrichtextstylecomboctrl}
2
3 This is a combo control that can display the styles in a \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet},
4 and apply the selection to an associated \helpref{wxRichTextCtrl}{wxrichtextctrl}.
5
6 See {\tt samples/richtext} for an example of how to use it.
7
8 \wxheading{Derived from}
9
10 \helpref{wxComboCtrl}{wxcomboctrl}
11
12 \wxheading{Include files}
13
14 <wx/richtext/richtextstyles.h>
15
16 \wxheading{See also}
17
18 \helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox}, \helpref{wxRichTextCtrl overview}{wxrichtextctrloverview}
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 \membersection{wxRichTextStyleComboCtrl::wxRichTextStyleComboCtrl}\label{wxrichtextstylecomboctrlwxrichtextstylecomboctrl}
23
24 \func{}{wxRichTextStyleComboCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
25
26 Constructor.
27
28 \membersection{wxRichTextStyleComboCtrl::\destruct{wxRichTextStyleComboCtrl}}\label{wxrichtextstylecomboctrldtor}
29
30 \func{}{\destruct{wxRichTextStyleComboCtrl}}{\void}
31
32 Destructor.
33
34 \membersection{wxRichTextStyleComboCtrl::GetRichTextCtrl}\label{wxrichtextstylecomboctrlgetrichtextctrl}
35
36 \constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
37
38 Returns the \helpref{wxRichTextCtrl}{wxrichtextctrl} associated with this control.
39
40 \membersection{wxRichTextStyleComboCtrl::GetStyleSheet}\label{wxrichtextstylecomboctrlgetstylesheet}
41
42 \constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
43
44 Returns the style sheet associated with this control.
45
46 \membersection{wxRichTextStyleComboCtrl::SetRichTextCtrl}\label{wxrichtextstylecomboctrlsetrichtextctrl}
47
48 \func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
49
50 Associates the control with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
51
52 \membersection{wxRichTextStyleComboCtrl::SetStyleSheet}\label{wxrichtextstylecomboctrlsetstylesheet}
53
54 \func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
55
56 Associates the control with a style sheet.
57
58 \membersection{wxRichTextStyleComboCtrl::UpdateStyles}\label{wxrichtextstylecomboctrlupdatestyles}
59
60 \func{void}{UpdateStyles}{\void}
61
62 Updates the combo control from the associated style sheet.
63
64
65 \section{\class{wxRichTextStyleListBox}}\label{wxrichtextstylelistbox}
66
67 This is a listbox that can display the styles in a \helpref{wxRichTextStyleSheet}{wxrichtextstylesheet},
68 and apply the selection to an associated \helpref{wxRichTextCtrl}{wxrichtextctrl}.
69
70 See {\tt samples/richtext} for an example of how to use it.
71
72 \wxheading{Derived from}
73
74 \helpref{wxHtmlListBox}{wxhtmllistbox}
75
76 \wxheading{Include files}
77
78 <wx/richtext/richtextstyles.h>
79
80 \wxheading{See also}
81
82 \helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl}, \helpref{wxRichTextCtrl overview}{wxrichtextctrloverview}
83
84 \latexignore{\rtfignore{\wxheading{Members}}}
85
86 \membersection{wxRichTextStyleListBox::wxRichTextStyleListBox}\label{wxrichtextstylelistboxwxrichtextstylelistbox}
87
88 \func{}{wxRichTextStyleListBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
89
90 Constructor.
91
92 \membersection{wxRichTextStyleListBox::\destruct{wxRichTextStyleListBox}}\label{wxrichtextstylelistboxdtor}
93
94 \func{}{\destruct{wxRichTextStyleListBox}}{\void}
95
96 Destructor.
97
98 \membersection{wxRichTextStyleListBox::ApplyStyle}\label{wxrichtextstylelistboxapplystyle}
99
100 \func{void}{ApplyStyle}{\param{int }{i}}
101
102 Applies the {\it i}th style to the associated rich text control.
103
104 \membersection{wxRichTextStyleListBox::ConvertTenthsMMToPixels}\label{wxrichtextstylelistboxconverttenthsmmtopixels}
105
106 \constfunc{int}{ConvertTenthsMMToPixels}{\param{wxDC\& }{dc}, \param{int }{units}}
107
108 Converts units in tenths of a millimetre to device units.
109
110 \membersection{wxRichTextStyleListBox::CreateHTML}\label{wxrichtextstylelistboxcreatehtml}
111
112 \constfunc{wxString}{CreateHTML}{\param{wxRichTextStyleDefinition* }{def}}
113
114 Creates a suitable HTML fragment for a definition.
115
116 \membersection{wxRichTextStyleListBox::GetApplyOnSelection}\label{wxrichtextstylelistboxgetapplyonselection}
117
118 \constfunc{bool}{GetApplyOnSelection}{\void}
119
120 If the return value is \true, clicking on a style name in the list will immediately
121 apply the style to the associated rich text control.
122
123 \membersection{wxRichTextStyleListBox::GetRichTextCtrl}\label{wxrichtextstylelistboxgetrichtextctrl}
124
125 \constfunc{wxRichTextCtrl*}{GetRichTextCtrl}{\void}
126
127 Returns the \helpref{wxRichTextCtrl}{wxrichtextctrl} associated with this listbox.
128
129 \membersection{wxRichTextStyleListBox::GetStyle}\label{wxrichtextstylelistboxgetstyle}
130
131 \constfunc{wxRichTextStyleDefinition*}{GetStyle}{\param{size\_t }{i}}
132
133 Gets a style for a listbox index.
134
135 \membersection{wxRichTextStyleListBox::GetStyleSheet}\label{wxrichtextstylelistboxgetstylesheet}
136
137 \constfunc{wxRichTextStyleSheet*}{GetStyleSheet}{\void}
138
139 Returns the style sheet associated with this listbox.
140
141 \membersection{wxRichTextStyleListBox::OnGetItem}\label{wxrichtextstylelistboxongetitem}
142
143 \constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
144
145 Returns the HTML for this item.
146
147 \membersection{wxRichTextStyleListBox::OnLeftDown}\label{wxrichtextstylelistboxonleftdown}
148
149 \func{void}{OnLeftDown}{\param{wxMouseEvent\& }{event}}
150
151 Implements left click behaviour, applying the clicked style to the wxRichTextCtrl.
152
153 \membersection{wxRichTextStyleListBox::OnSelect}\label{wxrichtextstylelistboxonselect}
154
155 \func{void}{OnSelect}{\param{wxCommandEvent\& }{event}}
156
157 Reacts to selection.
158
159 \membersection{wxRichTextStyleListBox::SetApplyOnSelection}\label{wxrichtextstylelistboxsetapplyonselection}
160
161 \func{void}{SetApplyOnSelection}{\param{bool }{applyOnSelection}}
162
163 If {\it applyOnSelection} is \true, clicking on a style name in the list will immediately
164 apply the style to the associated rich text control.
165
166 \membersection{wxRichTextStyleListBox::SetRichTextCtrl}\label{wxrichtextstylelistboxsetrichtextctrl}
167
168 \func{void}{SetRichTextCtrl}{\param{wxRichTextCtrl* }{ctrl}}
169
170 Associates the listbox with a \helpref{wxRichTextCtrl}{wxrichtextctrl}.
171
172 \membersection{wxRichTextStyleListBox::SetStyleSheet}\label{wxrichtextstylelistboxsetstylesheet}
173
174 \func{void}{SetStyleSheet}{\param{wxRichTextStyleSheet* }{styleSheet}}
175
176 Associates the control with a style sheet.
177
178 \membersection{wxRichTextStyleListBox::UpdateStyles}\label{wxrichtextstylelistboxupdatestyles}
179
180 \func{void}{UpdateStyles}{\void}
181
182 Updates the list from the associated style sheet.
183