KiCad PCB EDA Suite
SYMBOL_EDITOR_EDIT_TOOL Class Reference

#include <symbol_editor_edit_tool.h>

Inheritance diagram for SYMBOL_EDITOR_EDIT_TOOL:
EE_TOOL_BASE< SYMBOL_EDIT_FRAME > TOOL_INTERACTIVE TOOL_BASE

Public Types

enum  RESET_REASON { RUN , MODEL_RELOAD , GAL_SWITCH , REDRAW }
 Determine the reason of reset for a tool. More...
 

Public Member Functions

 SYMBOL_EDITOR_EDIT_TOOL ()
 
 ~SYMBOL_EDITOR_EDIT_TOOL () override
 
bool Init () override
 Init() is called once upon a registration of the tool. More...
 
int Rotate (const TOOL_EVENT &aEvent)
 
int Mirror (const TOOL_EVENT &aEvent)
 
int Duplicate (const TOOL_EVENT &aEvent)
 
int Properties (const TOOL_EVENT &aEvent)
 
int PinTable (const TOOL_EVENT &aEvent)
 
int SetUnitDisplayName (const TOOL_EVENT &aEvent)
 
int UpdateSymbolFields (const TOOL_EVENT &aEvent)
 
int Undo (const TOOL_EVENT &aEvent)
 
int Redo (const TOOL_EVENT &aEvent)
 
int Cut (const TOOL_EVENT &aEvent)
 
int Copy (const TOOL_EVENT &aEvent)
 
int Paste (const TOOL_EVENT &aEvent)
 
int DoDelete (const TOOL_EVENT &aEvent)
 Delete the selected items, or the item under the cursor. More...
 
int DeleteItemCursor (const TOOL_EVENT &aEvent)
 
void Reset (RESET_REASON aReason) override
 Bring the tool to a known, initial state. More...
 
void Activate ()
 Run the tool. More...
 
TOOL_MENUGetToolMenu ()
 
void SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON)
 Assign a context menu and tells when it should be activated. More...
 
void RunMainStack (std::function< void()> aFunc)
 Call a function using the main stack. More...
 
