1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxHtmlListBox documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxHtmlListBox
}}\label{wxhtmllistbox
}
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.
20 \wxheading{Derived from
}
22 \helpref{wxVListBox
}{wxvlistbox
}\\
23 \helpref{wxVScrolledWindow
}{wxvscrolledwindow
}\\
24 \helpref{wxPanel
}{wxpanel
}\\
25 \helpref{wxWindow
}{wxwindow
}\\
26 \helpref{wxEvtHandler
}{wxevthandler
}\\
27 \helpref{wxObject
}{wxobject
}
29 \wxheading{Include files
}
34 \latexignore{\rtfignore{\wxheading{Members
}}}
37 \membersection{wxHtmlListBox::wxHtmlListBox
}\label{wxhtmllistboxwxhtmllistbox
}
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
}}
41 Normal constructor which calls
\helpref{Create()
}{wxhtmllistboxcreate
}
44 \func{}{wxHtmlListBox
}{\void}
46 Default constructor, you must call
\helpref{Create()
}{wxhtmllistboxcreate
}
50 \membersection{wxHtmlListBox::
\destruct{wxHtmlListBox
}}\label{wxhtmllistboxdtor
}
52 \func{}{\destruct{wxHtmlListBox
}}{\void}
54 Destructor cleans up whatever resources we use.
57 \membersection{wxHtmlListBox::Create
}\label{wxhtmllistboxcreate
}
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
}}
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
}).
65 There are no special styles defined for wxHtmlListBox, in particular the
66 wxListBox styles can not be used here.
68 Returns
{\tt true
} on success or
{\tt false
} if the control couldn't be created
71 \membersection{wxHtmlListBox::GetFileSystem
}\label{wxhtmllistboxgetfilesystem
}
73 \func{wxFileSystem\&
}{GetFileSystem
}{\void}
75 \constfunc{const wxFileSystem\&
}{GetFileSystem
}{\void}
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.
84 \membersection{wxHtmlListBox::GetSelectedTextBgColour
}\label{wxhtmllistboxgetselectedtextbgcolour
}
86 \constfunc{wxColour
}{GetSelectedTextBgColour
}{\param{const wxColour\&
}{colBg
}}
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
}.
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.
99 \helpref{GetSelectedTextColour
}{wxhtmllistboxgetselectedtextcolour
}
102 \membersection{wxHtmlListBox::GetSelectedTextColour
}\label{wxhtmllistboxgetselectedtextcolour
}
104 \constfunc{wxColour
}{GetSelectedTextColour
}{\param{const wxColour\&
}{colFg
}}
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.
114 \helpref{GetSelectedTextBgColour
}{wxhtmllistboxgetselectedtextbgcolour
},\\
115 \helpref{SetSelectionBackground
}{wxvlistboxsetselectionbackground
},\\
116 \helpref{wxSystemSettings::GetColour
}{wxsystemsettingsgetcolour
}
119 \membersection{wxHtmlListBox::OnGetItem
}\label{wxhtmllistboxongetitem
}
121 \constfunc{wxString
}{OnGetItem
}{\param{size
\_t }{n
}}
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
128 \membersection{wxHtmlListBox::OnGetItemMarkup
}\label{wxhtmllistboxongetitemmarkup
}
130 \constfunc{wxString
}{OnGetItemMarkup
}{\param{size
\_t }{n
}}
132 This function may be overridden to decorate HTML returned by
133 \helpref{OnGetItem()
}{wxhtmllistboxongetitem
}.
135 \membersection{wxHtmlListBox::OnLinkClicked
}\label{wxhtmlistboxonlinkclicked
}
137 \func{virtual void
}{OnLinkClicked
}{\param{size
\_t }{n
},
\param{const wxHtmlLinkInfo\&
}{link
}}
139 Called when the user clicks on hypertext link. Does nothing by default.
141 \wxheading{Parameters
}
143 \docparam{n
}{Index of the item containing the link.
}
145 \docparam{link
}{Description of the link.
}
149 See also
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
}.