API — ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors
The public contract of 38 header(s) under src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors — 38 class/struct definition(s), 135 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
ICoreCodeEditorBaseClass.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/ICoreCodeEditorBaseClass.h
Included rather than forward-declared because getHighlighter() RETURNS one: C4's section 6 H8 rule for this axis -- a header that merely holds a component forward-declares it, a header that hands one back includes it, because the caller is going to dereference what it gets.
ICoreCodeEditorBaseClass#
ICoreCodeEditorBaseClass.h:22 · class · bases public ICoreWidget · pImpl · 11 declaration(s)
class ICoreCodeEditorBaseClass : public ICoreWidget {
public:
// The chrome every language editor wears (2026-08-15): one tool bar
// carrying a language badge, the title field and the size picker, a
// hairline, and a full-bleed code surface underneath.
//
// It arrived behind a `Chrome { Classic, Modern }` switch so C/C++ could be
// looked at in place before the other fourteen followed. All fifteen are on
// it now, so the switch is GONE rather than left as a permanent fork -- the
// two-stacked-bars arrangement this replaced has no callers and no way back.
explicit ICoreCodeEditorBaseClass(ICoreWidget* parent = nullptr);
~ICoreCodeEditorBaseClass() override;
// `override` is load-bearing, not decoration: this is ICoreWidget's watch
// hook, and a signature that drifted from it would quietly become a new
// function nothing ever calls -- the Tab-key filter would stop firing with
// no diagnostic at all.
// Tab inserts spaces in the editing surface. A WATCH, because the key is
// delivered to `editor` (an ICoreTextEdit, which has none of ICoreWidget's
// hooks), while the class that reinterprets it is this one. Returns true
// to swallow the Tab.
bool watchedKeyPressed(ICoreNativeWidget* watched, const ICoreKeyEvent& event) override;
void setCodeTypeLabelText(const ICoreString& labelText) const;
void setTitleLineEditText(const ICoreString& title) const;
void setLogo(const ICoreIcon& icon) const;
void setHighlighter(ICoreSyntaxHighlighterBase *newHighlighter);
// Hides/shows the "Title" label + textbox pair. The font-size control
// sharing that row is unaffected. Callers embedding a single, unnamed
// editor (e.g. one block's code) have no use for the title field.
void setTitleRowVisible(bool visible) const;
ICoreTextEdit* getMainEditor() const;
ICoreSyntaxHighlighterBase* getHighlighter() const;
std::string getTitleLineEditText() const;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreAsmBaseHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/ICoreAsmBaseHighlighter.h
ICoreAsmBaseHighlighter#
ICoreAsmBaseHighlighter.h:14 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
ICoreAsmBaseHighlighter Shared base for ALL assembly dialects: ARM / x86 / DSP / custom ISAs
class ICoreAsmBaseHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreAsmBaseHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreAsmArmEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/AsmArm/ICoreAsmArmEditor.h
ICoreAsmARMEditor#
ICoreAsmArmEditor.h:7 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreAsmARMEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreAsmARMEditor(ICoreWidget* parent = nullptr);
~ICoreAsmARMEditor() override;
};
};
ICoreAsmArmEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/AsmArm/ICoreAsmArmEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreAsmArmEditorHighlighter#
ICoreAsmArmEditorHighlighter.h:8 · class · bases public ICoreAsmBaseHighlighter · 2 declaration(s)
class ICoreAsmArmEditorHighlighter : public ICoreAsmBaseHighlighter {
public:
explicit ICoreAsmArmEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreAsmDspEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/AsmDSP/ICoreAsmDspEditor.h
ICoreAsmDspEditor#
ICoreAsmDspEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreAsmDspEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreAsmDspEditor(ICoreWidget* parent = nullptr);
~ICoreAsmDspEditor() override;
};
};
ICoreAsmDspEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/AsmDSP/ICoreAsmDspEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreAsmDspEditorHighlighter#
ICoreAsmDspEditorHighlighter.h:8 · class · bases public ICoreAsmBaseHighlighter · 2 declaration(s)
class ICoreAsmDspEditorHighlighter : public ICoreAsmBaseHighlighter {
public:
explicit ICoreAsmDspEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreAsmX86Editor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/Asmx86/ICoreAsmX86Editor.h
ICoreAsmX86Editor#
ICoreAsmX86Editor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreAsmX86Editor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreAsmX86Editor(ICoreWidget* parent = nullptr);
~ICoreAsmX86Editor() override;
};
};
ICoreAsmX86EditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Assembly/Asmx86/ICoreAsmX86EditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreAsmX86EditorHighlighter#
ICoreAsmX86EditorHighlighter.h:8 · class · bases public ICoreAsmBaseHighlighter · 2 declaration(s)
class ICoreAsmX86EditorHighlighter : public ICoreAsmBaseHighlighter {
public:
explicit ICoreAsmX86EditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreCppEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/C_Cpp/ICoreCppEditor.h
ICoreCppEditor#
ICoreCppEditor.h:9 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreCppEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreCppEditor(ICoreWidget* parent = nullptr);
~ICoreCppEditor() override;
};
};
ICoreCppEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/C_Cpp/ICoreCppEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreCppEditorHighlighter#
ICoreCppEditorHighlighter.h:8 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
class ICoreCppEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreCppEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreHdlBaseHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/ICoreHdlBaseHighlighter.h
ICoreHdlBaseHighlighter#
ICoreHdlBaseHighlighter.h:14 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
ICoreHdlBaseHighlighter Shared base for: VHDL / Verilog / SystemVerilog
class ICoreHdlBaseHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreHdlBaseHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreSystemVerilogEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/SystemVerilog/ICoreSystemVerilogEditor.h
ICoreSystemVerilogEditor#
ICoreSystemVerilogEditor.h:9 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreSystemVerilogEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreSystemVerilogEditor(ICoreWidget* parent = nullptr);
~ICoreSystemVerilogEditor() override;
};
};
ICoreSystemVerilogEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/SystemVerilog/ICoreSystemVerilogEditorHighlighter.h
ICoreSystemVerilogEditorHighlighter#
ICoreSystemVerilogEditorHighlighter.h:9 · class · bases public ICoreVerilogEditorHighlighter · 1 declaration(s)
class ICoreSystemVerilogEditorHighlighter : public ICoreVerilogEditorHighlighter {
public:
explicit ICoreSystemVerilogEditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICoreVhdlEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/VHDL/ICoreVhdlEditor.h
ICoreVhdlEditor#
ICoreVhdlEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreVhdlEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreVhdlEditor(ICoreWidget* parent = nullptr);
~ICoreVhdlEditor() override;
};
};
ICoreVhdlEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/VHDL/ICoreVhdlEditorHighlighter.h
ICoreVhdlEditorHighlighter#
ICoreVhdlEditorHighlighter.h:8 · class · bases public ICoreHdlBaseHighlighter · 1 declaration(s)
class ICoreVhdlEditorHighlighter : public ICoreHdlBaseHighlighter {
public:
explicit ICoreVhdlEditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICoreVerilogEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/Verilog/ICoreVerilogEditor.h
ICoreVerilogEditor#
ICoreVerilogEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreVerilogEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreVerilogEditor(ICoreWidget* parent = nullptr);
~ICoreVerilogEditor() override;
};
};
ICoreVerilogEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/HDL/Verilog/ICoreVerilogEditorHighlighter.h
ICoreVerilogEditorHighlighter#
ICoreVerilogEditorHighlighter.h:8 · class · bases public ICoreHdlBaseHighlighter · 1 declaration(s)
class ICoreVerilogEditorHighlighter : public ICoreHdlBaseHighlighter {
public:
explicit ICoreVerilogEditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICoreScriptCodeEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/ICoreScript/ICoreScriptCodeEditor.h
ICoreScriptCodeEditor#
ICoreScriptCodeEditor.h:32 · class · bases public ICoreRichTextEdit · pImpl · nested Definition, BracketPair · 53 declaration(s)
The Script Runner's editing surface: a code editor for the console language.
class ICoreScriptCodeEditor : public ICoreRichTextEdit {
public:
// An ICoreNativeWidget rather than an ICoreWidget: the caller parents this
// to an ICoreSplitter, which is not an ICoreWidget (Q1.1 narrowed it this
// far -- see ICoreDialogButtonBox.h's twin note).
explicit ICoreScriptCodeEditor(ICoreNativeWidget* parent = nullptr);
~ICoreScriptCodeEditor() override;
// Load a script. Goes through here rather than setPlainText() so the line
// spacing — a block format, which setPlainText resets — survives the load.
void setScriptText(const ICoreString& text);
// Called by the gutter widget, which is just a paint surface for the editor.
int gutterWidth() const;
// P5.8's paint-signature decision. Was gutterPaintEvent(QPaintEvent*), which
// built its own QPainter on the gutter and read event->rect() three times.
// The two-argument paintContent hook already hands over BOTH -- a painter
// aimed at the gutter and the dirty rect -- so the gutter's job is now to
// forward, not to unpack a toolkit event.
void paintGutter(ICorePainter& painter, const ICoreRect& dirty);
// --- Editing font size, in points -------------------------------------
// Not QTextEdit::setFontPointSize(), which sets the *current char format*
// (the next thing typed). This resizes the whole editing surface: document
// font, tab stops, row pitch and gutter. Clamped to a legible range.
// Driven by the Script Runner's toolbar, Ctrl+wheel, and Ctrl+ +/-/0.
int editorFontSize() const;
int defaultEditorFontSize() const;
void setEditorFontSize(int points);
// --- Editing commands (S3.4, S3.5, S3.7) -----------------
// Each is one undo step, and each is also bound to a key in keyPressed:
// Ctrl+G, Ctrl+/ and Ctrl+I (Cmd on macOS). Public so a menu can offer them.
// Put the caret at the start of 1-based `line` (clamped to the document)
// and scroll it into view: a line off screen comes to the middle, one on
// screen does not move.
void goToLine(int line);
// Ask for a line number, then goToLine. Cancelling does nothing.
void promptGoToLine();
// Comment the caret's line out, or back in (ICoreScriptLayout::toggleLineComment).
void toggleCommentOnCaretLine();
// Ctrl+/: the selected lines as one decision, one edit, left selected so a
// second press toggles them back (ICoreScriptLayout::toggleLinesComment,
// S3.14); with nothing selected, toggleCommentOnCaretLine(). A selection
// ending at the very start of a line does not take that line.
void toggleComment();
// Re-indent the whole script by its blocks (ICoreScriptLayout::reindent);
// the caret stays on its line. Does nothing when the indent is already right.
void reindentScript();
// --- Live problems (S3.8, S3.11) -------------------------
// The editor reads its own text with ICoreScriptAnalyzer a moment after
// typing stops, underlines what it finds, and offers the script's own
// names (its functions, variables and `run` targets) in completion beside
// the glossary's. `file` names the script in diagnostics; `siblings` are
// the other scripts in its folder as {file name, text}, so the analyzer can
// warn when two scripts define the same function (they share one session).
void setAnalysisContext(const ICoreString& file,
const std::vector<std::pair<ICoreString, ICoreString>>& siblings);
// Analyze now rather than after the pause (a load, a test).
void analyzeNow();
// What the last analysis found, in line order.
[[nodiscard]] const std::vector<ICoreScriptDiagnostic>& problems() const;
// Fires after every analysis, with problems().
ICoreSignal<const std::vector<ICoreScriptDiagnostic>&> onProblemsChanged;
// --- Go to definition (S3.12) and Run Current Line (S4.5) ----------------
struct Definition {
ICoreString file; // the script it is in; this editor's own file when empty
int line = 0; // 1-based
};
// Where `name` is defined, read from the analysis: a function this
// script or a sibling defines (this script first), else the first line
// this script assigns it. For a `run` target -- `name` read off a
// `run <name>` line -- the sibling script itself, at line 1. Nothing when
// no script in the folder defines it.
[[nodiscard]] std::optional<Definition> definitionOf(const ICoreString& name, bool isRunTarget = false) const;
// The identifier under the caret (or just left of it), and whether it is
// the argument of a `run` line. Empty when the caret is not on a name.
[[nodiscard]] ICoreString nameAtCaret(bool* isRunTarget = nullptr) const;
// F12: go to nameAtCaret()'s definition -- here, or by asking the owner to
// open another script through onDefinitionInOtherScript.
void goToDefinition();
ICoreSignal<const ICoreString&, int> onDefinitionInOtherScript; // (file, line)
// F9: the owner runs the caret's line -- or, on a block's first line, the
// block through its `end` -- given as (first 1-based line, lines).
ICoreSignal<int, const ICoreStringList&> onRunLinesRequested;
void requestRunCaretLine();
// Run Selection (S4.16): exactly the selected text, through the same
// signal, numbered from the line the selection starts on; with nothing
// selected, requestRunCaretLine(). F9 is this.
void requestRunSelection();
// Fires when F12 finds nothing, with the name, so the owner can say so.
ICoreSignal<const ICoreString&> onDefinitionNotFound;
// Ctrl+Enter: the owner runs the whole script, as its Run does (S4.3).
ICoreSignal<> onRunScriptRequested;
// --- Signature help (S3.10) ------------------------------------------------
// The call the caret stands in, as the NAME being called and the 0-based
// argument the caret is in: `f(1, |` is ("f", 1). Pure, on one line's text
// and the caret's column in it (0-based, characters before the caret):
// brackets and strings are skipped, a keyword before '(' (`if (x)`) and a
// member call (`h.set(`) are not calls, and a '%' comment ends the search.
// False when the caret is in no call.
static bool callContextAt(const ICoreString& lineText, int column,
ICoreString& name, int& argument);
// Raised when the caret enters, leaves or moves between the arguments of a
// call: (name, argument), or ("", -1) when it is in none. The owner shows
// the signature -- the editor does not know where the glossary is shown.
ICoreSignal<const ICoreString&, int> onSignatureHelpChanged;
// --- Brackets (S3.6) -----------------------------------------------------
// The bracket next to the caret and its partner, as document positions;
// {-1, -1} when the caret is beside no bracket. `partner` is -1 for a
// bracket with none (painted as a problem).
struct BracketPair { int at = -1; int partner = -1; };
[[nodiscard]] BracketPair bracketAtCaret() const;
// What typing `typed` does at the caret: insert a closing partner after an
// opening bracket or a '"', or step over a closer that is already next.
// Returns false when the key is left to the text widget. Public so the
// rule can be tested without delivering keys.
bool typeWithAutoClose(const ICoreString& typed);
// --- Breakpoints (S5.1) and per-file caret (S4.11) -----------------------
// Breakpoints are 1-based lines, toggled by a click in the gutter and
// drawn there. They stay on their LINE through edits -- lines inserted
// above push them down, a deleted line takes its breakpoint with it --
// and, once the editor knows its file (setAnalysisContext), they are kept
// in the scripts folder's session.ini with the caret's line, and both come
// back the next time that script is opened. Nothing pauses on them yet:
// that is S5.2, which needs the run to keep the window alive (S1.7).
[[nodiscard]] std::vector<int> breakpoints() const;
void setBreakpoints(const std::vector<int>& lines);
void toggleBreakpoint(int line);
ICoreSignal<const std::vector<int>&> onBreakpointsChanged;
// The 1-based line at viewport y (the gutter's y is the same), or 0.
[[nodiscard]] int lineAtY(double y) const;
// --- Folding (S3.13) --------------------------------------------------------
// A line that opens a block with a body -- `function`, `for`, `if`,
// `while`, `switch`, `try` -- can be folded: its body and its `end` are
// hidden and a "⋯" follows it. Lines are 1-based. A fold survives edits
// above, below and on its own first line; an edit inside what it hides (a
// replace-all, a re-indent) opens it, and so does going to a line it hides
// (goToLine, a find match, a paused run). The text is untouched: a run and a
// save see every line. Toggled by the fold marker in the gutter, by clicking
// the "⋯", and by Ctrl+Shift+[ / Ctrl+Shift+] on the caret's block.
[[nodiscard]] std::vector<int> foldableLines() const;
[[nodiscard]] std::vector<int> foldedLines() const;
// The last line of the block `line` opens (its `end`), or 0 when it opens none.
[[nodiscard]] int foldEndOf(int line) const;
void toggleFold(int line);
void foldAll();
void unfoldAll();
// Open every fold that hides `line`.
void unfoldAround(int line);
[[nodiscard]] bool isLineHidden(int line) const;
// The innermost foldable block around the caret (its first line), or 0.
[[nodiscard]] int foldableLineAtCaret() const;
// --- The debugger's current line (S5.2) -----------------------------------
// The line a paused run is stopped on: a band across it and an arrow in
// the gutter, drawn until it is set to 0. Setting it does not move the
// caret; the owner reveals the line (goToLine) when it wants it seen.
void setExecutionLine(int line);
[[nodiscard]] int executionLine() const;
// --- Find / Replace (S3.3) -------------------------------------------------
// The matches to box, as {start, length} character ranges, painted under
// the text the way bracket pairs are -- the current one is the SELECTION,
// which selectRange sets and scrolls to. Ctrl+F asks the owner to open its
// find bar through onFindRequested.
void setFindMatches(const std::vector<std::pair<int, int>>& ranges);
void selectRange(int start, int length);
ICoreSignal<> onFindRequested;
// --- Hover help (S3.9) -------------------------------------------------
// What resting the pointer on `position` explains: the problem a squiggle
// there marks ("Error: ..."), else the name under it -- a function this
// script or a sibling defines (its signature and where), then the
// glossary's signature and description. Empty when nothing answers. The
// pointer shows it in a card after a short rest (ICoreRichTextEdit's
// showToolTip); public so the text can be tested without a pointer.
[[nodiscard]] ICoreString hoverTextAt(int position) const;
// The character under a viewport point, or -1 when the point is past the
// end of its line or below the text (where there is nothing to explain).
[[nodiscard]] int characterAt(const ICorePoint& point) const;
// --- The clipboard and the context menu (S2.6) ---------------------------
// Cut and Copy do nothing without a selection; Paste replaces it. Each is
// one edit, so one undo step.
void cutSelection();
void copySelection();
void paste();
void selectAll();
// The rows the right-click menu offers, in order, "" for a separator:
// Undo, Redo | Cut, Copy, Paste, Select All | Toggle Comment, Run
// Selection (Run Line with nothing selected), Go to Definition. Public so
// the menu's shape can be tested without opening it.
[[nodiscard]] ICoreStringList contextMenuRows() const;
static constexpr int MIN_FONT_POINTS = 7;
static constexpr int MAX_FONT_POINTS = 32;
// Mirror of editorFontSizeChanged below, for subscribers outside the
// wrapper zone.
ICoreSignal<int> onEditorFontSizeChanged;
protected:
// P5.11: overrides of ICoreRichTextEdit's hook surface, not Qt handlers.
void resized(const ICoreSizeF& newSize, const ICoreSizeF& oldSize) override;
bool keyPressed(const ICoreKeyEvent& event) override;
void keyProcessed(const ICoreKeyEvent& event) override;
bool wheelScrolled(const ICoreWheelEvent& event) override; // Ctrl+wheel zooms
void paintUnderlay(ICorePainter& painter, const ICoreRect& bounds) override; // the focused-line band
void paintOverlay(ICorePainter& painter, const ICoreRect& bounds) override; // the disabled scrim
void mouseMoved(const ICoreMouseEvent& event) override; // hover help (S3.9)
void mouseLeft() override;
bool contextMenuRequested(const ICoreMouseEvent& event) override; // the editor's menu (S2.6)
bool mousePressed(const ICoreMouseEvent& event) override; // a click on a fold's "⋯" (S3.13)
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreScriptEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/ICoreScript/ICoreScriptEditorHighlighter.h
ICoreScriptEditorHighlighter#
ICoreScriptEditorHighlighter.h:19 · class · bases public ICoreSyntaxHighlighterBase · pImpl · 5 declaration(s)
Highlighting for the console language — the same lines the Quick Code prompt takes: recipe statements, assignments, math expressions and registered commands.
class ICoreScriptEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreScriptEditorHighlighter(const ICoreTextDocumentHandle& document);
~ICoreScriptEditorHighlighter() override;
// Drop the handles learned from the script being replaced, so names from the
// last one don't keep their colour in the next.
void forgetLearnedHandles();
protected:
// Adds this highlighter's own formats (handles, ports, symbols) on top of
// the base palette, and is re-run by the base on a theme switch.
void initTheme() override;
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreScriptFind.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/ICoreScript/ICoreScriptFind.h
ICoreScriptFind#
ICoreScriptFind.h:13 · class · nested Options, Match · 0 declaration(s)
The matching behind the script editor's Find / Replace bar (script IDE plan S3.3), as plain text in, ranges out, so it is tested without an editor.
class ICoreScriptFind {
public:
struct Options {
bool matchCase = false;
bool wholeWord = false;
bool regex = false;
};
struct Match {
int start = 0; // character offset in the text
int length = 0;
};
// Every match, in order. An invalid regex answers none and sets `error`.
static std::vector<Match> findAll(const ICoreString& text, const ICoreString& query,
const Options& options, ICoreString* error = nullptr);
// What `replacement` becomes for `matched`: itself for a literal query;
// for a regex, with \1 ... \9 standing for the match's groups.
static ICoreString replacementFor(const ICoreString& matched, const ICoreString& query,
const ICoreString& replacement, const Options& options);
// The whole text with every match replaced -- what Replace All writes, as
// ONE edit.
static ICoreString replaceAll(const ICoreString& text, const ICoreString& query,
const ICoreString& replacement, const Options& options,
int* count = nullptr);
};
};
ICoreScriptSignatureStrip.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/ICoreScript/ICoreScriptSignatureStrip.h
ICoreScriptSignatureStrip#
ICoreScriptSignatureStrip.h:18 · class · bases public ICoreWidget · pImpl · nested Parts · 6 declaration(s)
Signature help for the script editor (S3.10): one line under the editor reading the signature of the call the caret stands in, with the argument being typed in BOLD, and the name's description afte...
class ICoreScriptSignatureStrip : public ICoreWidget {
public:
explicit ICoreScriptSignatureStrip(ICoreNativeWidget* parent = nullptr);
~ICoreScriptSignatureStrip() override;
// Show `signature` ("name(a, b)", "[o1, o2] = name(a, b)"), with argument
// `active` (0-based) bold; `description` follows it, dimmed. An empty
// signature hides the strip.
void setSignature(const ICoreString& signature, int active, const ICoreString& description);
void clearSignature();
// The parts setSignature paints: what comes before the argument list,
// each argument, and what follows it. `name(a, b) extra` is
// {"name(", {"a", "b"}, ") extra"}. Arguments split at top-level commas.
// Public so the split can be tested without painting.
struct Parts {
ICoreString before;
std::vector<ICoreString> arguments;
ICoreString after;
};
static Parts splitSignature(const ICoreString& signature);
protected:
void paintContent(ICorePainter& painter) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreJavaEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Java/ICoreJavaEditor.h
ICoreJavaEditor#
ICoreJavaEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreJavaEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreJavaEditor(ICoreWidget* parent = nullptr);
~ICoreJavaEditor() override;
};
};
ICoreJavaEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Java/ICoreJavaEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreJavaEditorHighlighter#
ICoreJavaEditorHighlighter.h:8 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
class ICoreJavaEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreJavaEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreMatlabEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Matlab/ICoreMatlabEditor.h
ICoreMatlabEditor#
ICoreMatlabEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreMatlabEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreMatlabEditor(ICoreWidget* parent = nullptr);
~ICoreMatlabEditor() override;
};
};
ICoreMatlabEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Matlab/ICoreMatlabEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreMatlabEditorHighlighter#
ICoreMatlabEditorHighlighter.h:9 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
class ICoreMatlabEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreMatlabEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICorePLCBaseHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/ICorePLCBaseHighlighter.h
ICorePLCBaseHighlighter#
ICorePLCBaseHighlighter.h:13 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
ICorePLCBaseHighlighter Shared base for: ST / LD / FBD / SFC (IEC 61131-3)
class ICorePLCBaseHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICorePLCBaseHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICorePLC_FBD_Editor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_FBD/ICorePLC_FBD_Editor.h
ICorePLC_FBD_Editor#
ICorePLC_FBD_Editor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICorePLC_FBD_Editor : public ICoreCodeEditorBaseClass {
public:
explicit ICorePLC_FBD_Editor(ICoreWidget* parent = nullptr);
~ICorePLC_FBD_Editor() override;
};
};
ICorePLC_FBD_EditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_FBD/ICorePLC_FBD_EditorHighlighter.h
ICorePLC_FBD_EditorHighlighter#
ICorePLC_FBD_EditorHighlighter.h:9 · class · bases public ICorePLCBaseHighlighter · 1 declaration(s)
class ICorePLC_FBD_EditorHighlighter : public ICorePLCBaseHighlighter {
public:
explicit ICorePLC_FBD_EditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICorePLC_LD_Editor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_LD/ICorePLC_LD_Editor.h
ICorePLC_LD_Editor#
ICorePLC_LD_Editor.h:7 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICorePLC_LD_Editor : public ICoreCodeEditorBaseClass {
public:
explicit ICorePLC_LD_Editor(ICoreWidget* parent = nullptr);
~ICorePLC_LD_Editor() override;
};
};
ICorePLC_LD_EditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_LD/ICorePLC_LD_EditorHighlighter.h
ICorePLC_LD_EditorHighlighter#
ICorePLC_LD_EditorHighlighter.h:8 · class · bases public ICorePLCBaseHighlighter · 1 declaration(s)
class ICorePLC_LD_EditorHighlighter : public ICorePLCBaseHighlighter {
public:
explicit ICorePLC_LD_EditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICorePLC_SFC_Editor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_SFC/ICorePLC_SFC_Editor.h
ICorePLC_SFC_Editor#
ICorePLC_SFC_Editor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICorePLC_SFC_Editor : public ICoreCodeEditorBaseClass {
public:
explicit ICorePLC_SFC_Editor(ICoreWidget* parent = nullptr);
~ICorePLC_SFC_Editor() override;
};
};
ICorePLC_SFC_EditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_SFC/ICorePLC_SFC_EditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICorePLC_SFC_EditorHighlighter#
ICorePLC_SFC_EditorHighlighter.h:8 · class · bases public ICorePLCBaseHighlighter · 2 declaration(s)
class ICorePLC_SFC_EditorHighlighter : public ICorePLCBaseHighlighter {
public:
explicit ICorePLC_SFC_EditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICorePLC_ST_Editor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_ST/ICorePLC_ST_Editor.h
ICorePLC_ST_Editor#
ICorePLC_ST_Editor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICorePLC_ST_Editor : public ICoreCodeEditorBaseClass {
public:
explicit ICorePLC_ST_Editor(ICoreWidget* parent = nullptr);
~ICorePLC_ST_Editor() override;
};
};
ICorePLC_ST_EditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/PLC/PLC_ST/ICorePLC_ST_EditorHighlighter.h
ICorePLC_ST_EditorHighlighter#
ICorePLC_ST_EditorHighlighter.h:8 · class · bases public ICorePLCBaseHighlighter · 1 declaration(s)
class ICorePLC_ST_EditorHighlighter : public ICorePLCBaseHighlighter {
public:
explicit ICorePLC_ST_EditorHighlighter(const ICoreTextDocumentHandle& document);
};
};
ICorePythonEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Python/ICorePythonEditor.h
ICorePythonEditor#
ICorePythonEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICorePythonEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICorePythonEditor(ICoreWidget* parent = nullptr);
~ICorePythonEditor() override;
};
};
ICorePythonEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Python/ICorePythonEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICorePythonEditorHighlighter#
ICorePythonEditorHighlighter.h:8 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
class ICorePythonEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICorePythonEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};
ICoreRustEditor.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Rust/ICoreRustEditor.h
ICoreRustEditor#
ICoreRustEditor.h:8 · class · bases public ICoreCodeEditorBaseClass · 2 declaration(s)
class ICoreRustEditor : public ICoreCodeEditorBaseClass {
public:
explicit ICoreRustEditor(ICoreWidget* parent = nullptr);
~ICoreRustEditor() override;
};
};
ICoreRustEditorHighlighter.h#
src/ICoreBlocks/ICoreStudio/StudioObjects/CodeEditors/Rust/ICoreRustEditorHighlighter.h
ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString signature Qt declares, so this one is the project's own (plan section 6, H6).
ICoreRustEditorHighlighter#
ICoreRustEditorHighlighter.h:8 · class · bases public ICoreSyntaxHighlighterBase · 2 declaration(s)
class ICoreRustEditorHighlighter : public ICoreSyntaxHighlighterBase {
public:
explicit ICoreRustEditorHighlighter(const ICoreTextDocumentHandle& document);
protected:
// ICoreString since C9: ICoreSyntaxHighlighterBase interposes the QString
// signature Qt declares, so this one is the project's own (plan section 6, H6).
void highlightBlock(const ICoreString& text) override;
};
};