KiCad PCB EDA Suite
undo_redo_container.h File Reference
#include <core/typeinfo.h>
#include <eda_item_flags.h>
#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  UNDO_REDO {
  UNDO_REDO::UNSPECIFIED = 0, UNDO_REDO::NOP, UNDO_REDO::CHANGED, UNDO_REDO::NEWITEM,
  UNDO_REDO::DELETED, UNDO_REDO::LIBEDIT, UNDO_REDO::LIB_RENAME, UNDO_REDO::EXCHANGE_T,
  UNDO_REDO::DRILLORIGIN, UNDO_REDO::GRIDORIGIN, UNDO_REDO::PAGESETTINGS, UNDO_REDO::REGROUP,
  UNDO_REDO::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 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 56 of file undo_redo_container.h.

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