KiCad PCB EDA Suite
CVPCB_ACTIONS Class Reference

Class CVPCB_ACTIONS. More...

#include <cvpcb_actions.h>

Inheritance diagram for CVPCB_ACTIONS:
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 event modifier flags

More...
 

Public Member Functions

virtual OPT< TOOL_EVENTTranslateLegacyId (int aId) override
 > More...
 
virtual void RegisterAllTools (TOOL_MANAGER *aToolManager) override
 > More...
 

Static Public Attributes

static TOOL_ACTION selectionActivate
 Activation of the selection tool. More...
 
static TOOL_ACTION no_selectionTool
 Tool selection. More...
 
static TOOL_ACTION measureTool
 
static TOOL_ACTION zoomTool
 
static TOOL_ACTION resetCoords
 
static TOOL_ACTION switchCursor
 
static TOOL_ACTION switchUnits
 
static TOOL_ACTION showHelp
 
static TOOL_ACTION toBeDone
 
static TOOL_ACTION cancelInteractive
 
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 centerContents
 
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
 

Detailed Description

Class CVPCB_ACTIONS.

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

Definition at line 42 of file cvpcb_actions.h.

Member Enumeration Documentation

Cursor control event types

Enumerator
CURSOR_UP 
CURSOR_DOWN 
CURSOR_LEFT 
CURSOR_RIGHT 
CURSOR_CLICK 
CURSOR_DBL_CLICK 
CURSOR_FAST_MOVE 

Definition at line 103 of file actions.h.

enum ACTIONS::REMOVE_FLAGS
stronginherited

Remove event modifier flags

Enumerator
NORMAL 
ALT 

Definition at line 107 of file actions.h.

107 { NORMAL = 0x00, ALT = 0x01 };

Member Function Documentation

void CVPCB_ACTIONS::RegisterAllTools ( TOOL_MANAGER aToolManager)
overridevirtual

>

Implements ACTIONS.

Definition at line 35 of file cvpcb_actions.cpp.

References TOOL_MANAGER::RegisterTool().

36 {
37  aToolManager->RegisterTool( new COMMON_TOOLS );
38  aToolManager->RegisterTool( new ZOOM_TOOL );
39  aToolManager->RegisterTool( new CVPCB_SELECTION_TOOL );
40  aToolManager->RegisterTool( new CVPCB_CONTROL );
41 }
Class CVPCB_SELECTION_TOOL.
Class COMMON_TOOLS.
Definition: common_tools.h:38
Class CVPCB_CONTROL.
Definition: cvpcb_control.h:42
void RegisterTool(TOOL_BASE *aTool)
Function RegisterTool() Adds a tool to the manager set and sets it up.
OPT< TOOL_EVENT > CVPCB_ACTIONS::TranslateLegacyId ( int  aId)
overridevirtual

>

Implements ACTIONS.

Definition at line 44 of file cvpcb_actions.cpp.

References ID_NO_TOOL_SELECTED, ID_TB_MEASUREMENT_TOOL, ID_VIEWER_ZOOM_IN, ID_VIEWER_ZOOM_OUT, ID_VIEWER_ZOOM_PAGE, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_SELECTION, TOOL_ACTION::MakeEvent(), measureTool, no_selectionTool, ACTIONS::zoomFitScreen, ACTIONS::zoomInCenter, ACTIONS::zoomOutCenter, and ACTIONS::zoomTool.

45 {
46  switch( aId )
47  {
48  case ID_ZOOM_IN: // toolbar button "Zoom In"
49  case ID_VIEWER_ZOOM_IN:
51 
52  case ID_ZOOM_OUT: // toolbar button "Zoom In"
53  case ID_VIEWER_ZOOM_OUT:
55 
56  case ID_ZOOM_PAGE: // toolbar button "Fit on Screen"
59 
60  case ID_ZOOM_SELECTION:
62 
65 
68  }
69 
70  return OPT<TOOL_EVENT>();
71 }
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
static TOOL_ACTION zoomTool
Definition: actions.h:58
static TOOL_ACTION no_selectionTool
Tool selection.
Definition: cvpcb_actions.h:50
Definition: id.h:241
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
TOOL_EVENT MakeEvent() const
Function HasHotKey() Checks if the action has a hot key assigned.
Definition: tool_action.h:104
boost::optional< T > OPT
Definition: optional.h:7
static TOOL_ACTION measureTool
Definition: cvpcb_actions.h:51

