KiCad PCB EDA Suite
undo_redo_container.h File Reference
#include <vector>
#include <eda_item.h>

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::GROUP,
  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 
GROUP 
UNGROUP 

Definition at line 55 of file undo_redo_container.h.

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