KiCad PCB EDA Suite
GERBVIEW_ACTIONS Class Reference

Class GERBVIEW_ACTIONS. More...

#include <gerbview_actions.h>

Inheritance diagram for GERBVIEW_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 selectionCursor
 Select a single item under the cursor position. More...
 
static TOOL_ACTION selectionClear
 Clears the current selection. More...
 
static TOOL_ACTION selectItem
 Selects an item (specified as the event parameter). More...
 
static TOOL_ACTION unselectItem
 Unselects an item (specified as the event parameter). More...
 
static TOOL_ACTION properties
 Activation of the edit tool. More...
 
static TOOL_ACTION measureTool
 
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 linesDisplayOutlines
 
static TOOL_ACTION flashedDisplayOutlines
 
static TOOL_ACTION polygonsDisplayOutlines
 
static TOOL_ACTION negativeObjectDisplay
 
static TOOL_ACTION dcodeDisplay
 
static TOOL_ACTION highContrastMode
 
static TOOL_ACTION highContrastInc
 
static TOOL_ACTION highContrastDec
 
static TOOL_ACTION layerPrev
 
static TOOL_ACTION layerNext
 
static TOOL_ACTION layerAlphaInc
 
static TOOL_ACTION layerAlphaDec
 
static TOOL_ACTION layerToggle
 
static TOOL_ACTION layerChanged
 
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 cursorClick
 Cursor control. More...
 
static TOOL_ACTION cursorDblClick
 
static TOOL_ACTION selectionTool
 
static TOOL_ACTION zoomTool
 
static TOOL_ACTION panTool
 
static TOOL_ACTION pickerTool
 
static TOOL_ACTION resetCoords
 
static TOOL_ACTION switchCursor
 
static TOOL_ACTION switchUnits
 
static TOOL_ACTION showHelp
 
static TOOL_ACTION toBeDone
 
static TOOL_ACTION highlightClear
 
static TOOL_ACTION highlightNet
 
static TOOL_ACTION highlightComponent
 
static TOOL_ACTION highlightAttribute
 
static TOOL_ACTION cancelInteractive
 
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 panUp
 
static TOOL_ACTION panDown
 
static TOOL_ACTION panLeft
 
static TOOL_ACTION panRight
 

Detailed Description

Class GERBVIEW_ACTIONS.

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

Definition at line 37 of file gerbview_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 GERBVIEW_ACTIONS::RegisterAllTools ( TOOL_MANAGER aToolManager)
overridevirtual

>

Implements ACTIONS.

Definition at line 31 of file gerbview_actions.cpp.

References TOOL_MANAGER::RegisterTool().

32 {
33  aToolManager->RegisterTool( new COMMON_TOOLS );
34  aToolManager->RegisterTool( new GERBVIEW_SELECTION_TOOL );
35  aToolManager->RegisterTool( new GERBVIEW_CONTROL );
36  aToolManager->RegisterTool( new ZOOM_TOOL );
37 }
Class COMMON_TOOLS.
Definition: common_tools.h:38
Class GERBVIEW_SELECTION_TOOL.
void RegisterTool(TOOL_BASE *aTool)
Function RegisterTool() Adds a tool to the manager set and sets it up.
Class PCBNEW_CONTROL.
OPT< TOOL_EVENT > GERBVIEW_ACTIONS::TranslateLegacyId ( int  aId)
overridevirtual

>

Implements ACTIONS.

Definition at line 39 of file gerbview_actions.cpp.

References highlightAttribute, highlightClear, highlightComponent, highlightNet, ID_HIGHLIGHT_APER_ATTRIBUTE_ITEMS, ID_HIGHLIGHT_CMP_ITEMS, ID_HIGHLIGHT_NET_ITEMS, ID_HIGHLIGHT_REMOVE_ALL, ID_NO_TOOL_SELECTED, ID_TB_MEASUREMENT_TOOL, ID_ZOOM_IN, ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_SELECTION, TOOL_ACTION::MakeEvent(), measureTool, selectionTool, ACTIONS::zoomFitScreen, ACTIONS::zoomInCenter, ACTIONS::zoomOutCenter, and ACTIONS::zoomTool.

40 {
41  switch( aId )
42  {
43  case ID_ZOOM_IN: // toolbar button "Zoom In"
45 
46  case ID_ZOOM_OUT: // toolbar button "Zoom In"
48 
49  case ID_ZOOM_PAGE: // toolbar button "Fit on Screen"
51 
52  case ID_ZOOM_SELECTION:
54 
57 
60 
63 
66 
69 
72  break;
73  }
74 
75  return OPT<TOOL_EVENT>();
76 }
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
static TOOL_ACTION zoomTool
Definition: actions.h:58
Definition: id.h:241
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION highlightNet
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
static TOOL_ACTION measureTool
static TOOL_ACTION selectionTool
static TOOL_ACTION highlightAttribute
TOOL_EVENT MakeEvent() const
Function HasHotKey() Checks if the action has a hot key assigned.
Definition: tool_action.h:104
static TOOL_ACTION highlightClear
boost::optional< T > OPT
Definition: optional.h:7
static TOOL_ACTION highlightComponent