template<class T >
void Go (int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
 Define which state (aStateFunc) to go when a certain event arrives (aConditions). More...
 
TOOL_EVENTWait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
 Suspend execution of the tool until an event specified in aEventList arrives. More...
 
TOOL_TYPE GetType () const
 Return the type of the tool. More...
 
TOOL_ID GetId () const
 Return the unique identifier of the tool. More...
 
const std::string & GetName () const
 Return the name of the tool. More...
 
TOOL_MANAGERGetManager () const
 Return the instance of TOOL_MANAGER that takes care of the tool. More...
 
bool IsToolActive () const
 

Protected Member Functions

void updateItem (EDA_ITEM *aItem, bool aUpdateRTree) const
 Similar to getView()->Update(), but handles items that are redrawn by their parents and updating the SCH_SCREEN's RTree. More...
 
void saveCopyInUndoList (EDA_ITEM *aItem, UNDO_REDO aType, bool aAppend=false, bool aDirtyConnectivity=true)
 
void attachManager (TOOL_MANAGER *aManager)
 Set the TOOL_MANAGER the tool will belong to. More...
 
KIGFX::VIEWgetView () const
 Returns the instance of #VIEW object used in the application. More...
 
KIGFX::VIEW_CONTROLSgetViewControls () const
 Return the instance of VIEW_CONTROLS object used in the application. More...
 
template<typename T >
T * getEditFrame () const
 Return the application window object, casted to requested user type. More...
 
template<typename T >
T * getModel () const
 Return the model object if it matches the requested type. More...
 

Protected Attributes

SYMBOL_EDIT_FRAMEm_frame
 
KIGFX::SCH_VIEWm_view
 
EE_SELECTION_TOOLm_selectionTool
 
bool m_isSymbolEditor
 
TOOL_MENU m_menu
 The functions below are not yet implemented - their interface may change. More...
 
TOOL_TYPE m_type
 Unique identifier for the tool, assigned by a TOOL_MANAGER instance. More...
 
TOOL_ID m_toolId
 Name of the tool. More...
 
std::string m_toolName
 
TOOL_MANAGERm_toolMgr
 

Private Member Functions

void editShapeProperties (LIB_SHAPE *aShape)
 
void editTextProperties (LIB_ITEM *aItem)
 
void editTextBoxProperties (LIB_ITEM *aItem)
 
void editFieldProperties (LIB_FIELD *aField)
 
void editSymbolProperties ()
 
void handlePinDuplication (LIB_PIN *aOldPin, LIB_PIN *aNewPin, int &aSymbolLastPinNumber)
 Set up handlers for various events. More...
 
void setTransitions () override
 This method is meant to be overridden in order to specify handlers for events. More...
 
void resetTransitions ()
 Clear the current transition map and restores the default one created by setTransitions(). More...
 
void goInternal (TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions)
 
EDA_ITEMgetModelInt () const
 
TOOLS_HOLDERgetToolHolderInt () const
 

Private Attributes

EDA_ITEMm_pickerItem
 

Detailed Description

Definition at line 34 of file symbol_editor_edit_tool.h.

Member Enumeration Documentation

◆ RESET_REASON

enum TOOL_BASE::RESET_REASON
inherited

Determine the reason of reset for a tool.

Enumerator
RUN 

Tool is invoked after being inactive.

MODEL_RELOAD 

Model changes (required full reload)

GAL_SWITCH 

Rendering engine changes.

REDRAW 

Full drawing refresh.

Definition at line 77 of file tool_base.h.

78 {
79 RUN,
82 REDRAW
83 };
@ REDRAW
Full drawing refresh.
Definition: tool_base.h:82
@ MODEL_RELOAD
Model changes (required full reload)
Definition: tool_base.h:80
@ GAL_SWITCH
Rendering engine changes.
Definition: tool_base.h:81
@ RUN
Tool is invoked after being inactive.
Definition: tool_base.h:79

Constructor & Destructor Documentation

◆ SYMBOL_EDITOR_EDIT_TOOL()

SYMBOL_EDITOR_EDIT_TOOL::SYMBOL_EDITOR_EDIT_TOOL ( )

Definition at line 48 of file symbol_editor_edit_tool.cpp.

48 :
49 EE_TOOL_BASE( "eeschema.SymbolEditTool" ),
50 m_pickerItem( nullptr )
51{
52}
EE_TOOL_BASE(const std::string &aName)
Create a tool with given name.
Definition: ee_tool_base.h:55

◆ ~SYMBOL_EDITOR_EDIT_TOOL()

SYMBOL_EDITOR_EDIT_TOOL::~SYMBOL_EDITOR_EDIT_TOOL ( )
inlineoverride

Definition at line 38 of file symbol_editor_edit_tool.h.

38{ }

Member Function Documentation

◆ Activate()

void TOOL_INTERACTIVE::Activate ( )
inherited

Run the tool.

After activation, the tool starts receiving events until it is finished.

Definition at line 51 of file tool_interactive.cpp.

52{
54}
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:215
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:210
bool InvokeTool(TOOL_ID aToolId)
Call a tool by sending a tool activation event to tool of given ID.

References TOOL_MANAGER::InvokeTool(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.

Referenced by AUTOPLACE_TOOL::autoplace(), EDIT_TOOL::copyToClipboard(), SCH_EDIT_TOOL::DeleteItemCursor(), DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), PAD_TOOL::EnumeratePads(), PCB_CONTROL::GridSetOrigin(), SCH_EDITOR_CONTROL::HighlightNetCursor(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EE_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), ROUTER_TOOL::RouteSelected(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ attachManager()

void TOOL_BASE::attachManager ( TOOL_MANAGER aManager)
protectedinherited

Set the TOOL_MANAGER the tool will belong to.

Called by TOOL_MANAGER::RegisterTool()

Definition at line 60 of file tool_base.cpp.

61{
62 m_toolMgr = aManager;
63}

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ Copy()

int SYMBOL_EDITOR_EDIT_TOOL::Copy ( const TOOL_EVENT aEvent)

Definition at line 720 of file symbol_editor_edit_tool.cpp.

721{
722 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
724
725 if( !symbol || !selection.GetSize() )
726 return 0;
727
728 for( LIB_ITEM& item : symbol->GetDrawItems() )
729 {
730 if( item.Type() == LIB_FIELD_T )
731 continue;
732
733 wxASSERT( !item.HasFlag( STRUCT_DELETED ) );
734
735 if( !item.IsSelected() )
736 item.SetFlags( STRUCT_DELETED );
737 }
738
739 LIB_SYMBOL* partCopy = new LIB_SYMBOL( *symbol );
740
741 STRING_FORMATTER formatter;
742 SCH_SEXPR_PLUGIN::FormatLibSymbol( partCopy, formatter );
743
744 delete partCopy;
745
746 for( LIB_ITEM& item : symbol->GetDrawItems() )
748
749 if( m_toolMgr->SaveClipboard( formatter.GetString() ) )
750 return 0;
751 else
752 return -1;
753}
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: eda_item.h:141
EE_SELECTION & RequestSelection(const std::vector< KICAD_T > &aScanTypes={ SCH_LOCATE_ANY_T })
Return either an existing selection (filtered), or the selection at the current cursor position if th...
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:191
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
Define a library symbol object.
Definition: lib_symbol.h:99
LIB_ITEMS_CONTAINER & GetDrawItems()
Return a reference to the draw item list.
Definition: lib_symbol.h:508
static void FormatLibSymbol(LIB_SYMBOL *aPart, OUTPUTFORMATTER &aFormatter)
virtual unsigned int GetSize() const override
Return the number of stored items.
Definition: selection.h:99
Implement an OUTPUTFORMATTER to a memory buffer.
Definition: richio.h:415
const std::string & GetString()
Definition: richio.h:438
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
bool SaveClipboard(const std::string &aTextUTF8)
Store information to the system clipboard.
#define STRUCT_DELETED
flag indication structures to be erased
static std::vector< KICAD_T > nonFields
@ LIB_FIELD_T
Definition: typeinfo.h:208

References EDA_ITEM::ClearFlags(), SCH_SEXPR_PLUGIN::FormatLibSymbol(), SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::GetDrawItems(), SELECTION::GetSize(), STRING_FORMATTER::GetString(), LIB_FIELD_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, nonFields, EE_SELECTION_TOOL::RequestSelection(), TOOL_MANAGER::SaveClipboard(), and STRUCT_DELETED.

Referenced by Cut(), and setTransitions().

◆ Cut()

int SYMBOL_EDITOR_EDIT_TOOL::Cut ( const TOOL_EVENT aEvent)

Definition at line 709 of file symbol_editor_edit_tool.cpp.

710{
711 int retVal = Copy( aEvent );
712
713 if( retVal == 0 )
714 retVal = DoDelete( aEvent );
715
716 return retVal;
717}
int Copy(const TOOL_EVENT &aEvent)
int DoDelete(const TOOL_EVENT &aEvent)
Delete the selected items, or the item under the cursor.

References Copy(), and DoDelete().

Referenced by setTransitions().

◆ DeleteItemCursor()

int SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor ( const TOOL_EVENT aEvent)

Definition at line 331 of file symbol_editor_edit_tool.cpp.

332{
334
336 m_pickerItem = nullptr;
337
338 // Deactivate other tools; particularly important if another PICKER is currently running
339 Activate();
340
341 picker->SetCursor( KICURSOR::REMOVE );
342
343 picker->SetClickHandler(
344 [this]( const VECTOR2D& aPosition ) -> bool
345 {
346 if( m_pickerItem )
347 {
349 selectionTool->UnbrightenItem( m_pickerItem );
350 selectionTool->AddItemToSel( m_pickerItem, true /*quiet mode*/ );
352 m_pickerItem = nullptr;
353 }
354
355 return true;
356 } );
357
358 picker->SetMotionHandler(
359 [this]( const VECTOR2D& aPos )
360 {
362 EE_COLLECTOR collector;
363
364 selectionTool->CollectHits( collector, aPos, nonFields );
365
366 // Remove unselectable items
367 for( int i = collector.GetCount() - 1; i >= 0; --i )
368 {
369 if( !selectionTool->Selectable( collector[ i ] ) )
370 collector.Remove( i );
371 }
372
373 if( collector.GetCount() > 1 )
374 selectionTool->GuessSelectionCandidates( collector, aPos );
375
376 EDA_ITEM* item = collector.GetCount() == 1 ? collector[ 0 ] : nullptr;
377
378 if( m_pickerItem != item )
379 {
380 if( m_pickerItem )
381 selectionTool->UnbrightenItem( m_pickerItem );
382
383 m_pickerItem = item;
384
385 if( m_pickerItem )
386 selectionTool->BrightenItem( m_pickerItem );
387 }
388 } );
389
390 picker->SetFinalizeHandler(
391 [this]( const int& aFinalState )
392 {
393 if( m_pickerItem )
394 m_toolMgr->GetTool<EE_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
395
396 // Wake the selection tool after exiting to ensure the cursor gets updated
398 } );
399
401
402 return 0;
403}
static TOOL_ACTION pickerTool
Definition: actions.h:159
static TOOL_ACTION doDelete
Definition: actions.h:73
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
static TOOL_ACTION selectionActivate
Activation of the selection tool.
Definition: ee_actions.h:46
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
bool Selectable(const EDA_ITEM *aItem, const VECTOR2I *aPos=nullptr, bool checkVisibilityOnly=false) const
Check conditions for an item to be selected.
void GuessSelectionCandidates(EE_COLLECTOR &collector, const VECTOR2I &aPos)
Apply heuristics to try and determine a single object when multiple are found under the cursor.
bool CollectHits(EE_COLLECTOR &aCollector, const VECTOR2I &aWhere, const std::vector< KICAD_T > &aScanTypes={ SCH_LOCATE_ANY_T })
Collect one or more items at a given point.
void SetMotionHandler(MOTION_HANDLER aHandler)
Set a handler for mouse motion.
Definition: picker_tool.h:82
void SetClickHandler(CLICK_HANDLER aHandler)
Set a handler for mouse click event.
Definition: picker_tool.h:71
void SetCursor(KICURSOR aCursor)
Definition: picker_tool.h:62
void SetFinalizeHandler(FINALIZE_HANDLER aHandler)
Set a handler for the finalize event.
Definition: picker_tool.h:102
void BrightenItem(EDA_ITEM *aItem)
int AddItemToSel(const TOOL_EVENT &aEvent)
void UnbrightenItem(EDA_ITEM *aItem)
void Activate()
Run the tool.
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:142

References TOOL_INTERACTIVE::Activate(), SELECTION_TOOL::AddItemToSel(), SELECTION_TOOL::BrightenItem(), EE_ACTIONS::clearSelection, EE_SELECTION_TOOL::CollectHits(), ACTIONS::doDelete, TOOL_MANAGER::GetTool(), EE_SELECTION_TOOL::GuessSelectionCandidates(), m_pickerItem, TOOL_BASE::m_toolMgr, nonFields, ACTIONS::pickerTool, REMOVE, TOOL_MANAGER::RunAction(), EE_SELECTION_TOOL::Selectable(), EE_ACTIONS::selectionActivate, PICKER_TOOL_BASE::SetClickHandler(), PICKER_TOOL_BASE::SetCursor(), PICKER_TOOL_BASE::SetFinalizeHandler(), PICKER_TOOL_BASE::SetMotionHandler(), and SELECTION_TOOL::UnbrightenItem().

Referenced by setTransitions().

◆ DoDelete()

int SYMBOL_EDITOR_EDIT_TOOL::DoDelete ( const TOOL_EVENT aEvent)

Delete the selected items, or the item under the cursor.

Run the deletion tool.

Definition at line 253 of file symbol_editor_edit_tool.cpp.

254{
255 LIB_SYMBOL *symbol = m_frame->GetCurSymbol();
256 std::deque<EDA_ITEM*> items = m_selectionTool->RequestSelection( nonFields ).GetItems();
257
258 if( items.empty() )
259 return 0;
260
261 // Don't leave a freed pointer in the selection
263
265
266 std::set<LIB_ITEM *> toDelete;
267
268 for( EDA_ITEM* item : items )
269 {
270 if( item->Type() == LIB_PIN_T )
271 {
272 LIB_PIN* curr_pin = static_cast<LIB_PIN*>( item );
273 VECTOR2I pos = curr_pin->GetPosition();
274
275 toDelete.insert( curr_pin );
276
277 // when pin editing is synchronized, pins in the same position, with the same name
278 // in different units are also removed. But only one pin per unit (matching)
279 if( m_frame->SynchronizePins() )
280 {
281 std::vector<bool> got_unit( symbol->GetUnitCount() + 1 );
282
283 got_unit[curr_pin->GetUnit()] = true;
284
285 int curr_convert = curr_pin->GetConvert();
286 ELECTRICAL_PINTYPE etype = curr_pin->GetType();
287 wxString name = curr_pin->GetName();
288 std::vector<LIB_PIN*> pins = symbol->GetAllLibPins();
289
290 for( LIB_PIN* pin : pins )
291 {
292 if( got_unit[pin->GetUnit()] )
293 continue;
294
295 if( pin->GetPosition() != pos )
296 continue;
297
298 if( pin->GetConvert() != curr_convert )
299 continue;
300
301 if( pin->GetType() != etype )
302 continue;
303
304 if( pin->GetName() != name )
305 continue;
306
307 toDelete.insert( pin );
308 got_unit[pin->GetUnit()] = true;
309 }
310 }
311 }
312 else
313 {
314 toDelete.insert( (LIB_ITEM*) item );
315 }
316 }
317
318 for( LIB_ITEM* item : toDelete )
319 symbol->RemoveDrawItem( item );
320
322 m_frame->OnModify();
323
324 return 0;
325}
const char * name
Definition: DXF_plotter.cpp:56
void saveCopyInUndoList(EDA_ITEM *aItem, UNDO_REDO aType, bool aAppend=false, bool aDirtyConnectivity=true)
Definition: ee_tool_base.h:134
int GetUnit() const
Definition: lib_item.h:273
int GetConvert() const
Definition: lib_item.h:276
ELECTRICAL_PINTYPE GetType() const
Definition: lib_pin.h:90
VECTOR2I GetPosition() const override
Definition: lib_pin.h:228
const wxString & GetName() const
Definition: lib_pin.h:112
void RemoveDrawItem(LIB_ITEM *aItem)
Remove draw aItem from list.
Definition: lib_symbol.cpp:794
std::vector< LIB_PIN * > GetAllLibPins() const
Return a list of pin pointers for all units / converts.
Definition: lib_symbol.cpp:858
int GetUnitCount() const override
For items with units, return the number of units.
const std::deque< EDA_ITEM * > GetItems() const
Definition: selection.h:120
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
@ LIB_PIN_T
Definition: typeinfo.h:202

References EE_ACTIONS::clearSelection, LIB_SYMBOL::GetAllLibPins(), LIB_ITEM::GetConvert(), SYMBOL_EDIT_FRAME::GetCurSymbol(), SELECTION::GetItems(), LIB_PIN::GetName(), LIB_PIN::GetPosition(), LIB_PIN::GetType(), LIB_ITEM::GetUnit(), LIB_SYMBOL::GetUnitCount(), LIB_PIN_T, LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, name, nonFields, SYMBOL_EDIT_FRAME::OnModify(), pin, SYMBOL_EDIT_FRAME::RebuildView(), LIB_SYMBOL::RemoveDrawItem(), EE_SELECTION_TOOL::RequestSelection(), TOOL_MANAGER::RunAction(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), and SYMBOL_EDIT_FRAME::SynchronizePins().

Referenced by Cut(), and setTransitions().

◆ Duplicate()

int SYMBOL_EDITOR_EDIT_TOOL::Duplicate ( const TOOL_EVENT aEvent)

Definition at line 821 of file symbol_editor_edit_tool.cpp.

822{
823 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
825
826 if( selection.GetSize() == 0 )
827 return 0;
828
829 // Doing a duplicate of a new object doesn't really make any sense; we'd just end
830 // up dragging around a stack of objects...
831 if( selection.Front()->IsNew() )
832 return 0;
833
834 if( !selection.Front()->IsMoving() )
836
837 EDA_ITEMS newItems;
838 int symbolLastPinNumber = -1;
839
840 for( unsigned ii = 0; ii < selection.GetSize(); ++ii )
841 {
842 LIB_ITEM* oldItem = static_cast<LIB_ITEM*>( selection.GetItem( ii ) );
843 LIB_ITEM* newItem = (LIB_ITEM*) oldItem->Clone();
844
845 if( oldItem->Type() == LIB_PIN_T )
846 {
847 if( symbolLastPinNumber == -1 )
848 {
849 symbolLastPinNumber = symbol->GetMaxPinNumber();
850 }
851
852 handlePinDuplication( static_cast<LIB_PIN*>( oldItem ),
853 static_cast<LIB_PIN*>( newItem ), symbolLastPinNumber );
854 }
855
856 oldItem->ClearFlags( IS_NEW | IS_PASTED | SELECTED );
857 newItem->SetFlags( IS_NEW | IS_PASTED | SELECTED );
858 newItem->SetParent( symbol );
859 newItems.push_back( newItem );
860
861 symbol->AddDrawItem( newItem );
862 getView()->Add( newItem );
863 }
864
866 m_toolMgr->RunAction( EE_ACTIONS::addItemsToSel, true, &newItems );
867
868 selection.SetReferencePoint( mapCoords( getViewControls()->GetCursorPosition( true ) ) );
870
871 return 0;
872}
VECTOR2D mapCoords(const VECTOR2D &aSource)
Definition: PS_plotter.cpp:568
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition: eda_item.h:139
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:100
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Definition: eda_item.cpp:82
bool IsMoving() const
Definition: eda_item.h:104
bool IsNew() const
Definition: eda_item.h:103
static TOOL_ACTION addItemsToSel
Selects a list of items (specified as the event parameter)
Definition: ee_actions.h:63
static TOOL_ACTION move
Definition: ee_actions.h:120
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Definition: view.cpp:316
int GetMaxPinNumber() const
void AddDrawItem(LIB_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Definition: lib_symbol.cpp:820
virtual KIGFX::VIEW_ITEM * GetItem(unsigned int aIdx) const override
Definition: selection.cpp:75
EDA_ITEM * Front() const
Definition: selection.h:208
void SetReferencePoint(const VECTOR2I &aP)
Definition: selection.h:260
void handlePinDuplication(LIB_PIN *aOldPin, LIB_PIN *aNewPin, int &aSymbolLastPinNumber)
Set up handlers for various events.
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition: tool_base.cpp:42
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
Definition: eda_item.h:524
#define IS_PASTED
Modifier on IS_NEW which indicates it came from clipboard.
#define IS_NEW
New item, just created.
#define SELECTED
Item was manually selected by the user.

References KIGFX::VIEW::Add(), LIB_SYMBOL::AddDrawItem(), EE_ACTIONS::addItemsToSel, EDA_ITEM::ClearFlags(), EE_ACTIONS::clearSelection, EDA_ITEM::Clone(), SELECTION::Front(), SYMBOL_EDIT_FRAME::GetCurSymbol(), SELECTION::GetItem(), LIB_SYMBOL::GetMaxPinNumber(), SELECTION::GetSize(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), handlePinDuplication(), IS_NEW, IS_PASTED, EDA_ITEM::IsMoving(), EDA_ITEM::IsNew(), LIB_PIN_T, LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, mapCoords(), EE_ACTIONS::move, nonFields, EE_SELECTION_TOOL::RequestSelection(), TOOL_MANAGER::RunAction(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), SELECTED, EDA_ITEM::SetFlags(), EDA_ITEM::SetParent(), SELECTION::SetReferencePoint(), and EDA_ITEM::Type().

Referenced by setTransitions().

◆ editFieldProperties()

void SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties ( LIB_FIELD aField)
private

Definition at line 518 of file symbol_editor_edit_tool.cpp.

519{
520 if( aField == nullptr )
521 return;
522
523 wxString caption;
524 LIB_SYMBOL* parent = aField->GetParent();
525 wxCHECK( parent, /* void */ );
526
527 if( aField->GetId() < MANDATORY_FIELDS )
528 caption.Printf( _( "Edit %s Field" ), TitleCaps( aField->GetName() ) );
529 else
530 caption.Printf( _( "Edit '%s' Field" ), aField->GetName() );
531
532 DIALOG_LIB_FIELD_PROPERTIES dlg( m_frame, caption, aField );
533
534 // The dialog may invoke a kiway player for footprint fields
535 // so we must use a quasimodal dialog.
536 if( dlg.ShowQuasiModal() != wxID_OK )
537 return;
538
539 wxString newFieldValue = EscapeString( dlg.GetText(), CTX_LIBID );
540 wxString oldFieldValue = aField->GetFullText( m_frame->GetUnit() );
541
543
544 dlg.UpdateField( aField );
545
546 updateItem( aField, true );
548 m_frame->OnModify();
550}
Handle editing a single symbol field in the symbol editor.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void updateItem(EDA_ITEM *aItem, bool aUpdateRTree) const
Similar to getView()->Update(), but handles items that are redrawn by their parents and updating the ...
Definition: ee_tool_base.h:103
wxString GetFullText(int unit=1) const
Return the text of a field.
Definition: lib_field.cpp:397
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
Definition: lib_field.cpp:476
int GetId() const
Definition: lib_field.h:114
LIB_SYMBOL * GetParent() const
Definition: lib_item.h:168
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void UpdateSymbolMsgPanelInfo()
Display the documentation of the selected symbol.
#define _(s)
wxString TitleCaps(const wxString &aString)
Capitalize the first letter in each word.
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
@ CTX_LIBID
Definition: string_utils.h:55
@ MANDATORY_FIELDS
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.

References _, CTX_LIBID, EscapeString(), SCH_BASE_FRAME::GetCanvas(), LIB_FIELD::GetFullText(), LIB_FIELD::GetId(), LIB_FIELD::GetName(), LIB_ITEM::GetParent(), DIALOG_FIELD_PROPERTIES::GetText(), SYMBOL_EDIT_FRAME::GetUnit(), LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, MANDATORY_FIELDS, SYMBOL_EDIT_FRAME::OnModify(), EDA_DRAW_PANEL_GAL::Refresh(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), DIALOG_SHIM::ShowQuasiModal(), TitleCaps(), DIALOG_LIB_FIELD_PROPERTIES::UpdateField(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem(), and SYMBOL_EDIT_FRAME::UpdateSymbolMsgPanelInfo().

Referenced by Properties().

◆ editShapeProperties()

void SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties ( LIB_SHAPE aShape)
private

Definition at line 465 of file symbol_editor_edit_tool.cpp.

466{
468
469 if( dlg.ShowModal() != wxID_OK )
470 return;
471
472 updateItem( aShape, true );
474 m_frame->OnModify();
475
477 drawingTools->SetDrawSpecificConvert( !dlg.GetApplyToAllConversions() );
478 drawingTools->SetDrawSpecificUnit( !dlg.GetApplyToAllUnits() );
479
480 std::vector<MSG_PANEL_ITEM> items;
481 aShape->GetMsgPanelInfo( m_frame, items );
482 m_frame->SetMsgPanel( items );
483}
Dialog to edit library component graphic items.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
Definition: lib_shape.cpp:461
SYMBOL_EDITOR_DRAWING_TOOLS.

References DIALOG_LIB_SHAPE_PROPERTIES::GetApplyToAllConversions(), DIALOG_LIB_SHAPE_PROPERTIES::GetApplyToAllUnits(), SCH_BASE_FRAME::GetCanvas(), LIB_SHAPE::GetMsgPanelInfo(), TOOL_MANAGER::GetTool(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, TOOL_BASE::m_toolMgr, SYMBOL_EDIT_FRAME::OnModify(), EDA_DRAW_PANEL_GAL::Refresh(), SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificConvert(), SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificUnit(), EDA_DRAW_FRAME::SetMsgPanel(), and EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().

Referenced by Properties().

◆ editSymbolProperties()

void SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties ( )
private

Definition at line 553 of file symbol_editor_edit_tool.cpp.

554{
555 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
556 bool partLocked = symbol->UnitsLocked();
557
560
562
563 // This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal
564 // frame. Therefore this dialog as a modal frame parent, MUST be run under
565 // quasimodal mode for the quasimodal frame support to work. So don't use
566 // the QUASIMODAL macros here.
567 if( dlg.ShowQuasiModal() != wxID_OK )
568 return;
569
570 m_frame->OnModify();
571
572 // if m_UnitSelectionLocked has changed, set some edit options or defaults
573 // to the best value
574 if( partLocked != symbol->UnitsLocked() )
575 {
577
578 // Enable synchronized pin edit mode for symbols with interchangeable units
579 m_frame->m_SyncPinEdit = !symbol->UnitsLocked();
580
581 // also set default edit options to the better value
582 // Usually if units are locked, graphic items are specific to each unit
583 // and if units are interchangeable, graphic items are common to units
584 tools->SetDrawSpecificUnit( symbol->UnitsLocked() );
585 }
586}
static TOOL_ACTION cancelInteractive
Definition: actions.h:63
bool UnitsLocked() const
Check whether symbol units are interchangeable.
Definition: lib_symbol.h:258
bool m_SyncPinEdit
Set to true to synchronize pins at the same position when editing symbols with multiple units or mult...

References ACTIONS::cancelInteractive, EE_ACTIONS::clearSelection, SYMBOL_EDIT_FRAME::GetCurSymbol(), TOOL_MANAGER::GetTool(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SYMBOL_EDIT_FRAME::m_SyncPinEdit, TOOL_BASE::m_toolMgr, SYMBOL_EDIT_FRAME::OnModify(), TOOL_MANAGER::RunAction(), DIALOG_SHIM::ShowQuasiModal(), tools, and LIB_SYMBOL::UnitsLocked().

Referenced by Properties().

◆ editTextBoxProperties()

void SYMBOL_EDITOR_EDIT_TOOL::editTextBoxProperties ( LIB_ITEM aItem)
private

Definition at line 502 of file symbol_editor_edit_tool.cpp.

503{
504 if ( aItem->Type() != LIB_TEXTBOX_T )
505 return;
506
507 DIALOG_LIB_TEXTBOX_PROPERTIES dlg( m_frame, static_cast<LIB_TEXTBOX*>( aItem ) );
508
509 if( dlg.ShowModal() != wxID_OK )
510 return;
511
512 updateItem( aItem, true );
514 m_frame->OnModify( );
515}
@ LIB_TEXTBOX_T
Definition: typeinfo.h:201

References SCH_BASE_FRAME::GetCanvas(), LIB_TEXTBOX_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SYMBOL_EDIT_FRAME::OnModify(), EDA_DRAW_PANEL_GAL::Refresh(), EDA_ITEM::Type(), and EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().

Referenced by Properties().

◆ editTextProperties()

void SYMBOL_EDITOR_EDIT_TOOL::editTextProperties ( LIB_ITEM aItem)
private

Definition at line 486 of file symbol_editor_edit_tool.cpp.

487{
488 if ( aItem->Type() != LIB_TEXT_T )
489 return;
490
491 DIALOG_LIB_TEXT_PROPERTIES dlg( m_frame, static_cast<LIB_TEXT*>( aItem ) );
492
493 if( dlg.ShowModal() != wxID_OK )
494 return;
495
496 updateItem( aItem, true );
498 m_frame->OnModify( );
499}
Define a symbol library graphical text item.
Definition: lib_text.h:40
@ LIB_TEXT_T
Definition: typeinfo.h:200

References SCH_BASE_FRAME::GetCanvas(), LIB_TEXT_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SYMBOL_EDIT_FRAME::OnModify(), EDA_DRAW_PANEL_GAL::Refresh(), EDA_ITEM::Type(), and EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().

Referenced by Properties().

◆ getEditFrame()

template<typename T >
T * TOOL_BASE::getEditFrame ( ) const
inlineprotectedinherited

Return the application window object, casted to requested user type.

Definition at line 185 of file tool_base.h.

186 {
187#if !defined( QA_TEST ) // Dynamic casts give the linker a seizure in the test framework
188 wxASSERT( dynamic_cast<T*>( getToolHolderInt() ) );
189#endif
190 return static_cast<T*>( getToolHolderInt() );
191 }
TOOLS_HOLDER * getToolHolderInt() const
Definition: tool_base.cpp:48

References TOOL_BASE::getToolHolderInt().

Referenced by ZONE_CREATE_HELPER::createNewZone(), and ZONE_CREATE_HELPER::setUniquePriority().

◆ GetId()

TOOL_ID TOOL_BASE::GetId ( ) const
inlineinherited

Return the unique identifier of the tool.

The identifier is set by an instance of TOOL_MANAGER.

Returns
Identifier of the tool.

Definition at line 121 of file tool_base.h.

122 {
123 return m_toolId;
124 }

References TOOL_BASE::m_toolId.

Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::isActive(), TOOL_MANAGER::RegisterTool(), ACTION_MANAGER::RunHotKey(), TOOL_MANAGER::runTool(), TOOL_MANAGER::saveViewControls(), and TOOL_MANAGER::ShutdownTool().

◆ GetManager()

TOOL_MANAGER * TOOL_BASE::GetManager ( ) const
inlineinherited

◆ getModel()

template<typename T >
T * TOOL_BASE::getModel ( ) const
inlineprotectedinherited

Return the model object if it matches the requested type.

Store the type of the tool.

Definition at line 197 of file tool_base.h.

References TOOL_BASE::getModelInt().

Referenced by ZONE_CREATE_HELPER::commitZone(), and ZONE_CREATE_HELPER::createZoneFromExisting().

◆ getModelInt()

EDA_ITEM * TOOL_BASE::getModelInt ( ) const
privateinherited

Definition at line 54 of file tool_base.cpp.

55{
56 return m_toolMgr->GetModel();
57}
EDA_ITEM * GetModel() const
Definition: tool_manager.h:292

References TOOL_MANAGER::GetModel(), and TOOL_BASE::m_toolMgr.

Referenced by TOOL_BASE::getModel().

◆ GetName()

const std::string & TOOL_BASE::GetName ( void  ) const
inlineinherited

Return the name of the tool.

Tool names are expected to obey the format: application.ToolName (eg. pcbnew.InteractiveSelection).

Returns
The name of the tool.

Definition at line 134 of file tool_base.h.

135 {
136 return m_toolName;
137 }
std::string m_toolName
Definition: tool_base.h:214

References TOOL_BASE::m_toolName.

Referenced by TOOL_MANAGER::dispatchInternal(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::invokeTool(), TOOL_MANAGER::RegisterTool(), TOOL_MANAGER::runTool(), and TOOL_MANAGER::ShutdownTool().

◆ getToolHolderInt()

TOOLS_HOLDER * TOOL_BASE::getToolHolderInt ( ) const
privateinherited

Definition at line 48 of file tool_base.cpp.

49{
50 return m_toolMgr->GetToolHolder();
51}
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:296

References TOOL_MANAGER::GetToolHolder(), and TOOL_BASE::m_toolMgr.

Referenced by TOOL_BASE::getEditFrame().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Return the type of the tool.

Returns
The type of the tool.

Definition at line 109 of file tool_base.h.

110 {
111 return m_type;
112 }
TOOL_TYPE m_type
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition: tool_base.h:207

References TOOL_BASE::m_type.

Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InvokeTool(), TOOL_MANAGER::ResetTools(), TOOL_MANAGER::runTool(), and TOOL_MANAGER::ShutdownTool().

◆ getView()

KIGFX::VIEW * TOOL_BASE::getView ( ) const
protectedinherited

Returns the instance of #VIEW object used in the application.

It allows tools to draw.

Returns
The instance of VIEW.

Definition at line 36 of file tool_base.cpp.

37{
38 return m_toolMgr->GetView();
39}
KIGFX::VIEW * GetView() const
Definition: tool_manager.h:285

References TOOL_MANAGER::GetView(), and TOOL_BASE::m_toolMgr.

Referenced by EE_POINT_EDITOR::addCornerCondition(), ALIGN_DISTRIBUTE_TOOL::AlignLeft(), ALIGN_DISTRIBUTE_TOOL::AlignRight(), COMMON_TOOLS::CenterContents(), SCH_EDIT_TOOL::ChangeTextType(), EE_INSPECTION_TOOL::CheckSymbol(), GERBVIEW_CONTROL::ClearAllLayers(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::CollectHits(), SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), COMMON_TOOLS::CursorControl(), SCH_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), EDIT_TOOL::DeleteItems(), PL_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SELECTION_TOOL::doSelectionMenu(), COMMON_TOOLS::doZoomFit(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), Duplicate(), PAD_TOOL::EnumeratePads(), EE_SELECTION_TOOL::GetNode(), ROUTER_TOOL::getStartLayer(), PCB_CONTROL::GridResetOrigin(), PCB_CONTROL::GridSetOrigin(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), ROUTER_TOOL::handleCommonEvents(), EE_SELECTION_TOOL::highlight(), PL_SELECTION_TOOL::highlight(), PCB_SELECTION_TOOL::highlight(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::highlightNet(), PNS::TOOL_BASE::highlightNets(), PCB_SELECTION_TOOL::hitTestDistance(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineDrag(), EE_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), PL_EDIT_TOOL::moveItem(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), SCH_EDITOR_CONTROL::Paste(), Paste(), PL_EDIT_TOOL::Paste(), ROUTER_TOOL::performRouting(), PNS::TOOL_BASE::pickSingleItem(), BOARD_EDITOR_CONTROL::PlaceFootprint(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), ROUTER_TOOL::prepareInteractive(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EE_SELECTION_TOOL::Reset(), EE_TOOL_BASE< T >::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), PNS::TOOL_BASE::Reset(), BOARD_EDITOR_CONTROL::Reset(), DRAWING_TOOL::Reset(), PCB_CONTROL::Reset(), PCB_SELECTION_TOOL::Reset(), SCH_EDIT_TOOL::Rotate(), GERBVIEW_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectionContains(), PCB_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), EE_SELECTION_TOOL::selectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDITOR_CONTROL::ToggleERCErrors(), SCH_EDITOR_CONTROL::ToggleERCExclusions(), SCH_EDITOR_CONTROL::ToggleERCWarnings(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), SCH_EDITOR_CONTROL::ToggleOPCurrents(), SCH_EDITOR_CONTROL::ToggleOPVoltages(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), EE_SELECTION_TOOL::unhighlight(), PL_SELECTION_TOOL::unhighlight(), PCB_SELECTION_TOOL::unhighlight(), GERBVIEW_SELECTION_TOOL::unselect(), GERBVIEW_SELECTION_TOOL::unselectVisually(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), SCH_FIND_REPLACE_TOOL::UpdateFind(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< T >::updateItem(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), PCB_SELECTION_TOOL::updateSelection(), PNS::TOOL_BASE::updateStartItem(), PCB_SELECTION_TOOL::view(), PCB_TOOL_BASE::view(), PCB_VIEWER_TOOLS::view(), EE_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PCB_SELECTION_TOOL::zoomFitSelection(), EE_SELECTION_TOOL::~EE_SELECTION_TOOL(), GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL(), and PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL().

◆ getViewControls()

KIGFX::VIEW_CONTROLS * TOOL_BASE::getViewControls ( ) const
protectedinherited

Return the instance of VIEW_CONTROLS object used in the application.

It allows tools to read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.).

Returns
The instance of VIEW_CONTROLS.

Definition at line 42 of file tool_base.cpp.

43{
44 return m_toolMgr->GetViewControls();
45}
KIGFX::VIEW_CONTROLS * GetViewControls() const
Definition: tool_manager.h:287

References TOOL_MANAGER::GetViewControls(), and TOOL_BASE::m_toolMgr.

Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), EE_SELECTION_TOOL::autostartEvent(), SCH_EDIT_TOOL::BreakWire(), PCB_SELECTION_TOOL::controls(), PCB_TOOL_BASE::controls(), EDIT_TOOL::copyToClipboard(), COMMON_TOOLS::CursorControl(), EDIT_TOOL::DeleteItems(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), Duplicate(), PAD_TOOL::EnumeratePads(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDITOR_CONTROL::Paste(), Paste(), ROUTER_TOOL::performDragging(), LENGTH_TUNER_TOOL::performTuning(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), DRAWING_TOOL::Reset(), PCB_POINT_EDITOR::Reset(), COMMON_TOOLS::ResetLocalCoords(), ROUTER_TOOL::RouteSelected(), PCB_SELECTION_TOOL::selectCursor(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::SelectNode(), ZOOM_TOOL::selectRegion(), ALIGN_DISTRIBUTE_TOOL::selectTarget(), PICKER_TOOL::setControls(), PCB_PICKER_TOOL::setControls(), EE_POINT_EDITOR::setEditedPoint(), PL_POINT_EDITOR::setEditedPoint(), PCB_POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateItem(), PL_EDIT_TOOL::updateModificationPoint(), and COMMON_TOOLS::ZoomCenter().

◆ Go()

template<class T >
void TOOL_INTERACTIVE::Go ( int(T::*)(const TOOL_EVENT &)  aStateFunc,
const TOOL_EVENT_LIST aConditions = TOOL_EVENTTC_ANYTA_ANY ) 
)
inherited

Define which state (aStateFunc) to go when a certain event arrives (aConditions).

No conditions means any event.

Definition at line 147 of file tool_interactive.h.

149{
150 TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
151
152 goInternal( sptr, aConditions );
153}
void goInternal(TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions)
std::function< int(const TOOL_EVENT &)> TOOL_STATE_FUNC
Definition: tool_base.h:58

References TOOL_INTERACTIVE::goInternal().

Referenced by EDA_3D_CONTROLLER::setTransitions(), CVPCB_ASSOCIATION_TOOL::setTransitions(), CVPCB_CONTROL::setTransitions(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::setTransitions(), EE_INSPECTION_TOOL::setTransitions(), EE_POINT_EDITOR::setTransitions(), EE_SELECTION_TOOL::setTransitions(), SCH_DRAWING_TOOLS::setTransitions(), SCH_EDIT_TOOL::setTransitions(), SCH_EDITOR_CONTROL::setTransitions(), SCH_FIND_REPLACE_TOOL::setTransitions(), SCH_LINE_WIRE_BUS_TOOL::setTransitions(), SCH_MOVE_TOOL::setTransitions(), SCH_NAVIGATE_TOOL::setTransitions(), SIMULATOR_CONTROL::setTransitions(), SYMBOL_EDITOR_CONTROL::setTransitions(), SYMBOL_EDITOR_DRAWING_TOOLS::setTransitions(), setTransitions(), SYMBOL_EDITOR_MOVE_TOOL::setTransitions(), SYMBOL_EDITOR_PIN_TOOL::setTransitions(), GERBVIEW_CONTROL::setTransitions(), GERBVIEW_INSPECTION_TOOL::setTransitions(), GERBVIEW_SELECTION_TOOL::setTransitions(), COMMON_CONTROL::setTransitions(), COMMON_TOOLS::setTransitions(), PICKER_TOOL::setTransitions(), ZOOM_TOOL::setTransitions(), KICAD_MANAGER_CONTROL::setTransitions(), PL_DRAWING_TOOLS::setTransitions(), PL_EDIT_TOOL::setTransitions(), PL_EDITOR_CONTROL::setTransitions(), PL_POINT_EDITOR::setTransitions(), PL_SELECTION_TOOL::setTransitions(), AUTOPLACE_TOOL::setTransitions(), MICROWAVE_TOOL::setTransitions(), SCRIPTING_TOOL::setTransitions(), LENGTH_TUNER_TOOL::setTransitions(), ROUTER_TOOL::setTransitions(), BOARD_EDITOR_CONTROL::setTransitions(), BOARD_INSPECTION_TOOL::setTransitions(), BOARD_REANNOTATE_TOOL::setTransitions(), CONVERT_TOOL::setTransitions(), DRAWING_TOOL::setTransitions(), DRC_TOOL::setTransitions(), EDIT_TOOL::setTransitions(), FOOTPRINT_EDITOR_CONTROL::setTransitions(), GLOBAL_EDIT_TOOL::setTransitions(), GROUP_TOOL::setTransitions(), PAD_TOOL::setTransitions(), PCB_CONTROL::setTransitions(), PCB_PICKER_TOOL::setTransitions(), PCB_POINT_EDITOR::setTransitions(), PCB_SELECTION_TOOL::setTransitions(), PCB_VIEWER_TOOLS::setTransitions(), ALIGN_DISTRIBUTE_TOOL::setTransitions(), POSITION_RELATIVE_TOOL::setTransitions(), PROPERTIES_TOOL::setTransitions(), and ZONE_FILLER_TOOL::setTransitions().

◆ goInternal()

void TOOL_INTERACTIVE::goInternal ( TOOL_STATE_FUNC aState,
const TOOL_EVENT_LIST aConditions 
)
privateinherited

Definition at line 70 of file tool_interactive.cpp.

71{
72 m_toolMgr->ScheduleNextState( this, aState, aConditions );
73}
void ScheduleNextState(TOOL_BASE *aTool, TOOL_STATE_FUNC &aHandler, const TOOL_EVENT_LIST &aConditions)
Define a state transition.

References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::ScheduleNextState().

Referenced by TOOL_INTERACTIVE::Go().

◆ handlePinDuplication()

void SYMBOL_EDITOR_EDIT_TOOL::handlePinDuplication ( LIB_PIN aOldPin,
LIB_PIN aNewPin,
int &  aSymbolLastPinNumber 
)
private

Set up handlers for various events.

Definition at line 588 of file symbol_editor_edit_tool.cpp.

590{
591 if( !aNewPin->GetNumber().IsEmpty() )
592 {
593 // when duplicating a pin in symbol editor, assigning identical pin number
594 // to the old one does not makes any sense, so assign the next unassigned number to it
595 aSymbolLastPinNumber++;
596 aNewPin->SetNumber( wxString::Format( wxT( "%i" ), aSymbolLastPinNumber ) );
597 }
598}
const wxString & GetNumber() const
Definition: lib_pin.h:122
void SetNumber(const wxString &aNumber)
Definition: lib_pin.h:124
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format(), LIB_PIN::GetNumber(), and LIB_PIN::SetNumber().

Referenced by Duplicate().

◆ Init()

bool SYMBOL_EDITOR_EDIT_TOOL::Init ( )
overridevirtual

Init() is called once upon a registration of the tool.

Returns
True if the initialization went fine, false - otherwise.

Reimplemented from TOOL_BASE.

Definition at line 55 of file symbol_editor_edit_tool.cpp.

56{
58
61
62 wxASSERT_MSG( drawingTools, "eeschema.SymbolDrawing tool is not available" );
63
64 auto haveSymbolCondition =
65 [&]( const SELECTION& sel )
66 {
67 return m_isSymbolEditor &&
68 static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurSymbol();
69 };
70
71 auto canEdit =
72 [&]( const SELECTION& sel )
73 {
75 wxCHECK( editor, false );
76
77 if( !editor->IsSymbolEditable() )
78 return false;
79
80 if( editor->IsSymbolAlias() )
81 {
82 for( EDA_ITEM* item : sel )
83 {
84 if( item->Type() != LIB_FIELD_T )
85 return false;
86 }
87 }
88
89 return true;
90 };
91
92 // Add edit actions to the move tool menu
93 if( moveTool )
94 {
95 CONDITIONAL_MENU& moveMenu = moveTool->GetToolMenu().GetMenu();
96
97 moveMenu.AddSeparator( 200 );
98 moveMenu.AddItem( EE_ACTIONS::rotateCCW, canEdit && EE_CONDITIONS::NotEmpty, 200 );
99 moveMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::NotEmpty, 200 );
100 moveMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::NotEmpty, 200 );
101 moveMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::NotEmpty, 200 );
102
103 moveMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 );
104
105 moveMenu.AddSeparator( 300 );
108 moveMenu.AddItem( ACTIONS::duplicate, canEdit && EE_CONDITIONS::NotEmpty, 300 );
109 moveMenu.AddItem( ACTIONS::doDelete, canEdit && EE_CONDITIONS::NotEmpty, 200 );
110
111 moveMenu.AddSeparator( 400 );
112 moveMenu.AddItem( ACTIONS::selectAll, haveSymbolCondition, 400 );
113 }
114
115 // Add editing actions to the drawing tool menu
116 CONDITIONAL_MENU& drawMenu = drawingTools->GetToolMenu().GetMenu();
117
118 drawMenu.AddSeparator( 200 );
120 drawMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::IdleSelection, 200 );
121 drawMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::IdleSelection, 200 );
122 drawMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::IdleSelection, 200 );
123
124 drawMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 );
125
126 // Add editing actions to the selection tool menu
128
129 selToolMenu.AddItem( EE_ACTIONS::rotateCCW, canEdit && EE_CONDITIONS::NotEmpty, 200 );
130 selToolMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::NotEmpty, 200 );
131 selToolMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::NotEmpty, 200 );
132 selToolMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::NotEmpty, 200 );
133
134 selToolMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 );
135
136 selToolMenu.AddSeparator( 300 );
139 selToolMenu.AddItem( ACTIONS::paste, canEdit && EE_CONDITIONS::Idle, 300 );
140 selToolMenu.AddItem( ACTIONS::duplicate, canEdit && EE_CONDITIONS::NotEmpty, 300 );
141 selToolMenu.AddItem( ACTIONS::doDelete, canEdit && EE_CONDITIONS::NotEmpty, 300 );
142
143 selToolMenu.AddSeparator( 400 );
144 selToolMenu.AddItem( ACTIONS::selectAll, haveSymbolCondition, 400 );
145
146 return true;
147}
static TOOL_ACTION paste
Definition: actions.h:69
static TOOL_ACTION copy
Definition: actions.h:68
static TOOL_ACTION duplicate
Definition: actions.h:72
static TOOL_ACTION cut
Definition: actions.h:67
static TOOL_ACTION selectAll
Definition: actions.h:71
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Add a menu entry to run a TOOL_ACTION on selected items.
void AddSeparator(int aOrder=ANY_ORDER)
Add a separator to the menu.
static TOOL_ACTION mirrorV
Definition: ee_actions.h:125
static TOOL_ACTION properties
Definition: ee_actions.h:128
static TOOL_ACTION rotateCCW
Definition: ee_actions.h:124
static TOOL_ACTION mirrorH
Definition: ee_actions.h:126
static TOOL_ACTION rotateCW
Definition: ee_actions.h:123
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:66
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static bool Idle(const SELECTION &aSelection)
Test if there no items selected or being edited.
static bool IdleSelection(const SELECTION &aSelection)
Test if all selected items are not being edited.
static SELECTION_CONDITION Count(int aNumber)
Create a functor that tests if the number of selected items is equal to the value given as parameter.
The symbol library editor main window.
TOOL_MENU & GetToolMenu()
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:44

