KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EDITOR_TAB_CONTEXT Class Referenceabstract

One open document in a tabbed editor. More...

#include <editor_tab_context.h>

Inheritance diagram for EDITOR_TAB_CONTEXT:
FOOTPRINT_EDITOR_TAB_CONTEXT SYMBOL_EDITOR_TAB_CONTEXT

Classes

struct  VIEW_SNAPSHOT
 View snapshot captured on detach, restored on activate. More...
 

Public Member Functions

 EDITOR_TAB_CONTEXT ()
 
virtual ~EDITOR_TAB_CONTEXT ()=default
 
virtual wxString GetTabKey () const =0
 Stable identity for persistence and de-duplication.
 
virtual wxString GetDisplayName () const =0
 Short label shown on the tab.
 
virtual bool IsModified () const =0
 
bool IsPreview () const
 
void SetPreview (bool aPreview)
 
UNDO_REDO_CONTAINERUndoList ()
 
UNDO_REDO_CONTAINERRedoList ()
 
VIEW_SNAPSHOTViewSnapshot ()
 
std::vector< KIID > & SavedSelection ()
 Selection saved as resolved KIIDs, restored after the view is rebuilt.
 

Protected Attributes

bool m_preview = false
 
std::unique_ptr< UNDO_REDO_CONTAINERm_undo
 
std::unique_ptr< UNDO_REDO_CONTAINERm_redo
 
VIEW_SNAPSHOT m_viewSnapshot
 
std::vector< KIIDm_savedSelection
 

Detailed Description

One open document in a tabbed editor.

Owns the undo/redo and view/selection snapshot. The subclass owns the document object itself.

Definition at line 35 of file editor_tab_context.h.

Constructor & Destructor Documentation

◆ EDITOR_TAB_CONTEXT()

EDITOR_TAB_CONTEXT::EDITOR_TAB_CONTEXT ( )
inline

Definition at line 38 of file editor_tab_context.h.

References m_redo, and m_undo.

◆ ~EDITOR_TAB_CONTEXT()

virtual EDITOR_TAB_CONTEXT::~EDITOR_TAB_CONTEXT ( )
virtualdefault

Member Function Documentation

◆ GetDisplayName()

virtual wxString EDITOR_TAB_CONTEXT::GetDisplayName ( ) const
pure virtual

Short label shown on the tab.

Implemented in FOOTPRINT_EDITOR_TAB_CONTEXT, and SYMBOL_EDITOR_TAB_CONTEXT.

◆ GetTabKey()

virtual wxString EDITOR_TAB_CONTEXT::GetTabKey ( ) const
pure virtual

Stable identity for persistence and de-duplication.

Implemented in FOOTPRINT_EDITOR_TAB_CONTEXT, and SYMBOL_EDITOR_TAB_CONTEXT.

◆ IsModified()

virtual bool EDITOR_TAB_CONTEXT::IsModified ( ) const
pure virtual

◆ IsPreview()

bool EDITOR_TAB_CONTEXT::IsPreview ( ) const
inline

Definition at line 58 of file editor_tab_context.h.

References m_preview.

◆ RedoList()

◆ SavedSelection()

std::vector< KIID > & EDITOR_TAB_CONTEXT::SavedSelection ( )
inline

Selection saved as resolved KIIDs, restored after the view is rebuilt.

Definition at line 77 of file editor_tab_context.h.

References m_savedSelection.

Referenced by SYMBOL_EDIT_FRAME::activateSymbolTab(), and FOOTPRINT_EDIT_FRAME::installFootprintTabBoard().

◆ SetPreview()

void EDITOR_TAB_CONTEXT::SetPreview ( bool aPreview)
inline

Definition at line 59 of file editor_tab_context.h.

References m_preview.

◆ UndoList()

◆ ViewSnapshot()

VIEW_SNAPSHOT & EDITOR_TAB_CONTEXT::ViewSnapshot ( )
inline

Member Data Documentation

◆ m_preview

bool EDITOR_TAB_CONTEXT::m_preview = false
protected

Definition at line 80 of file editor_tab_context.h.

Referenced by IsPreview(), and SetPreview().

◆ m_redo

std::unique_ptr<UNDO_REDO_CONTAINER> EDITOR_TAB_CONTEXT::m_redo
protected

Definition at line 82 of file editor_tab_context.h.

Referenced by EDITOR_TAB_CONTEXT(), and RedoList().

◆ m_savedSelection

std::vector<KIID> EDITOR_TAB_CONTEXT::m_savedSelection
protected

Definition at line 84 of file editor_tab_context.h.

Referenced by SavedSelection().

◆ m_undo

std::unique_ptr<UNDO_REDO_CONTAINER> EDITOR_TAB_CONTEXT::m_undo
protected

Definition at line 81 of file editor_tab_context.h.

Referenced by EDITOR_TAB_CONTEXT(), and UndoList().

◆ m_viewSnapshot

VIEW_SNAPSHOT EDITOR_TAB_CONTEXT::m_viewSnapshot
protected

Definition at line 83 of file editor_tab_context.h.

Referenced by ViewSnapshot().


The documentation for this class was generated from the following file: