X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96873b794c62afc3fd6f2db5859bc20675fd2c51..e02e8816c7a9be2082f914f6d53fcdba0d7d5416:/src/html/helpfrm.cpp?ds=sidebyside diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index e188cb800d..f35c4ce23b 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -55,24 +55,28 @@ // Bitmaps: #ifndef __WXMSW__ -#include "bitmaps/wpanel.xpm" -#include "bitmaps/wback.xpm" -#include "bitmaps/wforward.xpm" -#include "bitmaps/wbook.xpm" -#include "bitmaps/woptions.xpm" -#include "bitmaps/wfolder.xpm" -#include "bitmaps/wpage.xpm" -#include "bitmaps/whelp.xpm" -#include "bitmaps/whlproot.xpm" -#include "bitmaps/wbkadd.xpm" -#include "bitmaps/wbkdel.xpm" -#include "bitmaps/wup.xpm" -#include "bitmaps/wupnode.xpm" -#include "bitmaps/wdown.xpm" -#include "bitmaps/wopen.xpm" -#include "bitmaps/wprint.xpm" -#endif - + // XPM hack: make the arrays const + #define static static const + + #include "bitmaps/wpanel.xpm" + #include "bitmaps/wback.xpm" + #include "bitmaps/wforward.xpm" + #include "bitmaps/wbook.xpm" + #include "bitmaps/woptions.xpm" + #include "bitmaps/wfolder.xpm" + #include "bitmaps/wpage.xpm" + #include "bitmaps/whelp.xpm" + #include "bitmaps/whlproot.xpm" + #include "bitmaps/wbkadd.xpm" + #include "bitmaps/wbkdel.xpm" + #include "bitmaps/wup.xpm" + #include "bitmaps/wupnode.xpm" + #include "bitmaps/wdown.xpm" + #include "bitmaps/wopen.xpm" + #include "bitmaps/wprint.xpm" + + #undef static +#endif // __WXMSW__ // what is considered "small index"? #define INDEX_IS_SMALL 100 @@ -304,6 +308,11 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, if (style & wxHF_CONTENTS) { wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE); + + long treeStyle = wxSUNKEN_BORDER | wxTR_HAS_BUTTONS; + #ifndef __WXMSW__ // FIXME - temporary, till MSW supports wxTR_HIDE_ROOT + treeStyle |= wxTR_HIDE_ROOT; + #endif if (style & wxHF_BOOKMARKS) { @@ -347,9 +356,8 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, wxLayoutConstraints *b4 = new wxLayoutConstraints; m_ContentsBox = new wxTreeCtrl(dummy, wxID_HTML_TREECTRL, - wxDefaultPosition, wxDefaultSize, - wxSUNKEN_BORDER | - wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT); + wxDefaultPosition, wxDefaultSize, + treeStyle); m_ContentsBox->AssignImageList(ContentsImageList); b4->top.Below (m_Bookmarks, 10); @@ -368,7 +376,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, { m_ContentsBox = new wxTreeCtrl(m_NavigPan, wxID_HTML_TREECTRL, wxDefaultPosition, wxDefaultSize, - wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS | wxSUNKEN_BORDER); + treeStyle); m_ContentsBox->AssignImageList(ContentsImageList); m_NavigPan->AddPage(m_ContentsBox, _("Contents")); }