References CONDITIONAL_MENU::AddItem(), CONDITIONAL_MENU::AddSeparator(), ACTIONS::copy, SELECTION_CONDITIONS::Count(), ACTIONS::cut, ACTIONS::doDelete, ACTIONS::duplicate, editor, TOOL_MENU::GetMenu(), TOOL_MANAGER::GetTool(), TOOL_INTERACTIVE::GetToolMenu(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), EE_TOOL_BASE< T >::Init(), LIB_FIELD_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_isSymbolEditor, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, EE_ACTIONS::mirrorH, EE_ACTIONS::mirrorV, SELECTION_CONDITIONS::NotEmpty(), ACTIONS::paste, EE_ACTIONS::properties, EE_ACTIONS::rotateCCW, EE_ACTIONS::rotateCW, and ACTIONS::selectAll.

◆ IsToolActive()

bool TOOL_BASE::IsToolActive ( ) const
inherited

Definition at line 31 of file tool_base.cpp.

32{
34}
bool IsToolActive(TOOL_ID aId) const
Return true if a tool with given id is active (executing)

References TOOL_MANAGER::IsToolActive(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.

Referenced by EDIT_TOOL::Drag(), ROUTER_TOOL::handleLayerSwitch(), PCB_SELECTION_TOOL::Main(), BOARD_EDITOR_CONTROL::TrackWidthDec(), and BOARD_EDITOR_CONTROL::TrackWidthInc().

◆ Mirror()

int SYMBOL_EDITOR_EDIT_TOOL::Mirror ( const TOOL_EVENT aEvent)

Definition at line 194 of file symbol_editor_edit_tool.cpp.

195{
197
198 if( selection.GetSize() == 0 )
199 return 0;
200
201 VECTOR2I mirrorPoint;
202 bool xAxis = ( aEvent.Matches( EE_ACTIONS::mirrorV.MakeEvent() ) );
203 LIB_ITEM* item = static_cast<LIB_ITEM*>( selection.Front() );
204
205 if( !item->IsMoving() )
207
208 if( selection.GetSize() == 1 )
209 mirrorPoint = item->GetPosition();
210 else
211 mirrorPoint = m_frame->GetNearestHalfGridPosition( mapCoords( selection.GetCenter() ) );
212
213 for( unsigned ii = 0; ii < selection.GetSize(); ii++ )
214 {
215 item = static_cast<LIB_ITEM*>( selection.GetItem( ii ) );
216
217 if( xAxis )
218 item->MirrorVertical( mirrorPoint );
219 else
220 item->MirrorHorizontal( mirrorPoint );
221
222 m_frame->UpdateItem( item, false, true );
223 }
224
226
227 if( item->IsMoving() )
228 {
230 }
231 else
232 {
233 if( selection.IsHover() )
235
236 m_frame->OnModify();
237 }
238
239 return 0;
240}
static TOOL_ACTION refreshPreview
Definition: actions.h:110
VECTOR2I GetNearestHalfGridPosition(const VECTOR2I &aPosition) const
Return the nearest aGridSize / 2 location to aPosition.
virtual VECTOR2I GetPosition() const
Definition: eda_item.h:249
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Definition: actions.h:214
virtual void MirrorHorizontal(const VECTOR2I &aCenter)=0
Mirror the draw object along the horizontal (X) axis about aCenter point.
virtual void MirrorVertical(const VECTOR2I &aCenter)=0
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
virtual VECTOR2I GetCenter() const
Returns the center point of the selection area bounding box.
Definition: selection.cpp:93
bool IsHover() const
Definition: selection.h:83
void UpdateItem(EDA_ITEM *aItem, bool isAddOrDelete=false, bool aUpdateRtree=false) override
Mark an item for refresh.
bool Matches(const TOOL_EVENT &aEvent) const
Test whether two events match in terms of category & action or command.
Definition: tool_event.h:365
void PostEvent(const TOOL_EVENT &aEvent)
Put an event to the event queue to be processed at the end of event processing cycle.

References EE_ACTIONS::clearSelection, SELECTION::Front(), SELECTION::GetCenter(), SYMBOL_EDIT_FRAME::GetCurSymbol(), SELECTION::GetItem(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), EDA_ITEM::GetPosition(), SELECTION::GetSize(), SELECTION::IsHover(), EDA_ITEM::IsMoving(), LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, mapCoords(), TOOL_EVENT::Matches(), LIB_ITEM::MirrorHorizontal(), EE_ACTIONS::mirrorV, LIB_ITEM::MirrorVertical(), SYMBOL_EDIT_FRAME::OnModify(), TOOL_MANAGER::PostEvent(), ACTIONS::refreshPreview, EE_SELECTION_TOOL::RequestSelection(), TOOL_MANAGER::RunAction(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), EVENTS::SelectedItemsModified, and SYMBOL_EDIT_FRAME::UpdateItem().

Referenced by setTransitions().

◆ Paste()

int SYMBOL_EDITOR_EDIT_TOOL::Paste ( const TOOL_EVENT aEvent)

Definition at line 756 of file symbol_editor_edit_tool.cpp.

757{
758 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
759
760 if( !symbol || symbol->IsAlias() )
761 return 0;
762
763 std::string text_utf8 = m_toolMgr->GetClipboardUTF8();
764 STRING_LINE_READER reader( text_utf8, "Clipboard" );
765 LIB_SYMBOL* newPart;
766
767 try
768 {
769 newPart = SCH_SEXPR_PLUGIN::ParseLibSymbol( reader );
770 }
771 catch( IO_ERROR& )
772 {
773 // If it's not a symbol then paste as text
774 newPart = new LIB_SYMBOL( "dummy_part" );
775 LIB_TEXT* newText = new LIB_TEXT( newPart );
776 newText->SetText( wxString::FromUTF8( text_utf8.c_str() ) );
777 newPart->AddDrawItem( newText );
778 }
779
780 if( !newPart )
781 return -1;
782
783 m_frame->SaveCopyInUndoList( symbol );
785
786 for( LIB_ITEM& item : symbol->GetDrawItems() )
787 item.ClearFlags( IS_NEW | IS_PASTED | SELECTED );
788
789 for( LIB_ITEM& item : newPart->GetDrawItems() )
790 {
791 if( item.Type() == LIB_FIELD_T )
792 continue;
793
794 LIB_ITEM* newItem = (LIB_ITEM*) item.Clone();
795 newItem->SetParent( symbol );
796 newItem->SetFlags( IS_NEW | IS_PASTED | SELECTED );
797
798 newItem->SetUnit( newItem->GetUnit() ? m_frame->GetUnit() : 0 );
799 newItem->SetConvert( newItem->GetConvert() ? m_frame->GetConvert() : 0 );
800
801 symbol->AddDrawItem( newItem );
802 getView()->Add( newItem );
803 }
804
805 delete newPart;
806
808
810
811 if( !selection.Empty() )
812 {
813 selection.SetReferencePoint( getViewControls()->GetCursorPosition( true ) );
815 }
816
817 return 0;
818}
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:165
int ClearSelection(const TOOL_EVENT &aEvent)
Select all visible items in sheet.
void RebuildSelection()
Rebuild the selection from the EDA_ITEMs' selection flags.
EE_SELECTION & GetSelection()
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:76
void SetConvert(int aConvert)
Definition: lib_item.h:275
void SetUnit(int aUnit)
Definition: lib_item.h:272
bool IsAlias() const
Definition: lib_symbol.h:188
static LIB_SYMBOL * ParseLibSymbol(LINE_READER &aReader, int aVersion=SEXPR_SCHEMATIC_FILE_VERSION)
bool Empty() const
Checks if there is anything selected.
Definition: selection.h:109
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
Definition: richio.h:241
void SaveCopyInUndoList(EDA_ITEM *aItem, UNDO_REDO aUndoType=UNDO_REDO::LIBEDIT, bool aAppend=false)
Create a copy of the current symbol, and save it in the undo list.
std::string GetClipboardUTF8() const
Return the information currently stored in the system clipboard.

References KIGFX::VIEW::Add(), LIB_SYMBOL::AddDrawItem(), EE_SELECTION_TOOL::ClearSelection(), EDA_ITEM::Clone(), SELECTION::Empty(), TOOL_MANAGER::GetClipboardUTF8(), LIB_ITEM::GetConvert(), SYMBOL_EDIT_FRAME::GetConvert(), SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::GetDrawItems(), EE_SELECTION_TOOL::GetSelection(), LIB_ITEM::GetUnit(), SYMBOL_EDIT_FRAME::GetUnit(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), IS_NEW, IS_PASTED, LIB_SYMBOL::IsAlias(), LIB_FIELD_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, EE_ACTIONS::move, SCH_SEXPR_PLUGIN::ParseLibSymbol(), EE_SELECTION_TOOL::RebuildSelection(), TOOL_MANAGER::RunAction(), SYMBOL_EDIT_FRAME::SaveCopyInUndoList(), SELECTED, LIB_ITEM::SetConvert(), EDA_ITEM::SetFlags(), EDA_ITEM::SetParent(), SELECTION::SetReferencePoint(), EDA_TEXT::SetText(), and LIB_ITEM::SetUnit().

Referenced by setTransitions().

◆ PinTable()

int SYMBOL_EDITOR_EDIT_TOOL::PinTable ( const TOOL_EVENT aEvent)

◆ Properties()

int SYMBOL_EDITOR_EDIT_TOOL::Properties ( const TOOL_EVENT aEvent)

Definition at line 406 of file symbol_editor_edit_tool.cpp.

407{
409
410 if( selection.Empty() || aEvent.IsAction( &EE_ACTIONS::symbolProperties ) )
411 {
412 if( m_frame->GetCurSymbol() )
414 }
415 else if( selection.Size() == 1 )
416 {
417 LIB_ITEM* item = (LIB_ITEM*) selection.Front();
418
419 // Save copy for undo if not in edit (edit command already handle the save copy)
420 if( item->GetEditFlags() == 0 )
422
423 switch( item->Type() )
424 {
425 case LIB_PIN_T:
426 {
428
429 if( pinTool )
430 pinTool->EditPinProperties( (LIB_PIN*) item );
431 }
432 break;
433
434 case LIB_SHAPE_T:
435 editShapeProperties( static_cast<LIB_SHAPE*>( item ) );
436 break;
437
438 case LIB_TEXT_T:
439 editTextProperties( item );
440 break;
441
442 case LIB_TEXTBOX_T:
443 editTextBoxProperties( item );
444 break;
445
446 case LIB_FIELD_T:
448 break;
449
450 default:
451 wxFAIL_MSG( wxT( "Unhandled item <" ) + item->GetClass() + wxT( ">" ) );
452 break;
453 }
454 }
455
456 if( selection.IsHover() )
458 else
460
461 return 0;
462}
EDA_ITEM_FLAGS GetEditFlags() const
Definition: eda_item.h:145
virtual wxString GetClass() const =0
Return the class name.
static TOOL_ACTION symbolProperties
Definition: ee_actions.h:154
Field object used in symbol libraries.
Definition: lib_field.h:61
int Size() const
Returns the number of selected parts.
Definition: selection.h:115
void editShapeProperties(LIB_SHAPE *aShape)
void editFieldProperties(LIB_FIELD *aField)
void editTextProperties(LIB_ITEM *aItem)
void editTextBoxProperties(LIB_ITEM *aItem)
bool EditPinProperties(LIB_PIN *aPin)
bool IsAction(const TOOL_ACTION *aAction) const
Test if the event contains an action issued upon activation of the given TOOL_ACTION.
Definition: tool_event.cpp:81
@ LIB_SHAPE_T
Definition: typeinfo.h:199

References EE_ACTIONS::clearSelection, editFieldProperties(), SYMBOL_EDITOR_PIN_TOOL::EditPinProperties(), editShapeProperties(), editSymbolProperties(), editTextBoxProperties(), editTextProperties(), SELECTION::Empty(), SELECTION::Front(), LIB_FIELD::GetClass(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EDA_ITEM::GetEditFlags(), LIB_ITEM::GetParent(), TOOL_MANAGER::GetTool(), TOOL_EVENT::IsAction(), SELECTION::IsHover(), LIB_FIELD_T, LIB_PIN_T, LIB_SHAPE_T, LIB_TEXT_T, LIB_TEXTBOX_T, LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, TOOL_MANAGER::PostEvent(), EE_SELECTION_TOOL::RequestSelection(), TOOL_MANAGER::RunAction(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), EVENTS::SelectedItemsModified, SELECTION::Size(), EE_ACTIONS::symbolProperties, and EDA_ITEM::Type().

Referenced by setTransitions().

◆ Redo()

◆ Reset()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::Reset ( RESET_REASON  aReason)
inlineoverridevirtualinherited

Bring the tool to a known, initial state.

If the tool claimed anything from the model or the view, it must release it when its reset.

Parameters
aReasoncontains information about the reason of tool reset.

Implements TOOL_BASE.

Definition at line 86 of file ee_tool_base.h.

87 {
88 if( aReason == MODEL_RELOAD )
89 {
90 // Init variables used by every drawing tool
91 m_frame = getEditFrame<T>();
92 m_isSymbolEditor = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame ) != nullptr;
93 }
94
95 m_view = static_cast<KIGFX::SCH_VIEW*>( getView() );
96 }

◆ resetTransitions()

void TOOL_INTERACTIVE::resetTransitions ( )
privateinherited

Clear the current transition map and restores the default one created by setTransitions().

Definition at line 63 of file tool_interactive.cpp.

64{
67}
virtual void setTransitions()=0
This method is meant to be overridden in order to specify handlers for events.
void ClearTransitions(TOOL_BASE *aTool)
Clear the state transition map for a tool.

References TOOL_MANAGER::ClearTransitions(), TOOL_BASE::m_toolMgr, and TOOL_INTERACTIVE::setTransitions().

◆ Rotate()

int SYMBOL_EDITOR_EDIT_TOOL::Rotate ( const TOOL_EVENT aEvent)

Definition at line 150 of file symbol_editor_edit_tool.cpp.

151{
153
154 if( selection.GetSize() == 0 )
155 return 0;
156
157 VECTOR2I rotPoint;
158 bool ccw = ( aEvent.Matches( EE_ACTIONS::rotateCCW.MakeEvent() ) );
159 LIB_ITEM* item = static_cast<LIB_ITEM*>( selection.Front() );
160
161 if( !item->IsMoving() )
163
164 if( selection.GetSize() == 1 )
165 rotPoint = item->GetPosition();
166 else
167 rotPoint = m_frame->GetNearestHalfGridPosition( mapCoords( selection.GetCenter() ) );
168
169 for( unsigned ii = 0; ii < selection.GetSize(); ii++ )
170 {
171 item = static_cast<LIB_ITEM*>( selection.GetItem( ii ) );
172 item->Rotate( rotPoint, ccw );
173 m_frame->UpdateItem( item, false, true );
174 }
175
176 if( item->IsMoving() )
177 {
179 }
180 else
181 {
183
184 if( selection.IsHover() )
186
187 m_frame->OnModify();
188 }
189
190 return 0;
191}
virtual void Rotate(const VECTOR2I &aCenter, bool aRotateCCW=true)=0
Rotate the object about aCenter point.

References EE_ACTIONS::clearSelection, SELECTION::Front(), SELECTION::GetCenter(), SYMBOL_EDIT_FRAME::GetCurSymbol(), SELECTION::GetItem(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), EDA_ITEM::GetPosition(), SELECTION::GetSize(), SELECTION::IsHover(), EDA_ITEM::IsMoving(), LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, mapCoords(), TOOL_EVENT::Matches(), SYMBOL_EDIT_FRAME::OnModify(), TOOL_MANAGER::PostEvent(), ACTIONS::refreshPreview, EE_SELECTION_TOOL::RequestSelection(), LIB_ITEM::Rotate(), EE_ACTIONS::rotateCCW, TOOL_MANAGER::RunAction(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), EVENTS::SelectedItemsModified, and SYMBOL_EDIT_FRAME::UpdateItem().

Referenced by setTransitions().

◆ RunMainStack()

void TOOL_INTERACTIVE::RunMainStack ( std::function< void()>  aFunc)
inherited

Call a function using the main stack.

Parameters
aFuncis the function to be calls.

Definition at line 87 of file tool_interactive.cpp.

88{
89 m_toolMgr->RunMainStack( this, std::move( aFunc ) );
90}
void RunMainStack(TOOL_BASE *aTool, std::function< void()> aFunc)

References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::RunMainStack().

Referenced by DRAWING_TOOL::PlaceText().

◆ saveCopyInUndoList()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList ( EDA_ITEM aItem,
UNDO_REDO  aType,
bool  aAppend = false,
bool  aDirtyConnectivity = true 
)
inlineprotectedinherited

Definition at line 134 of file ee_tool_base.h.

136 {
137 wxASSERT( aItem );
138
139 KICAD_T itemType = aItem->Type();
140 bool selected = aItem->IsSelected();
141
142 // IS_SELECTED flag should not be set on undo items which were added for
143 // a drag operation.
144 if( selected && aItem->HasFlag( SELECTED_BY_DRAG ) )
145 aItem->ClearSelected();
146
147 if( m_isSymbolEditor )
148 {
149 SYMBOL_EDIT_FRAME* editFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
150 wxCHECK_RET( editFrame, wxT( "editFrame is null" ) );
151
152 editFrame->SaveCopyInUndoList( static_cast<LIB_ITEM*>( aItem ), aType, aAppend );
153 }
154 else
155 {
156 SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
157 wxASSERT( editFrame );
158
159 if( editFrame )
160 {
161 if( itemType == SCH_FIELD_T )
162 {
163 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
164 static_cast<SCH_ITEM*>( aItem->GetParent() ),
165 UNDO_REDO::CHANGED, aAppend,
166 false );
167 }
168 else if( itemType == SCH_PIN_T || itemType == SCH_SHEET_PIN_T )
169 {
170 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
171 static_cast<SCH_ITEM*>( aItem->GetParent() ),
172 UNDO_REDO::CHANGED, aAppend,
173 aDirtyConnectivity );
174 }
175 else
176 {
177 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
178 static_cast<SCH_ITEM*>( aItem ), aType,
179 aAppend, aDirtyConnectivity );
180 }
181 }
182 }
183
184 if( selected && aItem->HasFlag( SELECTED_BY_DRAG ) )
185 aItem->SetSelected();
186 }
void ClearSelected()
Definition: eda_item.h:118
bool IsSelected() const
Definition: eda_item.h:106
void SetSelected()
Definition: eda_item.h:115
EDA_ITEM * GetParent() const
Definition: eda_item.h:99
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
Definition: eda_item.h:143
Schematic editor (Eeschema) main window.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend, bool aDirtyConnectivity=true)
Create a copy of the current schematic item, and put it in the undo list.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
#define SELECTED_BY_DRAG
Item was algorithmically selected as a dragged item.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_FIELD_T
Definition: typeinfo.h:155
@ SCH_SHEET_PIN_T
Definition: typeinfo.h:157
@ SCH_PIN_T
Definition: typeinfo.h:159

