KiCad PCB EDA Suite
class_undoredo_container.h File Reference
#include <vector>
#include <base_struct.h>

Go to the source code of this file.

Classes

class  ITEM_PICKER
 
class  PICKED_ITEMS_LIST
 Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items. More...
 
class  UNDO_REDO_CONTAINER
 Class UNDO_REDO_CONTAINER is a holder to handle alist of undo (or redo) command. More...
 

Enumerations

enum  UNDO_REDO_T {
  UR_UNSPECIFIED = 0, UR_CHANGED, UR_NEW, UR_DELETED,
  UR_MOVED, UR_MIRRORED_X, UR_MIRRORED_Y, UR_ROTATED,
  UR_ROTATED_CLOCKWISE, UR_FLIPPED, UR_WIRE_IMAGE, UR_LIBEDIT,
  UR_EXCHANGE_T
}
 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 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. However, because there are some commands that concern a lot of items and modify them, but modifications are easy to undo/redo, so a copy of old items is not necessary. They are block command Move block Rotate block Mirror or Flip block and they are undo/redo by the same command

Enumerator
UR_UNSPECIFIED 
UR_CHANGED 
UR_NEW 
UR_DELETED 
UR_MOVED 
UR_MIRRORED_X 
UR_MIRRORED_Y 
UR_ROTATED 
UR_ROTATED_CLOCKWISE 
UR_FLIPPED 
UR_WIRE_IMAGE 
UR_LIBEDIT 
UR_EXCHANGE_T 

Use for changing the schematic text type where swapping data structure is insufficient to restor the change.

Definition at line 59 of file class_undoredo_container.h.

59  {
60  UR_UNSPECIFIED = 0, // illegal
61  UR_CHANGED, // params of items have a value changed: undo is made by exchange
62  // values with a copy of these values
63  UR_NEW, // new item, undo by changing in deleted
64  UR_DELETED, // deleted item, undo by changing in deleted
65  UR_MOVED, // moved item, undo by move it
66  UR_MIRRORED_X, // mirrored item, undo by mirror X
67  UR_MIRRORED_Y, // mirrored item, undo by mirror Y
68  UR_ROTATED, // Rotated item (counterclockwise), undo by rotating it
69  UR_ROTATED_CLOCKWISE, // Rotated item (clockwise), undo by rotating it
70  UR_FLIPPED, // flipped (board items only), undo by flipping it
71  UR_WIRE_IMAGE, // Specific to Eeschema for handling wires changes.
72  UR_LIBEDIT, // Specific to the component editor (libedit creates a full copy
73  // of the current component when changed)
75 };
Use for changing the schematic text type where swapping data structure is insufficient to restor the ...