Audacity 3.2.0
Namespaces | Functions | Variables
ToolsToolBar.cpp File Reference
#include "ToolsToolBar.h"
#include "ToolManager.h"
#include <wx/wxprec.h>
#include <wx/setup.h>
#include <wx/defs.h>
#include <wx/sizer.h>
#include <wx/tooltip.h>
#include "Prefs.h"
#include "AllThemeResources.h"
#include "ImageManipulation.h"
#include "Project.h"
#include "../ProjectSettings.h"
#include "../tracks/ui/Scrubbing.h"
#include "Viewport.h"
#include "../widgets/AButton.h"
#include "../TrackPanel.h"
Include dependency graph for ToolsToolBar.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{ToolsToolBar.cpp}
 Namespace for functions for View Toolbar menu.
 

Functions

 IMPLEMENT_CLASS (ToolsToolBar, ToolBar)
 
 EVT_COMMAND_RANGE (ToolCodes::firstTool+FirstToolID, ToolsToolBar::numTools - 1+FirstToolID, wxEVT_COMMAND_BUTTON_CLICKED, ToolsToolBar::OnTool) namespace
 Methods for ToolsToolBar. More...
 
void anonymous_namespace{ToolsToolBar.cpp}::SetTool (AudacityProject &project, int tool)
 Called by handlers that set tools. More...
 
void anonymous_namespace{ToolsToolBar.cpp}::OnSelectTool (const CommandContext &context)
 Handler to set the select tool active. More...
 
void anonymous_namespace{ToolsToolBar.cpp}::OnEnvelopeTool (const CommandContext &context)
 Handler to set the Envelope tool active. More...
 
void anonymous_namespace{ToolsToolBar.cpp}::OnDrawTool (const CommandContext &context)
 
void anonymous_namespace{ToolsToolBar.cpp}::OnMultiTool (const CommandContext &context)
 
void anonymous_namespace{ToolsToolBar.cpp}::OnPrevTool (const CommandContext &context)
 
void anonymous_namespace{ToolsToolBar.cpp}::OnNextTool (const CommandContext &context)
 
auto anonymous_namespace{ToolsToolBar.cpp}::ExtraToolsMenu ()
 

Variables

static RegisteredToolbarFactory factory
 
AttachedToolBarMenuItem anonymous_namespace{ToolsToolBar.cpp}::sAttachment
 
AttachedItem anonymous_namespace{ToolsToolBar.cpp}::sAttachment2
 

Function Documentation

◆ EVT_COMMAND_RANGE()

EVT_COMMAND_RANGE ( ToolCodes::firstTool FirstToolID,
ToolsToolBar::numTools - 1+  FirstToolID,
wxEVT_COMMAND_BUTTON_CLICKED  ,
ToolsToolBar::OnTool   
)

Methods for ToolsToolBar.

Definition at line 66 of file ToolsToolBar.cpp.

73{
74
75AButton* MakeToolsToolBarButton(wxWindow* parent,
76 wxWindowID id,
78 const wxImage& toolIcon)
79{
80 auto button = safenew AButton(parent, FirstToolID + id);
81 button->SetButtonType(AButton::FrameButton);
82 button->SetButtonToggles(true);
83 button->SetImages(
84 theTheme.Image(bmpRecoloredUpSmall),
85 theTheme.Image(bmpRecoloredUpHiliteSmall),
86 theTheme.Image(bmpRecoloredDownSmall),
87 theTheme.Image(bmpRecoloredHiliteSmall),
88 theTheme.Image(bmpRecoloredUpSmall));
89 button->SetIcon(toolIcon);
90 button->SetFrameMid(3);
91 button->SetLabel(label);
92 button->SetMinSize(wxSize { 25, 25 });
93 button->SetMaxSize(wxSize { 25, 25 });
94 return button;
95}
96
97}
wxImage(22, 22)
#define safenew
Definition: MemoryX.h:10
TranslatableString label
Definition: TagsEditor.cpp:165
THEME_API Theme theTheme
Definition: Theme.cpp:82
const int FirstToolID
Definition: ToolsToolBar.h:35
A wxButton with mouse-over behaviour.
Definition: AButton.h:104
@ FrameButton
Definition: AButton.h:114
wxImage & Image(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.

References FirstToolID, AButton::FrameButton, ThemeBase::Image(), label, safenew, theTheme, and wxImage().

Here is the call graph for this function:

◆ IMPLEMENT_CLASS()

IMPLEMENT_CLASS ( ToolsToolBar  ,
ToolBar   
)

Variable Documentation

◆ factory

RegisteredToolbarFactory factory
static
Initial value:
{
}
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
wxWindowPtr< ToolBar > Holder
Definition: ToolBar.h:77
A kind of ToolBar with Tools on it.
Definition: ToolsToolBar.h:37

Definition at line 276 of file ToolsToolBar.cpp.