X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1560fa6df2c2d3bbba95250c838d1b540e7e535..032bc940fcde34cc649eaa111cd6aff1cda66104:/src/generic/htmllbox.cpp diff --git a/src/generic/htmllbox.cpp b/src/generic/htmllbox.cpp index b104f3c2f5..c034af5f20 100644 --- a/src/generic/htmllbox.cpp +++ b/src/generic/htmllbox.cpp @@ -46,6 +46,9 @@ FORCE_WXHTML_MODULES() // small border always added to the cells: static const wxCoord CELL_BORDER = 2; +const wxChar wxHtmlListBoxNameStr[] = wxT("htmlListBox"); +const wxChar wxSimpleHtmlListBoxNameStr[] = wxT("simpleHtmlListBox"); + // ============================================================================ // private classes // ============================================================================ @@ -402,6 +405,13 @@ void wxHtmlListBox::OnHTMLLinkClicked(const wxHtmlLinkInfo& link) OnLinkClicked(GetItemForCell(link.GetHtmlCell()), link); } +void wxHtmlListBox::OnLinkClicked(size_t WXUNUSED(n), + const wxHtmlLinkInfo& link) +{ + wxHtmlLinkEvent event(GetId(), link); + GetEventHandler()->ProcessEvent(event); +} + wxHtmlOpeningStatus wxHtmlListBox::OnHTMLOpeningURL(wxHtmlURLType WXUNUSED(type), const wxString& WXUNUSED(url), @@ -541,4 +551,131 @@ void wxHtmlListBox::OnLeftDown(wxMouseEvent& event) } } + +// ---------------------------------------------------------------------------- +// wxSimpleHtmlListBox +// ---------------------------------------------------------------------------- + +bool wxSimpleHtmlListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + if (!wxHtmlListBox::Create(parent, id, pos, size, style, name)) + return false; + + SetValidator(validator); + for (int i=0; iIsFrozen()) + RefreshAll(); +} + #endif // wxUSE_HTML