From 3da2715fb887ed37bb2f0a45709e3a3d8cf3ccb1 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 24 Apr 2001 16:38:02 +0000 Subject: [PATCH] Corrected include/wx/palette.h; added wxGenericTreeCtrl::SetFont git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/treectlg.h | 3 +++ include/wx/palette.h | 2 +- src/generic/treectlg.cpp | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 08761557d2..2165e9c18e 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -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 // --------------------- diff --git a/include/wx/palette.h b/include/wx/palette.h index 1c5099ee19..c9aa1e90e8 100644 --- a/include/wx/palette.h +++ b/include/wx/palette.h @@ -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__) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 19b6d7184f..9a623fa386 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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 // ----------------------------------------------------------------------------- -- 2.47.2