◆ SetContextMenu()

void TOOL_INTERACTIVE::SetContextMenu ( ACTION_MENU aMenu,
CONTEXT_MENU_TRIGGER  aTrigger = CMENU_BUTTON 
)
inherited

Assign a context menu and tells when it should be activated.

Parameters
aMenuis the menu to be assigned.
aTriggerdetermines conditions upon which the context menu is activated.

Definition at line 76 of file tool_interactive.cpp.

77{
78 if( aMenu )
79 aMenu->SetTool( this );
80 else
81 aTrigger = CMENU_OFF;
82
83 m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger );
84}
void SetTool(TOOL_INTERACTIVE *aTool)
Set a tool that is the creator of the menu.
void ScheduleContextMenu(TOOL_BASE *aTool, ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger)
Set behavior of the tool's context popup menu.
@ CMENU_OFF
Definition: tool_event.h:149

References CMENU_OFF, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ScheduleContextMenu(), and ACTION_MENU::SetTool().

Referenced by SELECTION_TOOL::doSelectionMenu(), TOOL_MENU::ShowContextMenu(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ setTransitions()

void SYMBOL_EDITOR_EDIT_TOOL::setTransitions ( )
overrideprivatevirtual

This method is meant to be overridden in order to specify handlers for events.

It is called every time tool is reset or finished.

Implements TOOL_INTERACTIVE.

Definition at line 875 of file symbol_editor_edit_tool.cpp.

876{
883
890
896}
static TOOL_ACTION undo
Definition: actions.h:65
static TOOL_ACTION redo
Definition: actions.h:66
static TOOL_ACTION deleteTool
Definition: actions.h:74
static TOOL_ACTION pinTable
Definition: ee_actions.h:155
static TOOL_ACTION setUnitDisplayName
Definition: ee_actions.h:195
static TOOL_ACTION updateSymbolFields
Definition: ee_actions.h:194
int Undo(const TOOL_EVENT &aEvent)
int PinTable(const TOOL_EVENT &aEvent)
int Paste(const TOOL_EVENT &aEvent)
int Cut(const TOOL_EVENT &aEvent)
int Redo(const TOOL_EVENT &aEvent)
int Duplicate(const TOOL_EVENT &aEvent)
int Mirror(const TOOL_EVENT &aEvent)
int Rotate(const TOOL_EVENT &aEvent)
int Properties(const TOOL_EVENT &aEvent)
int SetUnitDisplayName(const TOOL_EVENT &aEvent)
int UpdateSymbolFields(const TOOL_EVENT &aEvent)
int DeleteItemCursor(const TOOL_EVENT &aEvent)
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).

References Copy(), ACTIONS::copy, Cut(), ACTIONS::cut, DeleteItemCursor(), ACTIONS::deleteTool, DoDelete(), ACTIONS::doDelete, Duplicate(), ACTIONS::duplicate, TOOL_INTERACTIVE::Go(), Mirror(), EE_ACTIONS::mirrorH, EE_ACTIONS::mirrorV, Paste(), ACTIONS::paste, EE_ACTIONS::pinTable, PinTable(), EE_ACTIONS::properties, Properties(), Redo(), ACTIONS::redo, Rotate(), EE_ACTIONS::rotateCCW, EE_ACTIONS::rotateCW, EE_ACTIONS::setUnitDisplayName, SetUnitDisplayName(), EE_ACTIONS::symbolProperties, Undo(), ACTIONS::undo, EE_ACTIONS::updateSymbolFields, and UpdateSymbolFields().

◆ SetUnitDisplayName()

int SYMBOL_EDITOR_EDIT_TOOL::SetUnitDisplayName ( const TOOL_EVENT aEvent)

Definition at line 646 of file symbol_editor_edit_tool.cpp.

647{
648 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
649
650 if( !symbol )
651 return 0;
652
653 int unitid = m_frame->GetUnit();
654
655 if( unitid == 0 )
656 {
657 return -1;
658 }
659
660 wxString promptText = wxString::Format( _( "Enter display name for unit %s" ),
661 symbol->GetUnitReference( unitid ) );
662 wxString currentvalue;
663
664 if( symbol->HasUnitDisplayName( unitid ) )
665 {
666 currentvalue = symbol->GetUnitDisplayName( unitid );
667 }
668
669 wxTextEntryDialog dlg( m_frame, promptText, _( "Set Unit Display Name" ), currentvalue );
670
671 if( dlg.ShowModal() == wxID_OK )
672 {
674 symbol->SetUnitDisplayName( unitid, dlg.GetValue() );
676 m_frame->OnModify();
677 }
678 else
679 {
680 return -1;
681 }
682
683 return 0;
684}
wxString GetUnitDisplayName(int aUnit) override
Return the user-defined display name for aUnit for symbols with units.
Definition: lib_symbol.cpp:399
bool HasUnitDisplayName(int aUnit) override
Return true if the given unit aUnit has a display name defined.
Definition: lib_symbol.cpp:393
wxString GetUnitReference(int aUnit) override
Return an identifier for aUnit for symbols with units.
Definition: lib_symbol.cpp:387
void SetUnitDisplayName(int aUnit, const wxString &aName)
Set the user-defined display name for aUnit to aName for symbols with units.
Definition: lib_symbol.cpp:421

