API — ICoreSDK/ICoreStudio/StudioObjects/Panels/SubsystemNavigation
The public contract of 2 header(s) under src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SubsystemNavigation — 2 class/struct definition(s), 12 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
| Header | Defines | Declarations | Bases |
|---|---|---|---|
ICoreSubsystemNavigator.h | ICoreSubsystemNavigator | 7 | public ICoreTreeView |
ICoreSubsystemPickerDialog.h | ICoreSubsystemPickerDialog | 5 | public ICoreDialog |
ICoreSubsystemNavigator.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SubsystemNavigation/ICoreSubsystemNavigator.h
ICoreSubsystemNavigator#
ICoreSubsystemNavigator.h:13 · class · bases public ICoreTreeView · pImpl · 7 declaration(s)
class ICoreSubsystemNavigator : public ICoreTreeView {
public:
// Data roles attached to every entry by ICoreSubsystemTreeNode::getTreeWidgetItems().
// Entries carry registry paths (not pointers) so they can never dangle; they are
// resolved through ICoreSubsystemTreeNodeRegistry at double-click time.
enum EntryDataRole {
// Off the caller-owned role base, whose value is the toolkit's own first
// free role. The values must not move: they are written by
// ICoreSubsystemTreeNode and read by ICoreNewTabPanel.
EntryTypeRole = ICoreItemRoles::User + 1,
EntryPathRole = ICoreItemRoles::User + 2,
};
enum EntryType {
EntryType_Subsystem = 1,
EntryType_Block = 2,
};
explicit ICoreSubsystemNavigator(ICoreWidget* parent);
void refreshTreeView();
// ⚠ THERE IS NO setDetailColumnsVisible() ON THIS CLASS, on purpose. Which
// of the two view types is showing -- the plain list, or the details table
// with Last Modified and Date Created -- is a PROJECT preference
// (ICoreProjectPreferences::areSubsystemNavigatorDetailColumnsVisible), and
// every navigator in the app reads it rather than holding its own copy.
//
// A per-instance setter beside a project preference would be two sources of
// truth for one question, and the answer shown would depend on which of them
// was written last. The toggle in the panel writes the preference; the
// preference's change signal is what re-lays-out every navigator, including
// copies of the page opened in other windows.
//
// The MODEL builds all three cells either way (see
// ICoreSubsystemTreeNode::getTreeWidgetItems) -- the view only decides
// whether the last two are given any width.
// Hides every entry whose name does not contain the query, keeping the
// ancestors of a match visible (and expanded) so the hit stays reachable.
// An empty query restores the full tree, collapsed back to the root.
void applyFilter(const ICoreString& query);
// Dumps the subtree under `row` to the log, one indented line per entry.
//
// It takes a row handle rather than an item pointer, and so is a member
// rather than a static: the rows of this tree are built by
// ICoreSubsystemTreeNode::getTreeWidgetItems() and are plain toolkit items,
// so an ICoreStandardItem* parameter would name a type they are not. The
// handle is resolved by the model and is true of any row.
// Pass rootRow() to dump the whole tree.
void printDescendants(const ICoreTreeRow& row, int depth = 0) const;
~ICoreSubsystemNavigator() override;
ICoreSignal<ICoreString> subsystemEntryDoubleClicked;
ICoreSignal<ICoreString> blockEntryDoubleClicked;
// Raised by the right-click menu, which is offered on subsystem entries only:
// blocks are not loadable into a canvas on their own.
ICoreSignal<ICoreString> subsystemOpenInNewTabRequested;
ICoreSignal<ICoreString> subsystemOpenInNewWindowRequested;
protected:
// ICoreTreeView's own hook surface, mirroring ICoreWidget's: the view
// derives from the toolkit's tree rather than from ICoreWidget, so it
// carries its own copy of the two hooks this class needs.
bool mouseDoubleClicked(const ICoreMouseEvent& event) override;
bool contextMenuRequested(const ICorePoint& globalPos) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreSubsystemPickerDialog.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SubsystemNavigation/ICoreSubsystemPickerDialog.h
Brings the tree view, and with it ICoreTreeRow -- the row handle the path lookup below is written in terms of.
ICoreSubsystemPickerDialog#
ICoreSubsystemPickerDialog.h:31 · class · final · bases public ICoreDialog · pImpl · 5 declaration(s)
"Select Subsystem" -- the subsystem counterpart of the platform's directory picker, used wherever a field holds a registry path (deploy target sources today) so the path is chosen from the live tre...
class ICoreSubsystemPickerDialog final : public ICoreDialog {
public:
// Runs the dialog modally and returns the chosen subsystem path, or an
// empty string when the user cancelled (so callers keep their old value).
//
// ⚠ Q1.3 NARROWED THIS from ICoreAnyWidget* (= QWidget*), which is what
// ICoreNativeHandleAccess.h asks for in so many words: "a call site reaching
// for icoreNativeWidgetOf() is a call site whose signature should have been
// narrowed instead". ICoreDialog's ctor takes the interface now, and
// recovering it from a raw QWidget* is the thing that silently returns null
// post-P5.10 -- so the parent arrives as an interface or not at all.
//
// The old comment claimed a caller "can never" hold an ICoreWidget*. Both
// callers do: ICoreCommandScriptWindow passes itself, and
// ICoreCodeExportTargetViewElements recovers its window's shell through
// icoreWindowOfNative() rather than passing the bare toolkit pointer.
static ICoreString pickSubsystemPath(ICoreNativeWidget* parent, const ICoreString& initialPath);
explicit ICoreSubsystemPickerDialog(ICoreNativeWidget* parent, const ICoreString& initialPath);
ICoreString getChosenPath() const;
~ICoreSubsystemPickerDialog() override;
protected:
// Where the tree actually gets filled in -- see the definition for why it
// cannot be done in the constructor.
void shown() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};