LogoSearch packages:      

Sourcecode: audacity version File versions

AButton * EditToolBar::AddButton ( teBmps  eFore,
teBmps  eDisabled,
int  id,
const wxChar *  label,
const wxChar *  tip 
) [private]

This is a convenience function that allows for button creation in MakeButtons() with fewer arguments Very similar to code in ControlToolBar...

Definition at line 99 of file EditToolBar.cpp.

References ThemeBase::ImageSize(), and ToolBar::MakeButton().

{
   AButton *&r = mButtons[id];

   r = ToolBar::MakeButton(
      bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredHiliteSmall,
      eFore, eDisabled,
      wxWindowID(id),
      wxDefaultPosition, 
      false,
      theTheme.ImageSize( bmpRecoloredUpSmall ));

   r->SetLabel(label);
// JKC: Unlike ControlToolBar, does not have a focus rect.  Shouldn't it?
// r->SetFocusRect( r->GetRect().Deflate( 4, 4 ) );

#if wxUSE_TOOLTIPS
   r->SetToolTip(tip);
#endif
   Add( r, 0, wxALIGN_CENTER );

   return r;
}


Generated by  Doxygen 1.5.1   Back to index