X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50415ad7eebd3399fc06417a8eb427324978a13a..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/html/helpwnd.cpp diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp index 17a376198b..5e652bb703 100644 --- a/src/html/helpwnd.cpp +++ b/src/html/helpwnd.cpp @@ -19,7 +19,7 @@ #if wxUSE_WXHTML_HELP -#ifndef WXPRECOMP +#ifndef WX_PRECOMP #include "wx/object.h" #include "wx/dynarray.h" #include "wx/intl.h" @@ -40,7 +40,7 @@ #include "wx/toolbar.h" #include "wx/choicdlg.h" #include "wx/filedlg.h" -#endif // WXPRECOMP +#endif // WX_PRECOMP #include "wx/html/helpfrm.h" #include "wx/html/helpdlg.h" @@ -108,8 +108,9 @@ class wxHtmlHelpHashData : public wxObject class wxHtmlHelpHtmlWindow : public wxHtmlWindow { public: - wxHtmlHelpHtmlWindow(wxHtmlHelpWindow *win, wxWindow *parent) - : wxHtmlWindow(parent), m_Window(win) + wxHtmlHelpHtmlWindow(wxHtmlHelpWindow *win, wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxHW_DEFAULT_STYLE) + : wxHtmlWindow(parent, id, pos, sz, style), m_Window(win) { SetStandardFonts(); } @@ -361,6 +362,14 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, wxSizer *navigSizer = NULL; +#ifdef __WXMSW__ + wxBorder htmlWindowBorder = GetDefaultBorder(); + if (htmlWindowBorder == wxBORDER_SUNKEN) + htmlWindowBorder = wxBORDER_SIMPLE; +#else + wxBorder htmlWindowBorder = wxBORDER_SIMPLE; +#endif + if (helpStyle & (wxHF_CONTENTS | wxHF_INDEX | wxHF_SEARCH)) { // traditional help controller; splitter window with html page on the @@ -369,10 +378,13 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, topWindowSizer->Add(m_Splitter, 1, wxEXPAND); - m_HtmlWin = new wxHtmlHelpHtmlWindow(this, m_Splitter); + m_HtmlWin = new wxHtmlHelpHtmlWindow(this, m_Splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_DEFAULT_STYLE|htmlWindowBorder); m_NavigPan = new wxPanel(m_Splitter, wxID_ANY); m_NavigNotebook = new wxNotebook(m_NavigPan, wxID_HTML_NOTEBOOK, wxDefaultPosition, wxDefaultSize); +#ifdef __WXMAC__ + m_NavigNotebook->SetWindowVariant(wxWINDOW_VARIANT_SMALL); +#endif navigSizer = new wxBoxSizer(wxVERTICAL); navigSizer->Add(m_NavigNotebook, 1, wxEXPAND); @@ -382,7 +394,7 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, else { // only html window, no notebook with index,contents etc - m_HtmlWin = new wxHtmlWindow(this); + m_HtmlWin = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_DEFAULT_STYLE|htmlWindowBorder); topWindowSizer->Add(m_HtmlWin, 1, wxEXPAND); } @@ -393,6 +405,9 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, if ( helpStyle & wxHF_CONTENTS ) { wxWindow *dummy = new wxPanel(m_NavigNotebook, wxID_HTML_INDEXPAGE); +#ifdef __WXMAC__ + dummy->SetWindowVariant(wxWINDOW_VARIANT_NORMAL); +#endif wxSizer *topsizer = new wxBoxSizer(wxVERTICAL); topsizer->Add(0, 10); @@ -458,6 +473,9 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, if ( helpStyle & wxHF_INDEX ) { wxWindow *dummy = new wxPanel(m_NavigNotebook, wxID_HTML_INDEXPAGE); +#ifdef __WXMAC__ + dummy->SetWindowVariant(wxWINDOW_VARIANT_NORMAL); +#endif wxSizer *topsizer = new wxBoxSizer(wxVERTICAL); dummy->SetSizer(topsizer); @@ -498,6 +516,9 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, if ( helpStyle & wxHF_SEARCH ) { wxWindow *dummy = new wxPanel(m_NavigNotebook, wxID_HTML_INDEXPAGE); +#ifdef __WXMAC__ + dummy->SetWindowVariant(wxWINDOW_VARIANT_NORMAL); +#endif wxSizer *sizer = new wxBoxSizer(wxVERTICAL); dummy->SetSizer(sizer);