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)
 
void OnButton (wxCommandEvent &event)
 
void Populate ()
 
void Repaint (wxDC *WXUNUSED(dc))
 
void EnableDisableButtons ()
 
void UpdatePrefs ()
 
- 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 this. 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 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 eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
 
static void SetButtonToolTip (AButton &button, const std::vector< wxString > &commands, const wxString &separator=wxT(" / "))
 
- 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 ( )
virtual

Member Function Documentation

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

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 ( )
private

References ToolBar::AddSpacer().

Referenced by Populate().

void EditToolBar::Create ( wxWindow *  parent)
virtual

Reimplemented from ToolBar.

References ToolBar::Create().

void EditToolBar::EnableDisableButtons ( )
virtual

Implements ToolBar.

References ETBActEnableDisable, and ForAllButtons().

void EditToolBar::MakeButtons ( )
private
void EditToolBar::RegenerateTooltips ( )
overrideprivatevirtual

Implements ToolBar.

References ETBActTooltips, and ForAllButtons().

Referenced by Populate(), and UpdatePrefs().

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

Member Data Documentation

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

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