]> git.saurik.com Git - wxWidgets.git/commitdiff
html help : added '?' icon to root node of contents panel
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 6 Nov 1999 15:40:35 +0000 (15:40 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 6 Nov 1999 15:40:35 +0000 (15:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/html/helpfrm.h
src/html/bitmaps/helproot.xpm [new file with mode: 0644]
src/html/helpfrm.cpp

index ed8e493b5994c8b3e3a6d5e88ae59525efa30db9..79fc39960db3f4ef80736964c572f2f2838e1fa5 100644 (file)
@@ -151,7 +151,8 @@ class WXDLLEXPORT wxHtmlHelpFrame : public wxFrame
         enum {
             IMG_Book = 0,
             IMG_Folder,
-            IMG_Page
+            IMG_Page,
+            IMG_RootFolder
         };
 
     protected:
diff --git a/src/html/bitmaps/helproot.xpm b/src/html/bitmaps/helproot.xpm
new file mode 100644 (file)
index 0000000..263c2d2
--- /dev/null
@@ -0,0 +1,27 @@
+/* XPM */
+static char *helproot_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 5 1",
+"  c Gray0",
+". c #808000000000",
+"X c #808080800000",
+"o c Yellow",
+"O c None",
+/* pixels */
+"OOOOOO    OOOOOO",
+"OOOO  oooo .OOOO",
+"OOO oooooooo OOO",
+"OO  oooXXooo OOO",
+"OO oooXOOXooo OO",
+"OO     OOXooo OO",
+"OOOOOOOO  ooo OO",
+"OOOOOOO  ooo OOO",
+"OOOOOO oooo OOOO",
+"OOOOO oooo OOOOO",
+"OOOOO      OOOOO",
+"OOOOOOOOOOOOOOOO",
+"OOOOO      OOOOO",
+"OOOOO oooo OOOOO",
+"OOOOO oooo OOOOO",
+"OOOOO      OOOOO"
+};
index 45c2efaba165de23496be34bc74698c6b1140f4b..9d290055dad3d42cb950882f6f853d567734ea78 100644 (file)
@@ -49,6 +49,7 @@
 #include "bitmaps/folder.xpm"
 #include "bitmaps/page.xpm"
 #include "bitmaps/help.xpm"
+#include "bitmaps/helproot.xpm"
 #endif
 
 #include "wx/stream.h"
@@ -101,6 +102,7 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data)
     m_ContentsImageList -> Add(wxICON(book));
     m_ContentsImageList -> Add(wxICON(folder));
     m_ContentsImageList -> Add(wxICON(page));
+    m_ContentsImageList -> Add(wxICON(helproot));
 
     m_ContentsBox = NULL;
     m_IndexBox = NULL;
@@ -140,13 +142,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
 
     wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
 
-#ifdef __WXMSW__
-    wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32);
-#else
-    wxIcon frameIcon(help_xpm);
-#endif
-    if (frameIcon.Ok())
-        SetIcon(frameIcon);
+    GetPosition(&m_Cfg.x, &m_Cfg.y);
+
+    SetIcon(wxICON(help));
 
     int notebook_page = 0;
 
@@ -433,6 +431,8 @@ void wxHtmlHelpFrame::CreateContents(bool show_progress)
 
     m_ContentsBox -> DeleteAllItems();
     roots[0] = m_ContentsBox -> AddRoot(_("(Help)"));
+    m_ContentsBox -> SetItemImage(roots[0], IMG_RootFolder);
+    m_ContentsBox -> SetItemSelectedImage(roots[0], IMG_RootFolder);
     imaged[0] = TRUE;
 
     for (i = 0; i < cnt; i++, it++) {
@@ -637,6 +637,7 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt)
 {
     GetSize(&m_Cfg.w, &m_Cfg.h);
     GetPosition(&m_Cfg.x, &m_Cfg.y);
+
     if (m_Splitter && m_Cfg.navig_on) m_Cfg.sashpos = m_Splitter -> GetSashPosition();
 
     if (m_Config)