KiCad PCB EDA Suite
ACTIONS Class Referenceabstract

Class ACTIONS. More...

#include <actions.h>

Inheritance diagram for ACTIONS:
CVPCB_ACTIONS EE_ACTIONS GERBVIEW_ACTIONS PCB_ACTIONS

Public Types

enum  CURSOR_EVENT_TYPE {
  CURSOR_UP, CURSOR_DOWN, CURSOR_LEFT, CURSOR_RIGHT,
  CURSOR_CLICK, CURSOR_DBL_CLICK, CURSOR_FAST_MOVE = 0x8000
}
 

Cursor control event types

More...
 
enum  REMOVE_FLAGS { REMOVE_FLAGS::NORMAL = 0x00, REMOVE_FLAGS::ALT = 0x01, REMOVE_FLAGS::CUT = 0x02 }
 

Remove event modifier flags

More...
 

Public Member Functions

virtual ~ACTIONS ()
 
virtual OPT< TOOL_EVENTTranslateLegacyId (int aId)=0
 Function TranslateLegacyId() Translates legacy tool ids to the corresponding TOOL_ACTION name. More...
 

Static Public Attributes

static TOOL_ACTION cancelInteractive
 
static TOOL_ACTION updateMenu
 
static TOOL_ACTION undo
 
static TOOL_ACTION redo
 
static TOOL_ACTION cut
 
static TOOL_ACTION copy
 
static TOOL_ACTION paste
 
static TOOL_ACTION zoomRedraw
 
static TOOL_ACTION zoomIn
 
static TOOL_ACTION zoomOut
 
static TOOL_ACTION zoomInCenter
 
static TOOL_ACTION zoomOutCenter
 
static TOOL_ACTION zoomCenter
 
static TOOL_ACTION zoomFitScreen
 
static TOOL_ACTION zoomPreset
 
static TOOL_ACTION zoomTool
 
static TOOL_ACTION centerContents
 
static TOOL_ACTION toggleCursor
 
static TOOL_ACTION toggleCursorStyle
 
static TOOL_ACTION cursorUp
 Cursor control with keyboard. More...
 
static TOOL_ACTION cursorDown
 
static TOOL_ACTION cursorLeft
 
static TOOL_ACTION cursorRight
 
static TOOL_ACTION cursorUpFast
 
static TOOL_ACTION cursorDownFast
 
static TOOL_ACTION cursorLeftFast
 
static TOOL_ACTION cursorRightFast
 
static TOOL_ACTION cursorClick
 
static TOOL_ACTION cursorDblClick
 
static TOOL_ACTION panUp
 
static TOOL_ACTION panDown
 
static TOOL_ACTION panLeft
 
static TOOL_ACTION panRight
 
static TOOL_ACTION gridFast1
 
static TOOL_ACTION gridFast2
 
static TOOL_ACTION gridNext
 
static TOOL_ACTION gridPrev
 
static TOOL_ACTION gridSetOrigin
 
static TOOL_ACTION gridResetOrigin
 
static TOOL_ACTION gridPreset
 
static TOOL_ACTION toggleGrid
 
static TOOL_ACTION gridProperties
 
static TOOL_ACTION imperialUnits
 
static TOOL_ACTION metricUnits
 
static TOOL_ACTION toggleUnits
 

Detailed Description

Class ACTIONS.

Gathers all the actions that are shared by tools. The instance of a subclass of ACTIONS is created inside of ACTION_MANAGER object that registers the actions.

Definition at line 41 of file actions.h.

Member Enumeration Documentation

◆ CURSOR_EVENT_TYPE

Cursor control event types

Enumerator
CURSOR_UP 
CURSOR_DOWN 
CURSOR_LEFT 
CURSOR_RIGHT 
CURSOR_CLICK 
CURSOR_DBL_CLICK 
CURSOR_FAST_MOVE 

Definition at line 116 of file actions.h.

◆ REMOVE_FLAGS

enum ACTIONS::REMOVE_FLAGS
strong

Remove event modifier flags

Enumerator
NORMAL 
ALT 
CUT 

Definition at line 120 of file actions.h.

120 { NORMAL = 0x00, ALT = 0x01, CUT = 0x02 };

Constructor & Destructor Documentation

◆ ~ACTIONS()

virtual ACTIONS::~ACTIONS ( )
inlinevirtual

Definition at line 45 of file actions.h.

45 {};

Member Function Documentation

◆ TranslateLegacyId()

virtual OPT<TOOL_EVENT> ACTIONS::TranslateLegacyId ( int  aId)
pure virtual

