Audacity 3.2.0
Public Member Functions | List of all members
ToolActions::Handler Struct Reference
Inheritance diagram for ToolActions::Handler:
[legend]
Collaboration diagram for ToolActions::Handler:
[legend]

Public Member Functions

void OnSelectTool (const CommandContext &context)
 Handler to set the select tool active. More...
 
void OnEnvelopeTool (const CommandContext &context)
 Handler to set the Envelope tool active. More...
 
void OnDrawTool (const CommandContext &context)
 
void OnMultiTool (const CommandContext &context)
 
void OnPrevTool (const CommandContext &context)
 
void OnNextTool (const CommandContext &context)
 

Detailed Description

Definition at line 293 of file ToolsToolBar.cpp.

Member Function Documentation

◆ OnDrawTool()

void ToolActions::Handler::OnDrawTool ( const CommandContext context)
inline

Definition at line 306 of file ToolsToolBar.cpp.

307{
309}
AudacityProject & project
void SetTool(AudacityProject &project, int tool)
Called by handlers that set tools.

References ToolCodes::drawTool, CommandContext::project, and anonymous_namespace{ToolsToolBar.cpp}::SetTool().

Here is the call graph for this function:

◆ OnEnvelopeTool()

void ToolActions::Handler::OnEnvelopeTool ( const CommandContext context)
inline

Handler to set the Envelope tool active.

Definition at line 301 of file ToolsToolBar.cpp.

302{
304}

References ToolCodes::envelopeTool, CommandContext::project, and anonymous_namespace{ToolsToolBar.cpp}::SetTool().

Here is the call graph for this function:

◆ OnMultiTool()

void ToolActions::Handler::OnMultiTool ( const CommandContext context)
inline

Definition at line 311 of file ToolsToolBar.cpp.

312{
314}

References ToolCodes::multiTool, CommandContext::project, and anonymous_namespace{ToolsToolBar.cpp}::SetTool().

Here is the call graph for this function:

◆ OnNextTool()

void ToolActions::Handler::OnNextTool ( const CommandContext context)
inline

Definition at line 327 of file ToolsToolBar.cpp.

328{
329 auto &project = context.project;
330 auto &trackPanel = TrackPanel::Get( project );
331 auto &settings = ProjectSettings::Get( project );
332
333 settings.SetTool( (settings.GetTool() + 1) % ToolCodes::numTools );
334 trackPanel.Refresh(false);
335}
static Settings & settings()
Definition: TrackInfo.cpp:87
static ProjectSettings & Get(AudacityProject &project)
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:230

References ProjectSettings::Get(), TrackPanel::Get(), ToolCodes::numTools, CommandContext::project, and settings().

Here is the call graph for this function:

◆ OnPrevTool()

void ToolActions::Handler::OnPrevTool ( const CommandContext context)
inline

Definition at line 316 of file ToolsToolBar.cpp.

317{
318 auto &project = context.project;
319 auto &trackPanel = TrackPanel::Get( project );
320 auto &settings = ProjectSettings::Get( project );
321
322 settings.SetTool(
323 (settings.GetTool() + (ToolCodes::numTools - 1 )) % ToolCodes::numTools);
324 trackPanel.Refresh(false);
325}

References ProjectSettings::Get(), TrackPanel::Get(), ToolCodes::numTools, CommandContext::project, and settings().

Here is the call graph for this function:

◆ OnSelectTool()

void ToolActions::Handler::OnSelectTool ( const CommandContext context)
inline

Handler to set the select tool active.

Definition at line 295 of file ToolsToolBar.cpp.

296{
298}

References CommandContext::project, ToolCodes::selectTool, and anonymous_namespace{ToolsToolBar.cpp}::SetTool().

Here is the call graph for this function:

The documentation for this struct was generated from the following file: