KiCad PCB EDA Suite
undo_redo_container.h File Reference
#include <core/typeinfo.h>
#include <eda_item_flags.h>
#include <functional>
#include <vector>

Go to the source code of this file.

Classes

class  ITEM_PICKER
 
class  PICKED_ITEMS_LIST
 A holder to handle information on schematic or board items. More...
 
class  UNDO_REDO_CONTAINER
 A holder to handle a list of undo (or redo) commands. More...
 

Enumerations

enum class  UNDO_REDO {
  UNSPECIFIED = 0 , NOP , CHANGED , NEWITEM ,
  DELETED , LIBEDIT , LIB_RENAME , EXCHANGE_T ,
  DRILLORIGIN , GRIDORIGIN , PAGESETTINGS , REGROUP ,
  UNGROUP
}
 Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also a specific case in Eeschema, when wires are modified If an item is modified, a copy of the "old" item parameters value is held. More...
 

Enumeration Type Documentation

◆ UNDO_REDO

enum class UNDO_REDO
strong

Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also a specific case in Eeschema, when wires are modified If an item is modified, a copy of the "old" item parameters value is held.

When an item is deleted or added (new item) the pointer points the item, and there is no other copy. Type of undo/redo operations

Each type must be redo/undone by a specific operation.

Enumerator
UNSPECIFIED 
NOP 
CHANGED 
NEWITEM 
DELETED 
LIBEDIT 
LIB_RENAME 
EXCHANGE_T 
DRILLORIGIN 
GRIDORIGIN 
PAGESETTINGS 
REGROUP 
UNGROUP 

Definition at line 57 of file undo_redo_container.h.

57 {
58 UNSPECIFIED = 0, // illegal
59 NOP, // Undo/redo will ignore this entry. Only forces the start of a new stack
60 CHANGED, // params of items have a value changed: undo is made by exchange
61 // values with a copy of these values
62 NEWITEM, // new item, undo by changing in deleted
63 DELETED, // deleted item, undo by changing in deleted
64 LIBEDIT, // Specific to the component editor (symbol_editor creates a full copy
65 // of the current component when changed)
66 LIB_RENAME, // As LIBEDIT, but old copy should be removed from library
67 EXCHANGE_T, // Use for changing the schematic text type where swapping
68 // data structure is insufficient to restore the change.
69 DRILLORIGIN, // origin changed (like CHANGED, contains the origin and a copy)
70 GRIDORIGIN, // origin changed (like CHANGED, contains the origin and a copy)
71 PAGESETTINGS, // page settings or title block changes
72 REGROUP, // new group of items created (do not use GROUP to avoid collision
73 // with an header on msys2)
74 UNGROUP // existing group destroyed (items not destroyed)
75};
@ NOP
Definition: am_param.h:150