Function TranslateLegacyId() Translates legacy tool ids to the corresponding TOOL_ACTION name.

Parameters
aIdis legacy tool id to be translated.
Returns
std::string is name of the corresponding TOOL_ACTION. It may be empty, if there is no corresponding TOOL_ACTION.

Implemented in PCB_ACTIONS, EE_ACTIONS, GERBVIEW_ACTIONS, and CVPCB_ACTIONS.

Referenced by TOOL_DISPATCHER::DispatchWxCommand().

Member Data Documentation

◆ cancelInteractive

◆ centerContents

TOOL_ACTION ACTIONS::centerContents
static

◆ copy

◆ cursorClick

TOOL_ACTION ACTIONS::cursorClick
static

Definition at line 81 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions(), and EE_ACTIONS::TranslateLegacyId().

◆ cursorDblClick

TOOL_ACTION ACTIONS::cursorDblClick
static

Definition at line 82 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions(), and EE_ACTIONS::TranslateLegacyId().

◆ cursorDown

TOOL_ACTION ACTIONS::cursorDown
static

Definition at line 72 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorDownFast

TOOL_ACTION ACTIONS::cursorDownFast
static

Definition at line 77 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorLeft

TOOL_ACTION ACTIONS::cursorLeft
static

Definition at line 73 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorLeftFast

TOOL_ACTION ACTIONS::cursorLeftFast
static

Definition at line 78 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorRight

TOOL_ACTION ACTIONS::cursorRight
static

Definition at line 74 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorRightFast

TOOL_ACTION ACTIONS::cursorRightFast
static

Definition at line 79 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorUp

TOOL_ACTION ACTIONS::cursorUp
static

Cursor control with keyboard.

Definition at line 71 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cursorUpFast

TOOL_ACTION ACTIONS::cursorUpFast
static

Definition at line 76 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ cut

◆ gridFast1

TOOL_ACTION ACTIONS::gridFast1
static

Definition at line 91 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

◆ gridFast2

TOOL_ACTION ACTIONS::gridFast2
static

Definition at line 92 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

◆ gridNext

TOOL_ACTION ACTIONS::gridNext
static

Definition at line 93 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions(), and PCB_ACTIONS::TranslateLegacyId().

◆ gridPreset

TOOL_ACTION ACTIONS::gridPreset
static

◆ gridPrev

TOOL_ACTION ACTIONS::gridPrev
static

Definition at line 94 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions(), and PCB_ACTIONS::TranslateLegacyId().

◆ gridProperties

◆ gridResetOrigin

TOOL_ACTION ACTIONS::gridResetOrigin
static

Definition at line 96 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

◆ gridSetOrigin

TOOL_ACTION ACTIONS::gridSetOrigin
static

◆ imperialUnits

◆ metricUnits

◆ panDown

TOOL_ACTION ACTIONS::panDown
static

Definition at line 86 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ panLeft

TOOL_ACTION ACTIONS::panLeft
static

Definition at line 87 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ panRight

TOOL_ACTION ACTIONS::panRight
static

Definition at line 88 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ panUp

TOOL_ACTION ACTIONS::panUp
static

Definition at line 85 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ paste

◆ redo

◆ toggleCursor

TOOL_ACTION ACTIONS::toggleCursor
static

Definition at line 67 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

◆ toggleCursorStyle

◆ toggleGrid

◆ toggleUnits

TOOL_ACTION ACTIONS::toggleUnits
static

Definition at line 104 of file actions.h.

Referenced by EDIT_TOOL::MeasureTool(), and COMMON_TOOLS::setTransitions().

◆ undo

◆ updateMenu

TOOL_ACTION ACTIONS::updateMenu
static

◆ zoomCenter

TOOL_ACTION ACTIONS::zoomCenter
static

Definition at line 62 of file actions.h.

Referenced by TOOL_MENU::AddStandardSubMenus(), and COMMON_TOOLS::setTransitions().

◆ zoomFitScreen

◆ zoomIn

TOOL_ACTION ACTIONS::zoomIn
static

◆ zoomInCenter

◆ zoomOut

TOOL_ACTION ACTIONS::zoomOut
static

Definition at line 59 of file actions.h.

Referenced by TOOL_MENU::AddStandardSubMenus(), and COMMON_TOOLS::setTransitions().

◆ zoomOutCenter

◆ zoomPreset

TOOL_ACTION ACTIONS::zoomPreset
static

Definition at line 64 of file actions.h.

Referenced by ZOOM_MENU::eventHandler(), and COMMON_TOOLS::setTransitions().

◆ zoomRedraw

◆ zoomTool


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