KiCad PCB EDA Suite
|
#include <hierarchy_pane.h>
Public Types | |
enum | ContextMenuAction { EDIT_PAGE_NUMBER , EXPAND_ALL , COLLAPSE_ALL , RENAME } |
Public Member Functions | |
HIERARCHY_PANE (SCH_EDIT_FRAME *aParent) | |
~HIERARCHY_PANE () | |
void | UpdateHierarchyTree () |
Update the hierarchical tree of the schematic. | |
void | UpdateHierarchySelection () |
Updates the tree's selection to match current page. | |
void | UpdateLabelsHierarchyTree () |
Update the labels of the hierarchical tree of the schematic. | |
void | SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom) |
void | SetBorderColor (const KIGFX::COLOR4D &aColor) |
Private Member Functions | |
void | buildHierarchyTree (SCH_SHEET_PATH *aList, const wxTreeItemId &aParent) |
Create the hierarchical tree of the schematic. | |
void | onSelectSheetPath (wxTreeEvent &aEvent) |
Open the selected sheet and display the corresponding screen when a tree item is selected. | |
void | onTreeItemRightClick (wxTreeEvent &aEvent) |
void | onRightClick (wxTreeItemId aItem) |
void | onCharHook (wxKeyEvent &aKeyStroke) |
void | onTreeRightClick (wxTreeEvent &event) |
void | onTreeEditFinished (wxTreeEvent &event) |
wxString | getRootString () |
wxString | formatPageString (const wxString &aName, const wxString &aPage) |
void | setIdenticalSheetsHighlighted (const SCH_SHEET_PATH &path, bool highLighted=true) |
When renaming the sheets in tree it is helpful to highlight the identical sheets which got renamed by renaming the current sheet. | |
void | renameIdenticalSheets (const SCH_SHEET_PATH &renamedSheet, const wxString newName, SCH_COMMIT *commit) |
Rename all sheets in a hierarchial desing which has the same source renamed sheet. | |
void | OnPaint (wxPaintEvent &event) |
Private Attributes | |
SCH_SHEET_PATH | m_list |
SCH_EDIT_FRAME * | m_frame |
HIERARCHY_TREE * | m_tree |
bool | m_events_bound |
bool | m_leftBorder |
bool | m_rightBorder |
bool | m_topBorder |
bool | m_bottomBorder |
KIGFX::COLOR4D | m_borderColor |
Definition at line 69 of file hierarchy_pane.h.
Enumerator | |
---|---|
EDIT_PAGE_NUMBER | |
EXPAND_ALL | |
COLLAPSE_ALL | |
RENAME |
Definition at line 72 of file hierarchy_pane.h.
HIERARCHY_PANE::HIERARCHY_PANE | ( | SCH_EDIT_FRAME * | aParent | ) |
Definition at line 69 of file hierarchy_pane.cpp.
References KiBitmap(), KiBitmapBundle(), m_events_bound, m_frame, m_tree, onCharHook(), onSelectSheetPath(), onTreeEditFinished(), onTreeItemRightClick(), and UpdateHierarchyTree().
HIERARCHY_PANE::~HIERARCHY_PANE | ( | ) |
Definition at line 115 of file hierarchy_pane.cpp.
References m_tree, onCharHook(), onSelectSheetPath(), onTreeEditFinished(), and onTreeItemRightClick().
|
private |
Create the hierarchical tree of the schematic.
[in] | aList | is the SCH_SHEET_PATH list to explore. |
aPreviousmenu | is the wxTreeItemId used as parent to add sub items. |
Definition at line 125 of file hierarchy_pane.cpp.
References buildHierarchyTree(), formatPageString(), SCH_SHEET::GetFields(), SCH_SHEET_PATH::GetPageNumber(), SCH_SCREEN::GetSheets(), SCH_SHEET_PATH::LastScreen(), m_tree, SCH_SHEET_PATH::pop_back(), SCH_SHEET_PATH::push_back(), and SHEETNAME.
Referenced by buildHierarchyTree(), and UpdateHierarchyTree().
|
private |
Definition at line 542 of file hierarchy_pane.cpp.
References _.
Referenced by buildHierarchyTree(), getRootString(), onTreeEditFinished(), renameIdenticalSheets(), and UpdateLabelsHierarchyTree().
|
private |
Definition at line 532 of file hierarchy_pane.cpp.
References formatPageString(), SCH_SHEET_PATH::GetPageNumber(), SCH_SHEET::GetShownName(), m_frame, SCH_SHEET_PATH::push_back(), SCHEMATIC::Root(), and SCH_EDIT_FRAME::Schematic().
Referenced by UpdateHierarchyTree().
|
private |
Definition at line 500 of file hierarchy_pane.cpp.
References ACTIONS::collapseAll, ACTIONS::expandAll, m_tree, MD_ALT, MD_CTRL, and MD_SHIFT.
Referenced by HIERARCHY_PANE(), and ~HIERARCHY_PANE().
|
privateinherited |
Definition at line 47 of file wx_panel.cpp.
References WX_PANEL::m_borderColor, WX_PANEL::m_bottomBorder, WX_PANEL::m_leftBorder, WX_PANEL::m_rightBorder, WX_PANEL::m_topBorder, KIGFX::COLOR4D::Mix(), KIGFX::COLOR4D::ToColour(), and KIGFX::COLOR4D::UNSPECIFIED.
Referenced by WX_PANEL::WX_PANEL(), and WX_PANEL::~WX_PANEL().
|
private |
Definition at line 374 of file hierarchy_pane.cpp.
References _, COLLAPSE_ALL, ACTIONS::collapseAll, EDIT_PAGE_NUMBER, EXPAND_ALL, ACTIONS::expandAll, SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SHEET::GetName(), SCH_SHEET_PATH::GetPageNumber(), SCH_EDIT_FRAME::GetScreen(), SCH_SHEET_PATH::Last(), SCH_SHEET_PATH::LastScreen(), m_frame, TREE_ITEM_DATA::m_SheetPath, m_tree, COMMIT::Modify(), SCH_EDIT_FRAME::OnPageSettingsChange(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SHEET_PATH::pop_back(), SCH_COMMIT::Push(), RENAME, setIdenticalSheetsHighlighted(), SCH_SHEET_PATH::SetPageNumber(), BASE_SCREEN::SetPageNumber(), and UpdateLabelsHierarchyTree().
Referenced by onTreeItemRightClick().
|
private |
Open the selected sheet and display the corresponding screen when a tree item is selected.
Definition at line 308 of file hierarchy_pane.cpp.
References EE_ACTIONS::changeSheet, TOOLS_HOLDER::GetToolManager(), m_frame, TREE_ITEM_DATA::m_SheetPath, m_tree, and TOOL_MANAGER::RunAction().
Referenced by HIERARCHY_PANE(), UpdateHierarchySelection(), UpdateHierarchyTree(), and ~HIERARCHY_PANE().
|
private |
Definition at line 456 of file hierarchy_pane.cpp.
References _, COMMIT::Empty(), formatPageString(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SHEET::GetFields(), SCH_SHEET::GetName(), SCH_SHEET_PATH::GetPageNumber(), SCH_SHEET::GetScreen(), SCH_SHEET_PATH::GetSheet(), SCH_SHEET_PATH::Last(), m_frame, TREE_ITEM_DATA::m_SheetPath, m_tree, COMMIT::Modify(), SCH_EDIT_FRAME::OnPageSettingsChange(), SCH_COMMIT::Push(), renameIdenticalSheets(), setIdenticalSheetsHighlighted(), SCH_SHEET::SetName(), SHEETNAME, and SCH_SHEET_PATH::size().
Referenced by HIERARCHY_PANE(), and ~HIERARCHY_PANE().
|
private |
Definition at line 368 of file hierarchy_pane.cpp.
References onRightClick().
Referenced by HIERARCHY_PANE(), UpdateHierarchySelection(), UpdateHierarchyTree(), and ~HIERARCHY_PANE().
|
private |
|
private |
Rename all sheets in a hierarchial desing which has the same source renamed sheet.
Definition at line 575 of file hierarchy_pane.cpp.
References SCH_SHEET_PATH::Cmp(), formatPageString(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SHEET::GetFields(), SCH_SHEET::GetName(), SCH_SHEET_PATH::GetPageNumber(), SCH_SHEET::GetScreen(), SCH_SHEET_PATH::GetSheet(), SCH_SHEET_PATH::Last(), m_frame, TREE_ITEM_DATA::m_SheetPath, m_tree, COMMIT::Modify(), SCH_EDIT_FRAME::OnPageSettingsChange(), recursiveDescent(), SCH_SHEET::SetName(), SHEETNAME, and SCH_SHEET_PATH::size().
Referenced by onTreeEditFinished().
|
inlineinherited |
Definition at line 47 of file wx_panel.h.
References WX_PANEL::m_borderColor.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
inlineinherited |
Definition at line 39 of file wx_panel.h.
References WX_PANEL::m_bottomBorder, WX_PANEL::m_leftBorder, WX_PANEL::m_rightBorder, and WX_PANEL::m_topBorder.
Referenced by APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D(), PAGED_DIALOG::PAGED_DIALOG(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_PACKAGES_VIEW::PANEL_PACKAGES_VIEW(), PANEL_SCH_SELECTION_FILTER::PANEL_SCH_SELECTION_FILTER(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
private |
When renaming the sheets in tree it is helpful to highlight the identical sheets which got renamed by renaming the current sheet.
Definition at line 547 of file hierarchy_pane.cpp.
References SCH_SHEET_PATH::Cmp(), SCH_SHEET_PATH::Last(), TREE_ITEM_DATA::m_SheetPath, m_tree, path, and recursiveDescent().
Referenced by onRightClick(), and onTreeEditFinished().
void HIERARCHY_PANE::UpdateHierarchySelection | ( | ) |
Updates the tree's selection to match current page.
Definition at line 149 of file hierarchy_pane.cpp.
References SCH_EDIT_FRAME::GetCurrentSheet(), m_events_bound, m_frame, TREE_ITEM_DATA::m_SheetPath, m_tree, onSelectSheetPath(), onTreeItemRightClick(), and recursiveDescent().
Referenced by SCH_EDIT_FRAME::DisplayCurrentSheet(), SCH_EDIT_FRAME::UpdateHierarchySelection(), and UpdateHierarchyTree().
void HIERARCHY_PANE::UpdateHierarchyTree | ( | ) |
Update the hierarchical tree of the schematic.
Definition at line 212 of file hierarchy_pane.cpp.
References buildHierarchyTree(), SCH_SHEET_PATH::clear(), getRootString(), m_events_bound, m_frame, m_list, TREE_ITEM_DATA::m_SheetPath, m_tree, onSelectSheetPath(), onTreeItemRightClick(), SCH_SHEET_PATH::push_back(), SCHEMATIC::Root(), SCH_EDIT_FRAME::Schematic(), and UpdateHierarchySelection().
Referenced by HIERARCHY_PANE(), SCH_EDIT_FRAME::ShowChangedLanguage(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().
void HIERARCHY_PANE::UpdateLabelsHierarchyTree | ( | ) |
Update the labels of the hierarchical tree of the schematic.
Must be called only for an up to date tree, to update displayed labels after a sheet name or a sheet number change.
Definition at line 327 of file hierarchy_pane.cpp.
References formatPageString(), SCH_SHEET::GetFields(), SCH_SHEET_PATH::GetPageNumber(), SCH_SHEET_PATH::Last(), TREE_ITEM_DATA::m_SheetPath, m_tree, recursiveDescent(), and SHEETNAME.
Referenced by onRightClick(), and SCH_EDIT_FRAME::UpdateLabelsHierarchyNavigator().
|
privateinherited |
Definition at line 61 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorderColor().
|
privateinherited |
Definition at line 59 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
private |
Definition at line 151 of file hierarchy_pane.h.
Referenced by HIERARCHY_PANE(), UpdateHierarchySelection(), and UpdateHierarchyTree().
|
private |
Definition at line 148 of file hierarchy_pane.h.
Referenced by getRootString(), HIERARCHY_PANE(), onRightClick(), onSelectSheetPath(), onTreeEditFinished(), renameIdenticalSheets(), UpdateHierarchySelection(), and UpdateHierarchyTree().
|
privateinherited |
Definition at line 56 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
private |
Definition at line 147 of file hierarchy_pane.h.
Referenced by UpdateHierarchyTree().
|
privateinherited |
Definition at line 57 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
privateinherited |
Definition at line 58 of file wx_panel.h.
Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().
|
private |
Definition at line 149 of file hierarchy_pane.h.
Referenced by buildHierarchyTree(), HIERARCHY_PANE(), onCharHook(), onRightClick(), onSelectSheetPath(), onTreeEditFinished(), renameIdenticalSheets(), setIdenticalSheetsHighlighted(), UpdateHierarchySelection(), UpdateHierarchyTree(), UpdateLabelsHierarchyTree(), and ~HIERARCHY_PANE().