![]() |
Audacity 3.2.0
|
A ToolBar that has the edit buttons on it. More...
#include <EditToolBar.h>
Public Member Functions | |
EditToolBar (AudacityProject &project) | |
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 |
![]() | |
ToolBar (AudacityProject &project, int type, const TranslatableString &label, const wxString §ion, bool resizable=false) | |
virtual | ~ToolBar () |
bool | AcceptsFocus () const override |
virtual void | SetToDefaultSize () |
virtual void | Create (wxWindow *parent) |
virtual void | EnableDisableButtons ()=0 |
virtual void | ReCreateButtons () |
void | UpdatePrefs () override |
virtual void | RegenerateTooltips ()=0 |
int | GetType () |
TranslatableString | GetTitle () |
TranslatableString | GetLabel () |
wxString | GetSection () |
ToolDock * | GetDock () |
void | SetLabel (const TranslatableString &label) |
virtual 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 () |
wxSize | GetSmartDockedSize () |
virtual void | ResizingDone () |
![]() | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Private Member Functions | |
void | AddSeparator () |
void | MakeButtons () |
void | RegenerateTooltips () override |
void | ForAllButtons (int Action) |
Static Private Member Functions | |
static AButton * | AddButton (EditToolBar *pBar, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, const TranslatableString &label, bool toggle=false) |
Private Attributes | |
AButton * | mButtons [ETBNumButtons] |
wxGridSizer * | mToolSizer |
wxImage * | upImage |
wxImage * | downImage |
wxImage * | hiliteImage |
Additional Inherited Members | |
![]() | |
using | Holder = wxWindowPtr< ToolBar > |
![]() | |
static AButton * | MakeButton (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 AButton * | MakeButton (ToolBar *parent, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label) |
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 (AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands) |
static void | MakeButtonBackgroundsSmall () |
static void | MakeButtonBackgroundsLarge () |
![]() | |
void | SetButton (bool down, AButton *button) |
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 | Populate ()=0 |
virtual void | Repaint (wxDC *dc)=0 |
void | OnErase (wxEraseEvent &event) |
void | OnPaint (wxPaintEvent &event) |
void | OnMouseEvents (wxMouseEvent &event) |
![]() | |
virtual void | UpdateSelectedPrefs (int id) |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
![]() | |
static void | MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
static void | MakeMacRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size) |
static void | MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
static void | MakeRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size) |
![]() | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
![]() | |
AudacityProject & | mProject |
TranslatableString | mLabel |
wxString | mSection |
int | mType |
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.
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.
Definition at line 65 of file EditToolBar.h.
EditToolBar::EditToolBar | ( | AudacityProject & | project | ) |
|
virtual |
Definition at line 81 of file EditToolBar.cpp.
|
staticprivate |
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 first_ETB_ID, id, ThemeBase::ImageSize(), label, ToolBar::MakeButton(), mButtons, mToolSizer, AButton::SetLabel(), and theTheme.
Referenced by Populate().
|
private |
Definition at line 91 of file EditToolBar.cpp.
References mToolSizer.
Referenced by Populate().
|
overridevirtual |
Reimplemented from ToolBar.
Definition at line 85 of file EditToolBar.cpp.
References ToolBar::Create(), and UpdatePrefs().
|
overridevirtual |
Implements ToolBar.
Definition at line 196 of file EditToolBar.cpp.
References ETBActEnableDisable, and ForAllButtons().
|
private |
Definition at line 225 of file EditToolBar.cpp.
References EditToolbarButtonList, entry, ETBActEnableDisable, ETBActTooltips, CommandManager::Get(), CommandManager::GetEnabled(), gPrefs, mButtons, ToolBar::mProject, AButton::PopUp(), AButton::PushDown(), ToolBar::SetButtonToolTip(), and AButton::SetEnabled().
Referenced by EnableDisableButtons(), and RegenerateTooltips().
|
private |
void EditToolBar::OnButton | ( | wxCommandEvent & | event | ) |
Definition at line 260 of file EditToolBar.cpp.
References EditToolbarButtonList, first_ETB_ID, CommandManager::Get(), MenuManager::Get(), MenuManager::GetUpdateFlags(), HandleTextualCommand(), id, AButton::InteractionOver(), mButtons, and ToolBar::mProject.
|
overridevirtual |
Implements ToolBar.
Definition at line 122 of file EditToolBar.cpp.
References ToolBar::Add(), AddButton(), AddSeparator(), ThemeBase::Colour(), ETBRedoID, ETBSilenceID, ETBTrimID, ETBUndoID, ETBZoomFitID, ETBZoomInID, ETBZoomOutID, ETBZoomSelID, ToolBar::MakeButtonBackgroundsSmall(), mButtons, mToolSizer, AButton::PushDown(), RegenerateTooltips(), safenew, AButton::SetEnabled(), theTheme, and XO.
|
overrideprivatevirtual |
Implements ToolBar.
Definition at line 191 of file EditToolBar.cpp.
References ETBActTooltips, and ForAllButtons().
Referenced by Populate(), and UpdatePrefs().
|
inlineoverride |
Definition at line 77 of file EditToolBar.h.
|
overridevirtual |
Implements PrefsListener.
Definition at line 180 of file EditToolBar.cpp.
References RegenerateTooltips(), ToolBar::SetLabel(), ToolBar::UpdatePrefs(), and XO.
Referenced by Create().
|
private |
Definition at line 100 of file EditToolBar.h.
|
private |
Definition at line 101 of file EditToolBar.h.
|
private |
Definition at line 95 of file EditToolBar.h.
Referenced by AddButton(), ForAllButtons(), OnButton(), and Populate().
|
private |
Definition at line 97 of file EditToolBar.h.
Referenced by AddButton(), AddSeparator(), and Populate().
|
private |
Definition at line 99 of file EditToolBar.h.