Audacity  2.2.0
EditToolBar Class Referencefinal

A ToolBar that has the edit buttons on it. More...

#include <EditToolBar.h>

Inheritance diagram for EditToolBar:
ToolBar wxTabTraversalWrapper< Base >

Public Member Functions

 EditToolBar ()
virtual ~EditToolBar ()
void Create (wxWindow *parent) override
void OnButton (wxCommandEvent &event)
void Populate () override
void Repaint (wxDC *WXUNUSED(dc)) override
void EnableDisableButtons () override
void UpdatePrefs () override
- Public Member Functions inherited from ToolBar
 ToolBar (int type, const wxString &label, const wxString &section, bool resizable=false)
virtual ~ToolBar ()
bool AcceptsFocus () const override
virtual void ReCreateButtons ()
int GetType ()
wxString GetTitle ()
wxString GetLabel ()
wxString GetSection ()
ToolDockGetDock ()
void SetLabel (const wxString &label)
void SetDock (ToolDock *dock)
void SetDocked (ToolDock *dock, bool pushed)
virtual bool Expose (bool show=true)
bool IsResizable () const
bool IsVisible () const
bool IsDocked () const
bool IsPositioned ()
void SetVisible (bool bVisible)
void SetPositioned ()
virtual int GetInitialWidth ()
 Resizable toolbars should implement these. More...
virtual int GetMinToolbarWidth ()
virtual wxSize GetDockedSize ()
- Public Member Functions inherited from wxTabTraversalWrapper< Base >
template<typename... Args>
 wxTabTraversalWrapper (Args &&...args)
 ~wxTabTraversalWrapper ()

Private Member Functions

AButtonAddButton (teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, const wxChar *label, bool toggle=false)
void AddSeparator ()
void MakeButtons ()
void RegenerateTooltips () override
void ForAllButtons (int Action)

Private Attributes

AButtonmButtons [ETBNumButtons]
wxImage * upImage
wxImage * downImage
wxImage * hiliteImage

Additional Inherited Members

- Public Types inherited from ToolBar
using Holder = Destroy_ptr< ToolBar >
- Static Public Member Functions inherited from ToolBar
static AButtonMakeButton (wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size)
static void MakeAlternateImages (AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
static void SetButtonToolTip (AButton &button, const std::vector< wxString > &commands)
- Protected Member Functions inherited from ToolBar
void SetButton (bool down, AButton *button)
void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
void MakeButtonBackgroundsLarge ()
void MakeButtonBackgroundsSmall ()
wxBoxSizer * GetSizer ()
void Add (wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
void Add (wxSizer *sizer, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
void Add (int width, int height, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
void AddSpacer (int size=14)
void AddStretchSpacer (int prop=1)
void Detach (wxWindow *window)
void Detach (wxSizer *sizer)
void Updated ()
int GetResizeGrabberWidth ()
 Returns the width in pixels of the resizer element. More...
virtual void Repaint (wxDC *dc)=0
void OnErase (wxEraseEvent &event)
void OnPaint (wxPaintEvent &event)
void OnMouseEvents (wxMouseEvent &event)
- Protected Attributes inherited from ToolBar
wxString mLabel
wxString mSection
int mType

Detailed Description

A ToolBar that has the edit buttons on it.

This class, which is a child of Toolbar, creates the window containing interfaces to commonly-used edit functions that are otherwise only available through menus. The window can be embedded within a normal project window, or within a ToolbarFrame that is managed by a global ToolBarStub called gControlToolBarStub.

All of the controls in this window were custom-written for Audacity - they are not native controls on any platform - however, it is intended that the images could be easily replaced to allow "skinning" or just customization to match the look and feel of each platform.

Constructor & Destructor Documentation

EditToolBar::EditToolBar ( )
EditToolBar::~EditToolBar ( )

Member Function Documentation

AButton * EditToolBar::AddButton ( teBmps  eEnabledUp,
teBmps  eEnabledDown,
teBmps  eDisabled,
int  id,
const wxChar *  label,
bool  toggle = false 

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

References ToolBar::Add(), ThemeBase::ImageSize(), ToolBar::MakeButton(), mButtons, and theTheme.

Referenced by Populate().

void EditToolBar::AddSeparator ( )

References ToolBar::AddSpacer().

Referenced by Populate().

void EditToolBar::Create ( wxWindow *  parent)

Reimplemented from ToolBar.

References ToolBar::Create().

void EditToolBar::EnableDisableButtons ( )

Implements ToolBar.

References ETBActEnableDisable, and ForAllButtons().

void EditToolBar::MakeButtons ( )
void EditToolBar::RegenerateTooltips ( )

Implements ToolBar.

References ETBActTooltips, and ForAllButtons().

Referenced by Populate(), and UpdatePrefs().

void EditToolBar::Repaint ( wxDC *  WXUNUSEDdc)
void EditToolBar::UpdatePrefs ( )

Member Data Documentation

wxImage* EditToolBar::downImage
wxImage* EditToolBar::hiliteImage
AButton* EditToolBar::mButtons[ETBNumButtons]
wxImage* EditToolBar::upImage

The documentation for this class was generated from the following files: