// Author: Julian Smart
// Modified by: 13.12.99 by VZ during toolbar classes reorganization
// Created: 04/01/98
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#ifdef __VMS
-#define XtDisplay XTDISPLAY
-#endif
-
#include "wx/toolbar.h"
#ifndef WX_PRECOMP
// globals
// ----------------------------------------------------------------------------
-static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL;
+static wxToolBarTimer* wxTheToolBarTimer = NULL;
Widget wxToolBarTimer::help_popup = (Widget) 0;
Widget wxToolBarTimer::buttonWidget = (Widget) 0;
if( !wxControl::CreateControl( parent, id, pos, size, style,
wxDefaultValidator, name ) )
return false;
+ PreCreation();
FixupStyle();
- m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
-
Widget parentWidget = (Widget) parent->GetClientWidget();
Widget toolbar = XtVaCreateManagedWidget("toolbar",
m_mainWidget = (WXWidget) toolbar;
- ChangeFont(false);
-
wxPoint rPos = pos;
wxSize rSize = size;
if( rSize.x == -1 && GetParent() )
rSize.x = GetParent()->GetSize().x;
+ PostCreation();
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
rPos.x, rPos.y, rSize.x, rSize.y);
- ChangeBackgroundColour();
-
return true;
}
wxToolBar::~wxToolBar()
{
- delete wxTheToolBarTimer;
- wxTheToolBarTimer = NULL;
+ wxDELETE(wxTheToolBarTimer);
}
bool wxToolBar::Realize()
wxColour col;
col.SetPixel(backgroundPixel);
- if( bmp.Ok() && bmp.GetMask() )
+ if( bmp.IsOk() && bmp.GetMask() )
{
bmp = wxCreateMaskedBitmap(bmp, col);
tool->SetNormalBitmap(bmp);
}
- if( insensBmp.Ok() && insensBmp.GetMask() )
+ if( insensBmp.IsOk() && insensBmp.GetMask() )
{
insensBmp = wxCreateMaskedBitmap(insensBmp, col);
tool->SetDisabledBitmap(insensBmp);
{
wxBitmap tmp = tool->GetDisabledBitmap();
- insensPixmap = tmp.Ok() ?
+ insensPixmap = tmp.IsOk() ?
(Pixmap)tmp.GetDrawable() :
tool->GetInsensPixmap();
}
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
wxCoord WXUNUSED(y)) const
{
- wxFAIL_MSG( _T("TODO") );
+ wxFAIL_MSG( wxT("TODO") );
- return (wxToolBarToolBase *)NULL;
+ return NULL;
}
bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
node = node->GetNext();
}
- return (wxToolBarToolBase *)NULL;
+ return NULL;
}
static void wxToolButtonCallback(Widget w,