Member Data Documentation

TOOL_ACTION ACTIONS::centerContents
staticinherited
TOOL_ACTION GERBVIEW_ACTIONS::cursorClick
static

Cursor control.

Definition at line 99 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::cursorDblClick
static

Definition at line 100 of file gerbview_actions.h.

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 GERBVIEW_ACTIONS::dcodeDisplay
static
TOOL_ACTION GERBVIEW_ACTIONS::flashedDisplayOutlines
static
TOOL_ACTION GERBVIEW_ACTIONS::gridFast1
static

Definition at line 90 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridFast2
static

Definition at line 91 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridNext
static

Definition at line 92 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridPreset
static

Definition at line 96 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridPrev
static

Definition at line 93 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridResetOrigin
static

Definition at line 95 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::gridSetOrigin
static

Definition at line 94 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::highContrastDec
static

Definition at line 78 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::highContrastInc
static

Definition at line 77 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::highContrastMode
static

Definition at line 76 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::highlightAttribute
static
TOOL_ACTION GERBVIEW_ACTIONS::highlightClear
static
TOOL_ACTION GERBVIEW_ACTIONS::highlightComponent
static
TOOL_ACTION GERBVIEW_ACTIONS::layerAlphaDec
static

Definition at line 84 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::layerAlphaInc
static

Definition at line 83 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::layerChanged
static

Definition at line 87 of file gerbview_actions.h.

Referenced by GERBVIEW_FRAME::SetActiveLayer().

TOOL_ACTION GERBVIEW_ACTIONS::layerNext
static

Definition at line 82 of file gerbview_actions.h.

Referenced by GERBVIEW_CONTROL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::layerPrev
static

Definition at line 81 of file gerbview_actions.h.

Referenced by GERBVIEW_CONTROL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::layerToggle
static

Definition at line 85 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::linesDisplayOutlines
static
TOOL_ACTION GERBVIEW_ACTIONS::measureTool
static
TOOL_ACTION GERBVIEW_ACTIONS::negativeObjectDisplay
static
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 GERBVIEW_ACTIONS::panTool
static

Definition at line 105 of file gerbview_actions.h.

TOOL_ACTION ACTIONS::panUp
staticinherited

Definition at line 76 of file actions.h.

Referenced by COMMON_TOOLS::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::pickerTool
static

Definition at line 106 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::polygonsDisplayOutlines
static
TOOL_ACTION GERBVIEW_ACTIONS::properties
static

Activation of the edit tool.

Definition at line 57 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::resetCoords
static

Definition at line 107 of file gerbview_actions.h.

Referenced by GERBVIEW_CONTROL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::selectionActivate
static

Activation of the selection tool.

Definition at line 42 of file gerbview_actions.h.

Referenced by GERBVIEW_SELECTION_TOOL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::selectionClear
static

Clears the current selection.

Definition at line 48 of file gerbview_actions.h.

Referenced by GERBVIEW_SELECTION_TOOL::setTransitions(), and GERBVIEW_FRAME::ToPrinter().

TOOL_ACTION GERBVIEW_ACTIONS::selectionCursor
static

Select a single item under the cursor position.

Definition at line 45 of file gerbview_actions.h.

Referenced by GERBVIEW_SELECTION_TOOL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::selectionTool
static

Definition at line 103 of file gerbview_actions.h.

Referenced by TranslateLegacyId().

TOOL_ACTION GERBVIEW_ACTIONS::selectItem
static

Selects an item (specified as the event parameter).

Definition at line 51 of file gerbview_actions.h.

Referenced by GERBVIEW_SELECTION_TOOL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::showHelp
static

Definition at line 110 of file gerbview_actions.h.

Referenced by GERBVIEW_CONTROL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::switchCursor
static

Definition at line 108 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::switchUnits
static

Definition at line 109 of file gerbview_actions.h.

Referenced by GERBVIEW_CONTROL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::toBeDone
static

Definition at line 111 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::unselectItem
static

Unselects an item (specified as the event parameter).

Definition at line 54 of file gerbview_actions.h.

Referenced by GERBVIEW_SELECTION_TOOL::setTransitions().

TOOL_ACTION GERBVIEW_ACTIONS::zoomCenter
static

Definition at line 66 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomFitScreen
static

Definition at line 67 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomIn
static

Definition at line 62 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomInCenter
static

Definition at line 64 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomOut
static

Definition at line 63 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomOutCenter
static

Definition at line 65 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomPreset
static

Definition at line 68 of file gerbview_actions.h.

TOOL_ACTION GERBVIEW_ACTIONS::zoomTool
static

Definition at line 104 of file gerbview_actions.h.


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