Member Data Documentation

TOOL_ACTION ACTIONS::centerContents
staticinherited
TOOL_ACTION ACTIONS::cursorClick
staticinherited

Definition at line 72 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorDblClick
staticinherited

Definition at line 73 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorDown
staticinherited

Definition at line 63 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorDownFast
staticinherited

Definition at line 68 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorLeft
staticinherited

Definition at line 64 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorLeftFast
staticinherited

Definition at line 69 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorRight
staticinherited

Definition at line 65 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorRightFast
staticinherited

Definition at line 70 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorUp
staticinherited

Cursor control with keyboard.

Definition at line 62 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::cursorUpFast
staticinherited

Definition at line 67 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::gridFast1
staticinherited

Definition at line 82 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

TOOL_ACTION ACTIONS::gridFast2
staticinherited

Definition at line 83 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

TOOL_ACTION ACTIONS::gridNext
staticinherited

Definition at line 84 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::gridPreset
staticinherited

Definition at line 88 of file actions.h.

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

TOOL_ACTION ACTIONS::gridPrev
staticinherited

Definition at line 85 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::gridResetOrigin
staticinherited

Definition at line 87 of file actions.h.

Referenced by PCBNEW_CONTROL::setTransitions().

TOOL_ACTION ACTIONS::gridSetOrigin
staticinherited
TOOL_ACTION CVPCB_ACTIONS::measureTool
static

Definition at line 51 of file cvpcb_actions.h.

Referenced by CVPCB_SELECTION_TOOL::setTransitions(), and TranslateLegacyId().

TOOL_ACTION CVPCB_ACTIONS::no_selectionTool
static

Tool selection.

Definition at line 50 of file cvpcb_actions.h.

Referenced by TranslateLegacyId().

TOOL_ACTION ACTIONS::panDown
staticinherited

Definition at line 77 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::panLeft
staticinherited

Definition at line 78 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::panRight
staticinherited

Definition at line 79 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION ACTIONS::panUp
staticinherited

Definition at line 76 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION CVPCB_ACTIONS::resetCoords
static

Definition at line 55 of file cvpcb_actions.h.

Referenced by CVPCB_CONTROL::setTransitions().

TOOL_ACTION CVPCB_ACTIONS::selectionActivate
static

Activation of the selection tool.

Definition at line 47 of file cvpcb_actions.h.

Referenced by CVPCB_SELECTION_TOOL::setTransitions().

TOOL_ACTION CVPCB_ACTIONS::showHelp
static

Definition at line 58 of file cvpcb_actions.h.

TOOL_ACTION CVPCB_ACTIONS::switchCursor
static

Definition at line 56 of file cvpcb_actions.h.

Referenced by CVPCB_CONTROL::setTransitions().

TOOL_ACTION CVPCB_ACTIONS::switchUnits
static

Definition at line 57 of file cvpcb_actions.h.

Referenced by CVPCB_CONTROL::setTransitions().

TOOL_ACTION CVPCB_ACTIONS::toBeDone
static

Definition at line 59 of file cvpcb_actions.h.

TOOL_ACTION ACTIONS::zoomCenter
staticinherited

Definition at line 55 of file actions.h.

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

TOOL_ACTION ACTIONS::zoomIn
staticinherited
TOOL_ACTION ACTIONS::zoomOut
staticinherited

Definition at line 52 of file actions.h.

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

TOOL_ACTION ACTIONS::zoomOutCenter
staticinherited
TOOL_ACTION ACTIONS::zoomPreset
staticinherited

Definition at line 57 of file actions.h.

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

TOOL_ACTION CVPCB_ACTIONS::zoomTool
static

Definition at line 54 of file cvpcb_actions.h.


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