]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/htmllbox.tex
[ 1553595 ] Doc error: wxView::OnDraw
[wxWidgets.git] / docs / latex / wx / htmllbox.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: htmllbox.tex
3 %% Purpose: wxHtmlListBox documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 01.06.03
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxHtmlListBox}}\label{wxhtmllistbox}
13
14 wxHtmlListBox is an implementation of \helpref{wxVListBox}{wxvlistbox} which
15 shows HTML content in the listbox rows. This is still an abstract base class
16 and you will need to derive your own class from it (see htlbox sample for the
17 example) but you will only need to override a single
18 \helpref{OnGetItem()}{wxhtmllistboxongetitem} function.
19
20 \wxheading{Derived from}
21
22 \helpref{wxVListBox}{wxvlistbox}\\
23 \helpref{wxVScrolledWindow}{wxvscrolledwindow}\\
24 \helpref{wxPanel}{wxpanel}\\
25 \helpref{wxWindow}{wxwindow}\\
26 \helpref{wxEvtHandler}{wxevthandler}\\
27 \helpref{wxObject}{wxobject}
28
29 \wxheading{Include files}
30
31 <wx/htmllbox.h>
32
33
34 \latexignore{\rtfignore{\wxheading{Members}}}
35
36
37 \membersection{wxHtmlListBox::wxHtmlListBox}\label{wxhtmllistboxwxhtmllistbox}
38
39 \func{}{wxHtmlListBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxVListBoxNameStr}}
40
41 Normal constructor which calls \helpref{Create()}{wxhtmllistboxcreate}
42 internally.
43
44 \func{}{wxHtmlListBox}{\void}
45
46 Default constructor, you must call \helpref{Create()}{wxhtmllistboxcreate}
47 later.
48
49
50 \membersection{wxHtmlListBox::\destruct{wxHtmlListBox}}\label{wxhtmllistboxdtor}
51
52 \func{}{\destruct{wxHtmlListBox}}{\void}
53
54 Destructor cleans up whatever resources we use.
55
56
57 \membersection{wxHtmlListBox::Create}\label{wxhtmllistboxcreate}
58
59 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxVListBoxNameStr}}
60
61 Creates the control and optionally sets the initial number of items in it
62 (it may also be set or changed later with
63 \helpref{SetItemCount()}{wxvlistboxsetitemcount}).
64
65 There are no special styles defined for wxHtmlListBox, in particular the
66 wxListBox styles can not be used here.
67
68 Returns {\tt true} on success or {\tt false} if the control couldn't be created
69
70
71 \membersection{wxHtmlListBox::GetFileSystem}\label{wxhtmllistboxgetfilesystem}
72
73 \func{wxFileSystem\&}{GetFileSystem}{\void}
74
75 \constfunc{const wxFileSystem\&}{GetFileSystem}{\void}
76
77 Returns the \helpref{wxFileSystem}{wxfilesystem} used by the HTML parser of
78 this object. The file system object is used to resolve the paths in HTML
79 fragments displayed in the control and you should use
80 \helpref{wxFileSystem::ChangePathTo}{wxfilesystemchangepathto} if you use
81 relative paths for the images or other resources embedded in your HTML.
82
83
84 \membersection{wxHtmlListBox::GetSelectedTextBgColour}\label{wxhtmllistboxgetselectedtextbgcolour}
85
86 \constfunc{wxColour}{GetSelectedTextBgColour}{\param{const wxColour\& }{colBg}}
87
88 This virtual function may be overridden to change the appearance of the
89 background of the selected cells in the same way as
90 \helpref{GetSelectedTextColour}{wxhtmllistboxgetselectedtextcolour}.
91
92 It should be rarely, if ever, used because
93 \helpref{SetSelectionBackground}{wxvlistboxsetselectionbackground} allows to
94 change the selection background for all cells at once and doing anything more
95 fancy is probably going to look strangely.
96
97 \wxheading{See also}
98
99 \helpref{GetSelectedTextColour}{wxhtmllistboxgetselectedtextcolour}
100
101
102 \membersection{wxHtmlListBox::GetSelectedTextColour}\label{wxhtmllistboxgetselectedtextcolour}
103
104 \constfunc{wxColour}{GetSelectedTextColour}{\param{const wxColour\& }{colFg}}
105
106 This virtual function may be overridden to customize the appearance of the
107 selected cells. It is used to determine how the colour {\it colFg} is going to
108 look inside selection. By default all original colours are completely ignored
109 and the standard, system-dependent, selection colour is used but the program
110 may wish to override this to achieve some custom appearance.
111
112 \wxheading{See also}
113
114 \helpref{GetSelectedTextBgColour}{wxhtmllistboxgetselectedtextbgcolour},\\
115 \helpref{SetSelectionBackground}{wxvlistboxsetselectionbackground},\\
116 \helpref{wxSystemSettings::GetColour}{wxsystemsettingsgetcolour}
117
118
119 \membersection{wxHtmlListBox::OnGetItem}\label{wxhtmllistboxongetitem}
120
121 \constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
122
123 This method must be implemented in the derived class and should return
124 the body (i.e. without {\tt <html>} nor {\tt <body>} tags) of the HTML fragment
125 for the given item.
126
127
128 \membersection{wxHtmlListBox::OnGetItemMarkup}\label{wxhtmllistboxongetitemmarkup}
129
130 \constfunc{wxString}{OnGetItemMarkup}{\param{size\_t }{n}}
131
132 This function may be overridden to decorate HTML returned by
133 \helpref{OnGetItem()}{wxhtmllistboxongetitem}.
134
135 \membersection{wxHtmlListBox::OnLinkClicked}\label{wxhtmlistboxonlinkclicked}
136
137 \func{virtual void}{OnLinkClicked}{\param{size\_t }{n}, \param{const wxHtmlLinkInfo\& }{link}}
138
139 Called when the user clicks on hypertext link. Does nothing by default.
140
141 \wxheading{Parameters}
142
143 \docparam{n}{Index of the item containing the link.}
144
145 \docparam{link}{Description of the link.}
146
147 \wxheading{See also}
148
149 See also \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.