KiCad PCB EDA Suite
kicad_clipboard.h
Go to the documentation of this file.
1 
30 #ifndef KICAD_CLIPBOARD_H
31 #define KICAD_CLIPBOARD_H
32 
34 #include <board_item.h>
35 #include <footprint.h>
37 #include <memory.h>
38 #include <tools/pcb_selection.h>
39 
40 
41 class CLIPBOARD_IO : public PCB_PLUGIN
42 {
43 public:
44  CLIPBOARD_IO();
45  ~CLIPBOARD_IO();
46 
47  /*
48  * Saves the entire board to the clipboard formatted using the PCB_PLUGIN formatting
49  */
50  void Save( const wxString& aFileName, BOARD* aBoard,
51  const PROPERTIES* aProperties = nullptr ) override;
52 
53  /*
54  * Write all the settings of the BOARD* set by setBoard() and then adds all the
55  * BOARD_ITEMs found in selection formatted by PCB_PLUGIN to clipboard as sexpr text
56  */
57  void SaveSelection( const PCB_SELECTION& selected, bool isFootprintEditor );
58 
59  BOARD_ITEM* Parse();
60 
61  BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
62  const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
63  PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
64 
65  void SetBoard( BOARD* aBoard );
66 
67 private:
69 };
70 
71 
72 #endif /* KICAD_CLIPBOARD_H */
BOARD_ITEM * Parse()
Container for project specific data.
Definition: project.h:62
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
void Save(const wxString &aFileName, BOARD *aBoard, const PROPERTIES *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PLUGIN implementation knows about or it can be u...
A progress reporter interface for use in multi-threaded environments.
A PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
Definition: pcb_plugin.h:141
STRING_FORMATTER m_formatter
A name/value tuple with unique names and optional values.
Definition: properties.h:33
void SetBoard(BOARD *aBoard)
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
Pcbnew s-expression file format parser definition.
void SaveSelection(const PCB_SELECTION &selected, bool isFootprintEditor)
Implement an OUTPUTFORMATTER to a memory buffer.
Definition: richio.h:414
BOARD * Load(const wxString &aFileName, BOARD *aAppendToMe, const PROPERTIES *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr) override
Load information from some input file format that this PLUGIN implementation knows about into either ...