X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c575e45a24711793f98959a1f394a9e528c3129a..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/xrc/xh_toolb.cpp diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index 53c5088d4f..f89cc657c1 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_toolb.cpp +// Name: src/xrc/xh_toolb.cpp // Purpose: XRC resource for wxBoxSizer // Author: Vaclav Slavik // Created: 2000/08/11 @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "xh_toolb.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -22,8 +18,11 @@ #if wxUSE_XRC && wxUSE_TOOLBAR #include "wx/xrc/xh_toolb.h" -#include "wx/toolbar.h" -#include "wx/frame.h" + +#ifndef WX_PRECOMP + #include "wx/frame.h" + #include "wx/toolbar.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler) @@ -80,6 +79,9 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() kind, GetText(wxT("tooltip")), GetText(wxT("longhelp"))); + + if ( GetBool(wxT("disabled")) ) + m_toolbar->EnableTool(GetID(), false); } return m_toolbar; // must return non-NULL } @@ -119,6 +121,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() long separation = GetLong(wxT("separation"), -1); if (separation != -1) toolbar->SetToolSeparation(separation); + if (HasParam(wxT("bg"))) + toolbar->SetBackgroundColour(GetColour(wxT("bg"))); wxXmlNode *children_node = GetParamNode(wxT("object")); if (!children_node)