- wxToolBarTool(wxToolBar *tbar, wxControl *control)
- : wxToolBarToolBase(tbar, control)
+ wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+ : wxToolBarToolBase(tbar, control, label)
if( !wxControl::CreateControl( parent, id, pos, size, style,
wxDefaultValidator, name ) )
return false;
if( !wxControl::CreateControl( parent, id, pos, size, style,
wxDefaultValidator, name ) )
return false;
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
rPos.x, rPos.y, rSize.x, rSize.y);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
rPos.x, rPos.y, rSize.x, rSize.y);
XtVaGetValues(button, XmNbackground, &backgroundPixel,
NULL);
wxColour col;
col.SetPixel(backgroundPixel);
XtVaGetValues(button, XmNbackground, &backgroundPixel,
NULL);
wxColour col;
col.SetPixel(backgroundPixel);
{
bmp = wxCreateMaskedBitmap(bmp, col);
tool->SetNormalBitmap(bmp);
}
{
bmp = wxCreateMaskedBitmap(bmp, col);
tool->SetNormalBitmap(bmp);
}
{
insensBmp = wxCreateMaskedBitmap(insensBmp, col);
tool->SetDisabledBitmap(insensBmp);
{
insensBmp = wxCreateMaskedBitmap(insensBmp, col);
tool->SetDisabledBitmap(insensBmp);
// Create a selected/toggled bitmap. If there isn't a 2nd
// bitmap, we need to create it (with a darker, selected
// background)
// Create a selected/toggled bitmap. If there isn't a 2nd
// bitmap, we need to create it (with a darker, selected
// background)
if ( tool->CanBeToggled() )
XtVaGetValues(button, XmNselectColor, &backgroundPixel,
NULL);
if ( tool->CanBeToggled() )
XtVaGetValues(button, XmNselectColor, &backgroundPixel,
NULL);
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
wxCoord WXUNUSED(y)) const
{
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
wxCoord WXUNUSED(y)) const
{
}
wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags);
}
wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags);
// We must refresh the frame size when the toolbar changes size
// otherwise the toolbar can be shown incorrectly
if ( old_width != width || old_height != height )
{
// We must refresh the frame size when the toolbar changes size
// otherwise the toolbar can be shown incorrectly
if ( old_width != width || old_height != height )
{
// we have a frame that is not being deleted.
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame && !frame->IsBeingDeleted() )
// we have a frame that is not being deleted.
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame && !frame->IsBeingDeleted() )
/************************************************************/
XtPopup (help_popup, XtGrabNone);
}
/************************************************************/
XtPopup (help_popup, XtGrabNone);
}