added own{fg,bg,font} allowing to set non-inheritable fore/background colours and font from XRC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-06-13 02:48:38 +00:00
parent deff6d72e5
commit a7435c3ec4
3 changed files with 17 additions and 1 deletions

View 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.

View 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).}

View 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")));
}