References _, Format(), SYMBOL_EDIT_FRAME::GetCurSymbol(), SYMBOL_EDIT_FRAME::GetUnit(), LIB_SYMBOL::GetUnitDisplayName(), LIB_SYMBOL::GetUnitReference(), LIB_SYMBOL::HasUnitDisplayName(), LIBEDIT, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SYMBOL_EDIT_FRAME::OnModify(), SYMBOL_EDIT_FRAME::RebuildSymbolUnitsList(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), and LIB_SYMBOL::SetUnitDisplayName().

Referenced by setTransitions().

◆ Undo()

◆ updateItem()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem ( EDA_ITEM aItem,
bool  aUpdateRTree 
) const
inlineprotectedinherited

Similar to getView()->Update(), but handles items that are redrawn by their parents and updating the SCH_SCREEN's RTree.

Similar to m_frame->SaveCopyInUndoList(), but handles items that are owned by their parents.

Definition at line 103 of file ee_tool_base.h.

◆ UpdateSymbolFields()

int SYMBOL_EDITOR_EDIT_TOOL::UpdateSymbolFields ( const TOOL_EVENT aEvent)

Definition at line 623 of file symbol_editor_edit_tool.cpp.

624{
625 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
626
627 if( !symbol )
628 return 0;
629
630 if( !symbol->IsAlias() )
631 {
632 m_frame->ShowInfoBarError( _( "Symbol is not derived from another symbol." ) );
633 }
634 else
635 {
637
638 if( dlg.ShowModal() == wxID_CANCEL )
639 return -1;
640 }
641
642 return 0;
643}
Dialog to update or change schematic library symbols.
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...

