API — ICoreSDK/ICoreStudio/StudioObjects/PrimaryWindow
The public contract of 2 header(s) under src/ICoreSDK/ICoreStudio/StudioObjects/PrimaryWindow — 2 class/struct definition(s), 27 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 |
|---|---|---|---|
ICorePrimaryWindow.h | ICorePrimaryWindow | 4 | public ICoreWindow |
ICorePrimaryWindowBackend.h | ICorePrimaryWindowBackend | 23 | — |
ICorePrimaryWindow.h#
src/ICoreSDK/ICoreStudio/StudioObjects/PrimaryWindow/ICorePrimaryWindow.h
ICorePrimaryWindow#
ICorePrimaryWindow.h:29 · class · bases public ICoreWindow · pImpl · 4 declaration(s)
ICorePrimaryWindow The window the app starts in: the menu strip, and one editor beneath it.
class ICorePrimaryWindow : public ICoreWindow {
public:
// QWidget* rather than QMainWindow*, matching the base and QMainWindow itself.
explicit ICorePrimaryWindow(ICoreWidget* parent = nullptr);
// The window's title carries the active project's name, so a project switch
// is visible in the window strip and two studios are tellable apart.
// Public because startup can open a project (Settings -> Project) after the
// window has already been built with the previous project's name on it.
void updateWindowTitleFromActiveProject();
~ICorePrimaryWindow() override;
protected:
// Closing this window ends the session, so there is nothing to veto: the
// geometry is stored and the software is wound down, and the base accepts
// the close. Anything that wants a refusable close has to change here first
// -- see the note on Application::Impl::noteWindowClosed.
bool closing() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICorePrimaryWindowBackend.h#
src/ICoreSDK/ICoreStudio/StudioObjects/PrimaryWindow/ICorePrimaryWindowBackend.h
ICorePrimaryWindowBackend#
ICorePrimaryWindowBackend.h:34 · class · 23 declaration(s)
ICorePrimaryWindowBackend The primary window without the widgets: what its menu rows act on, what they do, and the window state that is remembered between sessions.
class ICorePrimaryWindowBackend {
public:
// ====================[The window itself]======================
// The title the window wears for the project that is open: "<project> — <app>",
// or the app's name alone when there is no project.
static ICoreString getWindowTitleForActiveProject();
// The geometry the window opens at. The shipped size and position are applied
// first, so they are what it falls back to when nothing has been stored yet or
// the stored blob is unreadable (a screen that no longer exists, a toolkit
// version that changed the format).
static void applyStartupWindowGeometry(ICoreWindow* window);
// Stored unconditionally, even with the preference off: turning "restore
// window geometry" back on should bring back the last window the user
// actually had, not whatever was current when they last had it enabled.
static void storeWindowGeometry(const ICoreWindow* window);
// Whether a menu's keyboard shortcut may act on what is in front of the user
// right now. The keys are registered application-wide, because an editor torn
// off into its own window is a window of its own and would otherwise never
// hear them -- but that also puts them within earshot of windows that are not
// editing anything. The project browser, a script runner or a chart window is
// only borrowing the keyboard, and a Delete pressed there must not reach the
// canvas behind it. So the key acts in the window that carries the menu strip,
// and in whichever window holds the editor that currently has the focus.
static bool activeWindowCarriesTheseShortcuts(const ICoreWindow* menuWindow);
// ====================[What a menu row acts on]======================
// Resolved at click time, never held: the focused editor window if there is
// one, and the caller's fallback otherwise. Each step can come up empty, and
// the row that asked simply does nothing.
static ICoreStudioSurface* menuTargetEditorWindow(ICoreStudioSurface* fallbackWindow);
static ICoreLeftFixedPanel* menuTargetLeftPanel(ICoreStudioSurface* fallbackWindow);
static ICoreCanvasParent* menuTargetCanvasParent(ICoreStudioSurface* fallbackWindow);
static ICoreCanvas* menuTargetCanvas(ICoreStudioSurface* fallbackWindow);
static ICoreSubsystemTreeNode* menuTargetTreeNode(ICoreStudioSurface* fallbackWindow);
// ====================[File]======================
static void createSubsystemInFocusedTreeNode(ICoreStudioSurface* fallbackWindow);
// ====================[Edit]======================
// Into the middle of what the canvas is actually showing, which is where a
// paste with no pointer position behind it belongs.
static void pasteIntoVisibleCenter(ICoreStudioSurface* fallbackWindow);
static void selectAllOnFocusedCanvas(ICoreStudioSurface* fallbackWindow);
static void setSelectionCommentedOut(ICoreStudioSurface* fallbackWindow, bool commentedOut);
static void reduceSeriesSelection(ICoreStudioSurface* fallbackWindow);
static void reduceParallelSelection(ICoreStudioSurface* fallbackWindow);
static void reduceFeedbackSelection(ICoreStudioSurface* fallbackWindow);
static void autoArrangeFocusedTreeNode(ICoreStudioSurface* fallbackWindow);
// ====================[View]======================
static void applyZoomLevel(ICoreStudioSurface* fallbackWindow, double zoomLevel);
static void applyZoomFactor(ICoreStudioSurface* fallbackWindow, double factor);
static void resetPanAndZoom(ICoreStudioSurface* fallbackWindow);
// Scoped to the selection, unlike the top panel's block-names switch, which
// overrides every block on the canvas. These write each selected block's own
// property, so a global override still outranks whatever is set here.
static void setSelectionNameLabelsVisible(ICoreStudioSurface* fallbackWindow, bool visible);
static void toggleSelectionNameLabels(ICoreStudioSurface* fallbackWindow);
// ====================[Run]======================
// Reports the failure itself, because the row that asked has nowhere to put it.
static void buildProject();
};
};