X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b29c9f3b0754fe380aeb505638e9480cf7157c7c..623d5f80029803f1394e89732e16e19e82a22e2a:/src/xrc/xh_toolb.cpp diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index d363a24021..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 ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#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) @@ -40,6 +39,7 @@ wxToolBarXmlHandler::wxToolBarXmlHandler() XRC_ADD_STYLE(wxTB_NODIVIDER); XRC_ADD_STYLE(wxTB_NOALIGN); XRC_ADD_STYLE(wxTB_HORZ_LAYOUT); + XRC_ADD_STYLE(wxTB_HORZ_TEXT); AddWindowStyles(); } @@ -79,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 } @@ -118,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)