References _, SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::IsAlias(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, and EDA_BASE_FRAME::ShowInfoBarError().

Referenced by setTransitions().

◆ Wait()

TOOL_EVENT * TOOL_INTERACTIVE::Wait ( const TOOL_EVENT_LIST aEventList = TOOL_EVENTTC_ANYTA_ANY ))
inherited

Suspend execution of the tool until an event specified in aEventList arrives.

No parameters means waiting for any event.

Definition at line 57 of file tool_interactive.cpp.

58{
59 return m_toolMgr->ScheduleWait( this, aEventList );
60}
TOOL_EVENT * ScheduleWait(TOOL_BASE *aTool, const TOOL_EVENT_LIST &aConditions)
Pause execution of a given tool until one or more events matching aConditions arrives.

References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::ScheduleWait().

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDA_3D_CONTROLLER::Main(), CVPCB_CONTROL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

Member Data Documentation

◆ m_frame

SYMBOL_EDIT_FRAME * EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame
protectedinherited

Definition at line 189 of file ee_tool_base.h.

◆ m_isSymbolEditor

bool EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_isSymbolEditor
protectedinherited

Definition at line 192 of file ee_tool_base.h.

◆ m_menu

TOOL_MENU TOOL_INTERACTIVE::m_menu
protectedinherited

