]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrected include/wx/palette.h; added wxGenericTreeCtrl::SetFont
authorJulian Smart <julian@anthemion.co.uk>
Tue, 24 Apr 2001 16:38:02 +0000 (16:38 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 24 Apr 2001 16:38:02 +0000 (16:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/treectlg.h
include/wx/palette.h
src/generic/treectlg.cpp

index 08761557d25728303580a2ef6450553818717f1b..2165e9c18ed30e2915ec780c9e948f12547747be 100644 (file)
@@ -148,6 +148,9 @@ public:
         // set the items font (should be of the same height for all items)
     void SetItemFont(const wxTreeItemId& item, const wxFont& font);
 
+        // set the window font
+    virtual bool SetFont( const wxFont &font );
+
     // item status inquiries
     // ---------------------
 
index 1c5099ee19530bab82a35ff5fc5e4b0e202cc1c5..c9aa1e90e88831fff9e01b49998a75ba4f2445f0 100644 (file)
@@ -6,7 +6,7 @@
 #elif defined(__WXMOTIF__)
 #include "wx/motif/palette.h"
 #elif defined(__WXGTK__)
-#include "wx/gtk/palette.h"
+#include "wx/generic/paletteg.h"
 #elif defined(__WXQT__)
 #include "wx/qt/palette.h"
 #elif defined(__WXMAC__)
index 19b6d7184fb75893e836816e151c1ac1e51da2af..9a623fa386d55f3d94e9daaada33b6eceebaebdc 100644 (file)
@@ -818,6 +818,21 @@ void wxGenericTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font
     RefreshLine(pItem);
 }
 
+bool wxGenericTreeCtrl::SetFont( const wxFont &font )
+{
+    wxScrolledWindow::SetFont(font);
+
+    m_normalFont = font ;
+    m_boldFont = wxFont( m_normalFont.GetPointSize(),
+                            m_normalFont.GetFamily(),
+                            m_normalFont.GetStyle(),
+                            wxBOLD,
+                            m_normalFont.GetUnderlined());
+
+    return TRUE;
+}
+
+
 // -----------------------------------------------------------------------------
 // item status inquiries
 // -----------------------------------------------------------------------------