Loading common/gal/cairo/cairo_gal.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2I( aParent->GetSize() ); cursorPixels = NULL; cursorPixelsSaved = NULL; initCursor(); // Grid color settings are different in Cairo and OpenGL Loading Loading @@ -808,6 +811,13 @@ void CAIRO_GAL::ClearTarget( RENDER_TARGET aTarget ) } void CAIRO_GAL::SetCursorSize( unsigned int aCursorSize ) { GAL::SetCursorSize( aCursorSize ); initCursor(); } void CAIRO_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { // Now we should only store the position of the mouse cursor Loading Loading @@ -890,6 +900,12 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) void CAIRO_GAL::initCursor() { if( cursorPixels ) delete cursorPixels; if( cursorPixelsSaved ) delete cursorPixelsSaved; cursorPixels = new wxBitmap( cursorSize, cursorSize ); cursorPixelsSaved = new wxBitmap( cursorSize, cursorSize ); Loading include/gal/cairo/cairo_gal.h +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ public: // Cursor // ------- /// @copydoc GAL::SetCursorSize() virtual void SetCursorSize( unsigned int aCursorSize ); /// @copydoc GAL::DrawCursor() virtual void DrawCursor( const VECTOR2D& aCursorPosition ); Loading include/gal/graphics_abstraction_layer.h +11 −1 Original line number Diff line number Diff line Loading @@ -783,12 +783,22 @@ public: cursorColor = aCursorColor; } /** * @brief Returns the cursor size. * * @return The current cursor size (in pixels). */ inline unsigned int GetCursorSize() const { return cursorSize; } /** * @brief Set the cursor size. * * @param aCursorSize is the size of the cursor expressed in pixels. */ inline void SetCursorSize( unsigned int aCursorSize ) virtual inline void SetCursorSize( unsigned int aCursorSize ) { cursorSize = aCursorSize; } Loading pcbnew/tools/common_actions.cpp +15 −5 Original line number Diff line number Diff line Loading @@ -29,13 +29,16 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions Loading Loading @@ -287,6 +290,10 @@ TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', "", "" ); TOOL_ACTION COMMON_ACTIONS::switchCursor( "pcbnew.Control.switchCursor", AS_GLOBAL, 0, "", "" ); TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.Control.switchUnits", AS_GLOBAL, MD_CTRL + int( 'U' ), "", "" ); Loading @@ -304,7 +311,8 @@ TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Placement tool Loading Loading @@ -420,6 +428,9 @@ boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: return COMMON_ACTIONS::highContrastMode.MakeEvent(); case ID_TB_OPTIONS_SELECT_CURSOR: return COMMON_ACTIONS::switchCursor.MakeEvent(); case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_PCB_DELETE_ITEM_BUTT: Loading @@ -427,7 +438,6 @@ boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_PCB_SHOW_1_RATSNEST_BUTT: case ID_PCB_PLACE_OFFSET_COORD_BUTT: case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: case ID_TB_OPTIONS_SELECT_CURSOR: case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: Loading pcbnew/tools/common_actions.h +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public: // Miscellaneous static TOOL_ACTION resetCoords; static TOOL_ACTION switchCursor; static TOOL_ACTION switchUnits; static TOOL_ACTION showHelp; static TOOL_ACTION toBeDone; Loading Loading
common/gal/cairo/cairo_gal.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2I( aParent->GetSize() ); cursorPixels = NULL; cursorPixelsSaved = NULL; initCursor(); // Grid color settings are different in Cairo and OpenGL Loading Loading @@ -808,6 +811,13 @@ void CAIRO_GAL::ClearTarget( RENDER_TARGET aTarget ) } void CAIRO_GAL::SetCursorSize( unsigned int aCursorSize ) { GAL::SetCursorSize( aCursorSize ); initCursor(); } void CAIRO_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { // Now we should only store the position of the mouse cursor Loading Loading @@ -890,6 +900,12 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) void CAIRO_GAL::initCursor() { if( cursorPixels ) delete cursorPixels; if( cursorPixelsSaved ) delete cursorPixelsSaved; cursorPixels = new wxBitmap( cursorSize, cursorSize ); cursorPixelsSaved = new wxBitmap( cursorSize, cursorSize ); Loading
include/gal/cairo/cairo_gal.h +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ public: // Cursor // ------- /// @copydoc GAL::SetCursorSize() virtual void SetCursorSize( unsigned int aCursorSize ); /// @copydoc GAL::DrawCursor() virtual void DrawCursor( const VECTOR2D& aCursorPosition ); Loading
include/gal/graphics_abstraction_layer.h +11 −1 Original line number Diff line number Diff line Loading @@ -783,12 +783,22 @@ public: cursorColor = aCursorColor; } /** * @brief Returns the cursor size. * * @return The current cursor size (in pixels). */ inline unsigned int GetCursorSize() const { return cursorSize; } /** * @brief Set the cursor size. * * @param aCursorSize is the size of the cursor expressed in pixels. */ inline void SetCursorSize( unsigned int aCursorSize ) virtual inline void SetCursorSize( unsigned int aCursorSize ) { cursorSize = aCursorSize; } Loading
pcbnew/tools/common_actions.cpp +15 −5 Original line number Diff line number Diff line Loading @@ -29,13 +29,16 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "", AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionSingle( "pcbnew.InteractiveSelection.Single", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere TOOL_ACTION COMMON_ACTIONS::selectionClear( "pcbnew.InteractiveSelection.Clear", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Edit tool actions Loading Loading @@ -287,6 +290,10 @@ TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.Control.resetCoords", AS_GLOBAL, ' ', "", "" ); TOOL_ACTION COMMON_ACTIONS::switchCursor( "pcbnew.Control.switchCursor", AS_GLOBAL, 0, "", "" ); TOOL_ACTION COMMON_ACTIONS::switchUnits( "pcbnew.Control.switchUnits", AS_GLOBAL, MD_CTRL + int( 'U' ), "", "" ); Loading @@ -304,7 +311,8 @@ TOOL_ACTION COMMON_ACTIONS::routerActivate( "pcbnew.InteractiveRouter", "Run push & shove router", "Run push & shove router", AF_ACTIVATE ); TOOL_ACTION COMMON_ACTIONS::pointEditorUpdate( "pcbnew.PointEditor.update", AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere AS_GLOBAL, 0, "", "" ); // No description, it is not supposed to be shown anywhere // Placement tool Loading Loading @@ -420,6 +428,9 @@ boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: return COMMON_ACTIONS::highContrastMode.MakeEvent(); case ID_TB_OPTIONS_SELECT_CURSOR: return COMMON_ACTIONS::switchCursor.MakeEvent(); case ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH: case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH: case ID_PCB_DELETE_ITEM_BUTT: Loading @@ -427,7 +438,6 @@ boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId ) case ID_PCB_SHOW_1_RATSNEST_BUTT: case ID_PCB_PLACE_OFFSET_COORD_BUTT: case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: case ID_TB_OPTIONS_SELECT_CURSOR: case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR: case ID_MICROWAVE_V_TOOLBAR: Loading
pcbnew/tools/common_actions.h +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public: // Miscellaneous static TOOL_ACTION resetCoords; static TOOL_ACTION switchCursor; static TOOL_ACTION switchUnits; static TOOL_ACTION showHelp; static TOOL_ACTION toBeDone; Loading