The functions below are not yet implemented - their interface may change.

Definition at line 125 of file tool_interactive.h.

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), EDA_3D_CONTROLLER::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< T >::Init(), SCH_DRAWING_TOOLS::Init(), SCH_EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), SYMBOL_EDITOR_DRAWING_TOOLS::Init(), GERBVIEW_SELECTION_TOOL::Init(), PICKER_TOOL::Init(), ZOOM_TOOL::Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), PL_SELECTION_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), ROUTER_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), DRAWING_TOOL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), PCB_TOOL_BASE::Init(), PCB_VIEWER_TOOLS::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDA_3D_CONTROLLER::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().

◆ m_pickerItem

EDA_ITEM* SYMBOL_EDITOR_EDIT_TOOL::m_pickerItem
private

Definition at line 78 of file symbol_editor_edit_tool.h.

Referenced by DeleteItemCursor().

◆ m_selectionTool

EE_SELECTION_TOOL* EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool
protectedinherited

Definition at line 191 of file ee_tool_base.h.

◆ m_toolId

TOOL_ID TOOL_BASE::m_toolId
protectedinherited

Name of the tool.

Names are expected to obey the format application.ToolName (eg. pcbnew.InteractiveSelection).

Definition at line 210 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), TOOL_BASE::GetId(), and TOOL_BASE::IsToolActive().

◆ m_toolMgr

TOOL_MANAGER* TOOL_BASE::m_toolMgr
protectedinherited

Definition at line 215 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), SELECTION_TOOL::AddItemsToSel(), SELECTION_TOOL::AddItemToSel(), SCH_MOVE_TOOL::AlignElements(), SCH_EDITOR_CONTROL::AssignNetclass(), BOARD_EDITOR_CONTROL::AssignNetclass(), CVPCB_ASSOCIATION_TOOL::Associate(), TOOL_BASE::attachManager(), SCH_EDIT_TOOL::AutoplaceFields(), EE_SELECTION_TOOL::autostartEvent(), SCH_EDIT_TOOL::BreakWire(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), ROUTER_TOOL::CanInlineDrag(), SCH_EDITOR_CONTROL::ChangeLineMode(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), GERBVIEW_CONTROL::ClearAllLayers(), SCH_EDITOR_CONTROL::ClearHighlight(), BOARD_INSPECTION_TOOL::ClearHighlight(), GERBVIEW_SELECTION_TOOL::clearSelection(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), Copy(), PL_EDIT_TOOL::Copy(), PAD_TOOL::copyPadSettings(), EDIT_TOOL::copyToClipboard(), EDIT_TOOL::CreateArray(), MICROWAVE_TOOL::createInductorBetween(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), COMMON_TOOLS::CursorControl(), SCH_EDITOR_CONTROL::Cut(), SCH_EDIT_TOOL::DeleteItemCursor(), DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), EDIT_TOOL::DeleteItems(), SCH_EDITOR_CONTROL::doCopy(), BOARD_EDITOR_CONTROL::doCrossProbePcbToSch(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SCH_EDIT_TOOL::DoDelete(), DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PCB_SELECTION_TOOL::doSyncSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::Drag(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawRectangle(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), Duplicate(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), PAD_TOOL::EditPad(), editShapeProperties(), editSymbolProperties(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), PCB_SELECTION_TOOL::EnterGroup(), GROUP_TOOL::EnterGroup(), SCH_NAVIGATE_TOOL::EnterSheet(), PAD_TOOL::EnumeratePads(), EE_INSPECTION_TOOL::ExcludeMarker(), PCB_SELECTION_TOOL::ExitGroup(), PCB_SELECTION_TOOL::expandConnection(), PAD_TOOL::explodePad(), PCB_SELECTION_TOOL::filterSelection(), PCB_SELECTION_TOOL::FindItem(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), EDIT_TOOL::Flip(), EDIT_TOOL::GetAndPlace(), TOOL_BASE::GetManager(), TOOL_BASE::getModelInt(), DRAWING_TOOL::getSourceZoneForAction(), TOOL_BASE::getToolHolderInt(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), TOOL_INTERACTIVE::goInternal(), PCB_SELECTION_TOOL::grabUnconnected(), COMMON_TOOLS::GridNext(), COMMON_TOOLS::GridPreset(), COMMON_TOOLS::GridPrev(), PCB_CONTROL::GridSetOrigin(), GROUP_TOOL::Group(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::HighlightItem(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PL_EDIT_TOOL::ImportDrawingSheetContent(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), EE_TOOL_BASE< T >::Init(), SCH_EDIT_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), PL_POINT_EDITOR::Init(), ROUTER_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), BOARD_INSPECTION_TOOL::Init(), BOARD_REANNOTATE_TOOL::Init(), CONVERT_TOOL::Init(), DRAWING_TOOL::Init(), EDIT_TOOL::Init(), GLOBAL_EDIT_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), PCB_POINT_EDITOR::Init(), PCB_SELECTION_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), POSITION_RELATIVE_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDIT_TOOL::invokeInlineRouter(), EDIT_TOOL::isRouterActive(), TOOL_BASE::IsToolActive(), GROUP_TOOL::LeaveGroup(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EDA_3D_CONTROLLER::Main(), CVPCB_CONTROL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), Mirror(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SCH_EDITOR_CONTROL::NextLineMode(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), SELECTION_TOOL::onDisambiguationExpire(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDITOR_CONTROL::Paste(), Paste(), PL_EDIT_TOOL::Paste(), PAD_TOOL::pastePadProperties(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), PinTable(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), GERBVIEW_CONTROL::Print(), PCB_CONTROL::Print(), SCH_EDIT_TOOL::Properties(), Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), EDIT_TOOL::rebuildConnectivity(), ZONE_FILLER_TOOL::rebuildConnectivity(), EE_SELECTION_TOOL::RebuildSelection(), PAD_TOOL::RecombinePad(), SCH_EDITOR_CONTROL::Redo(), Redo(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), PCB_POINT_EDITOR::removeCorner(), GROUP_TOOL::RemoveFromGroup(), SELECTION_TOOL::RemoveItemFromSel(), SELECTION_TOOL::RemoveItemsFromSel(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), PCB_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), EDA_3D_CONTROLLER::Reset(), COMMON_TOOLS::Reset(), PNS::TOOL_BASE::Reset(), PAD_TOOL::Reset(), COMMON_TOOLS::ResetLocalCoords(), TOOL_INTERACTIVE::resetTransitions(), SCH_EDITOR_CONTROL::Revert(), SCH_EDIT_TOOL::Rotate(), Rotate(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), TOOL_INTERACTIVE::RunMainStack(), DRC_TOOL::RunTests(), EE_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::SelectConnection(), PCB_TOOL_BASE::selection(), COMMON_TOOLS::SelectionTool(), GERBVIEW_SELECTION_TOOL::SelectItem(), GERBVIEW_SELECTION_TOOL::SelectItems(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectNet(), GERBVIEW_SELECTION_TOOL::selectPoint(), PL_SELECTION_TOOL::SelectPoint(), PCB_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), DRAWING_TOOL::SetAnchor(), TOOL_INTERACTIVE::SetContextMenu(), EDA_3D_CONTROLLER::SetMaterial(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDIT_TOOL::Swap(), EE_SELECTION_TOOL::SyncSelection(), COMMON_TOOLS::ToggleCursor(), COMMON_TOOLS::ToggleCursorStyle(), EDA_3D_CONTROLLER::ToggleVisibility(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), SCH_MOVE_TOOL::trimDanglingLines(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_EDITOR_CONTROL::Undo(), Undo(), GROUP_TOOL::Ungroup(), PCB_SELECTION_TOOL::unrouteSelected(), GERBVIEW_SELECTION_TOOL::UnselectItem(), GERBVIEW_SELECTION_TOOL::UnselectItems(), PNS::TOOL_BASE::updateEndItem(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), EE_POINT_EDITOR::updateParentItem(), PNS::TOOL_BASE::updateStartItem(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), TOOL_INTERACTIVE::Wait(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().

◆ m_toolName

std::string TOOL_BASE::m_toolName
protectedinherited

Definition at line 214 of file tool_base.h.

Referenced by TOOL_BASE::GetName().

◆ m_type

TOOL_TYPE TOOL_BASE::m_type
protectedinherited

Unique identifier for the tool, assigned by a TOOL_MANAGER instance.

Definition at line 207 of file tool_base.h.

Referenced by TOOL_BASE::GetType().

◆ m_view

KIGFX::SCH_VIEW* EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view
protectedinherited

Definition at line 190 of file ee_tool_base.h.


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