X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ba80ec7ff939780e7103d0beee429db9ddb4430..617ec45690c340d059726a09ccfe4bab9a42d82e:/src/generic/helpwxht.cpp diff --git a/src/generic/helpwxht.cpp b/src/generic/helpwxht.cpp index 66e90901e2..f4ca7a115e 100644 --- a/src/generic/helpwxht.cpp +++ b/src/generic/helpwxht.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: helpext.cpp -// Purpose: an external help controller for wxWindows +// Name: helpwxht.cpp +// Purpose: A help controller using the wxHTML classes // Author: Karsten Ballueder // Modified by: // Created: 04/01/98 @@ -27,6 +27,7 @@ # include "wx/list.h" # include "wx/intl.h" # include "wx/layout.h" +# include "wx/combobox.h" #endif #include "wx/helpbase.h" @@ -35,9 +36,11 @@ #include #include +#ifndef __MWERKS__ #include +#endif -#ifndef __WINDOWS__ +#if !defined(__WINDOWS__) && !defined(__OS2__) # include #endif @@ -52,7 +55,7 @@ IMPLEMENT_CLASS(wxHelpControllerHtml, wxHTMLHelpControllerBase) class wxForceHtmlFilter : public wxHtmlFilter { public: - virtual wxString ReadFile(const wxFSFile& file) + virtual wxString ReadFile(const wxFSFile& file) const { wxInputStream *s = file.GetStream(); char *src; @@ -66,8 +69,8 @@ public: delete [] src; return doc; } - - virtual bool CanRead(const wxFSFile& file) + + virtual bool CanRead(const wxFSFile& file) const { wxString filename = file.GetLocation(); if(filename.Length() >= 5 && @@ -155,7 +158,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id, wxButton *btn_contents = new wxButton(this, m_IdContents, _("Contents")); m_combo = new wxComboBox(this, m_IdCombo); wxButton *btn_search = new wxButton(this, m_IdSearch, _("Search")); - + m_filter = new wxForceHtmlFilter; wxLayoutConstraints *c; @@ -173,7 +176,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id, c->top.SameAs(this, wxTop, 2*LAYOUT_Y_MARGIN); c->height.AsIs(); btn_fwd->SetConstraints(c); - + c = new wxLayoutConstraints; c->left.SameAs(btn_fwd, wxRight, 2*LAYOUT_X_MARGIN); c->width.Absolute(BUTTON_WIDTH); @@ -204,7 +207,7 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id, m_htmlwin->SetConstraints(c); SetAutoLayout(TRUE); CreateStatusBar(); - + m_htmlwin->SetRelatedFrame(this, title); m_htmlwin->SetRelatedStatusBar(0); m_htmlwin->AddFilter(m_filter); @@ -217,7 +220,7 @@ wxHelpFrame::~wxHelpFrame() } void -wxHelpFrame::OnClose(wxCloseEvent &ev) +wxHelpFrame::OnClose(wxCloseEvent &WXUNUSED(ev)) { wxASSERT(m_controller); m_controller->m_Frame = NULL; @@ -294,9 +297,9 @@ wxHelpControllerHtml::SetFrameParameters(const wxString &title, } wxFrame * -wxHelpControllerHtml::GetFrameParameters(wxSize *size = NULL, - wxPoint *pos = NULL, - bool *newframe = NULL) +wxHelpControllerHtml::GetFrameParameters(wxSize *size, + wxPoint *pos, + bool *newframe) { if(size) *size = m_FrameSize; if(pos) *pos = m_FramePosition;