]> git.saurik.com Git - wxWidgets.git/commitdiff
added own{fg,bg,font} allowing to set non-inheritable fore/background colours and...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 13 Jun 2009 02:48:38 +0000 (02:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 13 Jun 2009 02:48:38 +0000 (02:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/doxygen/overviews/xrc_format.h
src/xrc/xmlres.cpp

index 239b8ebde675bdf2217877135c307105cba73320..8d93e57aa9077337333ada3c9119f4976ef4a466 100644 (file)
@@ -339,6 +339,7 @@ All (GUI):
 - wxWindow::SetAutoLayout() now works for all windows, not just panels.
 - Support wxListCtrl columns, items and image lists in XRC (Kinaou HervĂ©).
 - Added support for wxFileCtrl to XRC (Kinaou HervĂ©).
+- Added ownfg, ownbg and ownfont tags to XRC.
 - Added wxEditableListBox XRC handler.
 - Added multiple selection support to wxDirCtrl (Steve Lamerton).
 - wxGrid: add possibility to prevent resizing of individual rows/columns.
index fd407a4923c3bec9b6aae9b46c9fbf538136d5b4..755a3e2aca1e490f505468bf3bb52e0b1417b636 100644 (file)
@@ -482,8 +482,14 @@ from properties lists below.
     (default: not set).}
 @row3col{fg, @ref overview_xrcformat_type_colour,
     Foreground colour of the window (default: window's default).}
+@row3col{ownfg, @ref overview_xrcformat_type_colour,
+    Non-inheritable foreground colour of the window, see
+    wxWindow::SetOwnForegroundColour() (default: none).}
 @row3col{bg, @ref overview_xrcformat_type_colour,
     Background colour of the window (default: window's default).}
+@row3col{ownbg, @ref overview_xrcformat_type_colour,
+    Non-inheritable background colour of the window, see
+    wxWindow::SetOwnBackgroundColour() (default: none).}
 @row3col{enabled, @ref overview_xrcformat_type_bool,
     If set to 0, the control is disabled (default: 1).}
 @row3col{hidden, @ref overview_xrcformat_type_bool,
@@ -492,6 +498,9 @@ from properties lists below.
     Tooltip to use for the control (default: not set).}
 @row3col{font, @ref overview_xrcformat_type_font,
     Font to use for the control (default: window's default).}
+@row3col{ownfont, @ref overview_xrcformat_type_font,
+    Non-inheritable font to use for the control, see
+    wxWindow::SetOwnFont() (default: none).}
 @row3col{help, @ref overview_xrcformat_type_text,
     Context-sensitive help for the control, used by wxHelpProvider
     (default: not set).}
index d19bdec665be788d32ba1d9a95a338dea5dc001e..5b21be5d361504e75bfa94dc1ff0588ff67d4101 100644 (file)
@@ -1850,8 +1850,12 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
         wnd->SetExtraStyle(wnd->GetExtraStyle() | GetStyle(wxT("exstyle")));
     if (HasParam(wxT("bg")))
         wnd->SetBackgroundColour(GetColour(wxT("bg")));
+    if (HasParam(wxT("ownbg")))
+        wnd->SetOwnBackgroundColour(GetColour(wxT("ownbg")));
     if (HasParam(wxT("fg")))
         wnd->SetForegroundColour(GetColour(wxT("fg")));
+    if (HasParam(wxT("ownfg")))
+        wnd->SetOwnForegroundColour(GetColour(wxT("ownfg")));
     if (GetBool(wxT("enabled"), 1) == 0)
         wnd->Enable(false);
     if (GetBool(wxT("focused"), 0) == 1)
@@ -1863,7 +1867,9 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
         wnd->SetToolTip(GetText(wxT("tooltip")));
 #endif
     if (HasParam(wxT("font")))
-        wnd->SetFont(GetFont());
+        wnd->SetFont(GetFont(wxT("font")));
+    if (HasParam(wxT("ownfont")))
+        wnd->SetOwnFont(GetFont(wxT("ownfont")));
     if (HasParam(wxT("help")))
         wnd->SetHelpText(GetText(wxT("help")));
 }