undoStudio
The IDE of the undoRT ecosystem
Loading...
Searching...
No Matches
undoApp::ST::STApp Class Reference

Main application class for the Structured Text editor plugin. More...

#include <undoAppST.hpp>

Collaboration diagram for undoApp::ST::STApp:
Collaboration graph

Classes

struct  CompletionSpot
 
struct  MethodLineInfo
 
struct  WorkspaceDeclaration
 A declaration found somewhere in the workspace. More...
 
struct  WorkspaceMethod
 A METHOD of a file in the workspace, for the file tree. More...
 

Public Member Functions

bool initialize ()
 Initialize the ST undoApp.
 
void shutdown ()
 Shutdown the ST undoApp and release resources.
 
void registerPanels ()
 Register UI panels with ImGuiManager.
 
void beginEditorFrame ()
 Do the ST editor's per-frame work, before any document is drawn.
 
void renderDocument ()
 Draw the Structured Text document, inside the editor panel.
 
void endEditorFrame ()
 Draw the ST editor's overlays, after the document.
 
void renderOutputPanel ()
 Render the Output panel (validation and compilation messages)
 
void renderOutlinePanel ()
 Render the Outline panel (AST structure tree with methods)
 
void renderWorkspacePanel ()
 Render the workspace/file-tree panel.
 
void renderFileTree (FileNode &node)
 Render one file-tree node and its children recursively.
 
void loadWorkspace (const std::string &path)
 Load a workspace directory into the file tree.
 
void openWorkspaceDialog ()
 Open a folder-picker dialog and load the chosen workspace.
 
void createNewFile (const std::string &parentPath, const std::string &name)
 Create a new ST file under parentPath.
 
void createNewFolder (const std::string &parentPath, const std::string &name)
 Create a new folder under parentPath.
 
void deleteFile (const std::string &path)
 Delete the file or folder at path.
 
void renameFile (const std::string &oldPath, const std::string &newName)
 Rename the entry at oldPath to newName.
 
void moveFile (const std::string &sourcePath, const std::string &destDir)
 Move sourcePath into destDir.
 
void renameFileTo (const std::string &path)
 Record that the file this editor holds has moved on disk.
 
void saveCurrentFile ()
 Save the currently open file.
 
bool hasUnsavedChanges () const
 Whether the file has edits that are not on disk.
 
void openFile (const std::string &path)
 Open a file for editing (with method extraction)
 
void closeFile ()
 Close the currently open ST file and clear the editor state.
 
bool handleKeyboardShortcuts ()
 Handle keyboard shortcuts.
 
std::string generateSTFile ()
 Generate the full ST file content from the editor sections and methods.
 
std::string generateSTFileWithMap (std::vector< SourceSegment > &outSegments)
 Generate the ST file and record where each editor section landed.
 
void refreshSemanticHighlighting ()
 Re-run the st2cpp analyzer and push resolved symbol colors to the editors.
 
const SourceSegment * segmentForLine (int fullLine) const
 Map a generated-file line to the editor that owns it.
 
const Declaration * findDeclaration (const std::string &name, const std::string &scope) const
 Resolve a name to the declaration it should navigate to.
 
void revealGeneratedLine (int fullLine, int col, int tokenLength=0)
 Move the editor to a generated-file line, switching METHOD tabs.
 
STDocument takeDocument ()
 Take the open file out whole, to be put back later.
 
void setDocument (const STDocument &doc)
 Show a file taken out by takeDocument()
 
bool revealMethodTab (const std::string &methodName)
 Switch to a METHOD tab, materializing it if needed.
 
void requestTabSelection (const std::string &tabName)
 Ask the tab bar to show a tab on the next frame.
 
void requestAddMethodDialog ()
 Ask the ST document to show the "Add Method" dialog.
 
bool consumeAddMethodDialogRequest ()
 Take the pending "Add Method" request, if there is one.
 
bool revealDeclaration (const Declaration &decl)
 Reveal a declaration, handling METHOD headers and parameters.
 
void handleNavigationInput (const char *id, TextEditor &editor)
 Handle Ctrl+Click and hover on one editor.
 
void applyPendingJump ()
 Resolve a name queued by a cross-file Ctrl+Click and reveal it.
 
void showIdentifierTooltip (TextEditor &editor)
 Show the resolved declaration of the identifier under the mouse.
 
void updateDirtyState ()
 Poll the editors and update the dirty flag.
 
void requestOpenFile (const std::string &path)
 Open a file, asking first when there are unsaved changes.
 
void openMethodOf (const std::string &filePath, const std::string &methodName)
 Open a file and land on one of its METHOD tabs.
 
void renderDirtyPrompt ()
 Render the save / discard confirmation.
 
void renderJumpPopup ()
 Let the user pick a target when a name has several declarations.
 
void ensureWorkspaceIndex ()
 Build (or reuse) the index of declarations across the workspace.
 
void ensureProjectRegistry ()
 Build (or reuse) the library registry describing the sibling files.
 
void invalidateWorkspaceIndex (const std::string &path)
 Invalidate the workspace index after a file changed.
 
std::vector< WorkspaceDeclaration > findWorkspaceDeclarations (const std::string &name) const
 All declarations of a name across the workspace.
 
void indexSTFile (const std::string &path, std::unordered_map< std::string, std::vector< WorkspaceDeclaration > > &outDecls) const
 Index the declarations of one .st file.
 
void setupEditors ()
 Setup and configure the TextEditor widgets.
 
void validateAndParse ()
 Validate and parse the current ST code (includes semantic analysis)
 
void compile ()
 Compile the current ST code.
 
void addOutput (OutSeverity severity, std::string text)
 Append a tagged line to the Output panel.
 
void setErrorMarkers ()
 Set error markers on the appropriate editors based on m_errors.
 
void renderSplitEditor (TextEditor &varEditor, TextEditor &bodyEditor, float &splitterPos, const char *varLabel, const char *bodyLabel, const char *varId, const char *bodyId)
 Render one Variables/Body split editor (shared by the POU tab and every method tab)
 
MethodEditors & getOrCreateMethodEditors (MethodData &method)
 Get (creating on first use) the editor pair for a method tab.
 
void syncMethodEditorsToData ()
 Pull the live text out of every currently-open method editor back into m_methods.
 
void addMethod (const std::string &name, const std::string &returnType)
 Add a new, empty method and switch to its tab.
 
void deleteMethod (const std::string &name)
 Delete a method by name.
 
int findMethodIndex (const std::string &name) const
 Find the index of a method by name, or -1 if not found.
 
void resetMethodState ()
 Reset all method-related state (called whenever the open file changes/closes)
 

Static Public Member Functions

static STApp & getInstance ()
 Get the singleton instance of STApp.
 
static bool identifierAt (const TextEditor &editor, int line, int col, std::string &outName)
 Extract the identifier surrounding a position in an editor.
 
static int columnOfName (const std::vector< std::string > &srcLines, int line, const std::string &name)
 Column of a name inside a generated line, or -1 when absent.
 
static int countLines (const std::string &text)
 Count the number of lines in a text string.
 

Private Member Functions

TextEditor * editorForSegment (const SourceSegment &segment) const
 Resolve the TextEditor that backs a segment, or nullptr if closed.
 
void updateMemberCompletion (const char *id, TextEditor &editor, bool editorHasKeyboard)
 
void clearMemberCompletion ()
 
void dismissMemberCompletion ()
 
void moveMemberCompletion (int delta)
 
void moveMemberCompletionByPage (int pages)
 
void acceptMemberCompletion ()
 
void renderMemberCompletion ()
 
ImGuiKey handleMemberCompletionKeys ()
 
std::string methodScopeAtLine (int line) const
 The METHOD whose body a line sits in, empty for POU-level code.
 
st2cpp::semantic::ScopeId scopeIdForLine (int line) const
 The scope an identifier on a line resolves from, 0 when nothing is.
 
void updateSignatureHelp (const char *id, TextEditor &editor, bool editorHasKeyboard)
 
void clearSignatureHelp ()
 
void dismissSignatureHelp ()
 
void renderSignatureHelp ()
 
ImGuiKey handleSignatureHelpKeys ()
 
void renderParameterNameHint (const char *id, TextEditor &editor)
 
void runTranspiler ()
 Run st2cpp over the open project and report what it says.
 
void updateStatementCompletion (const char *id, TextEditor &editor, bool editorHasKeyboard, bool inVariables)
 
void clearStatementCompletion ()
 
void dismissStatementCompletion ()
 
void moveStatementCompletion (int delta)
 
void moveStatementCompletionByPage (int pages)
 
void acceptStatementCompletion ()
 
void renderStatementCompletion ()
 
ImGuiKey handleStatementCompletionKeys ()
 
bool statementCompletionOpen () const
 True while a statement list is up, which the member list defers to.
 
void invalidateSemanticTokens ()
 Drop the semantic spans the editors are painting.
 
void claimOverlayNavigationKeys ()
 Claim the navigation keys for whichever overlay is open.
 
bool anyOverlayOpen () const
 True while any of the three overlays is on screen.
 
bool buildParameterPicker (TextEditor &editor, const std::vector< std::string > &lines, const TextEditor::Coordinates &cursor)
 Fill the completion list with the parameters of the call at the caret.
 

Private Attributes

bool m_initialized = false
 Initialization flag.
 
std::string m_workspacePath
 Current workspace path.
 
FileNode m_rootNode
 Root of the file tree.
 
std::string m_currentFilePath
 Path of the currently open file.
 
std::string m_currentFileContent
 Content of the currently open file.
 
std::vector< OutputLine > m_outputLines
 
bool m_showGeneratedDump = false
 
OutputFilter m_outputFilter
 
char m_outputSearch [256] = {}
 
size_t m_outputLinesShown = 0
 Last line count the Output panel drew, so it can tell new output from old.
 
std::unique_ptr< TextEditor > m_variablesEditor
 Editor for the Variables section.
 
std::unique_ptr< TextEditor > m_bodyEditor
 Editor for the Body section.
 
std::string m_pouName
 Name of the current POU.
 
POUType m_pouType = POUType::Program
 Type of the current POU.
 
std::unique_ptr< TranslationUnit > m_ast
 AST of the current file.
 
std::vector< ParseError > m_errors
 Parsing errors.
 
std::vector< SourceSegment > m_sourceMap
 Layout of the last generated file.
 
std::vector< std::string > m_srcLines
 Generated source, 1-based via index+1.
 
std::unique_ptr< st2cpp::semantic::SemanticInfo > m_semantic
 Cached analysis of the current AST, rebuilt by validateAndParse()
 
DeclarationIndex m_declarations
 Declarations of the open file, keyed by normalized name.
 
bool m_showTooltips = false
 Hover tooltips are opt-in: they interrupt reading.
 
bool m_isDirty = false
 Editor text differs from the file on disk.
 
int m_ignoreChangeFrames = 0
 Frames to skip after a programmatic load.
 
bool m_showDirtyPrompt = false
 True while the confirmation popup is open.
 
std::string m_pendingOpenPath
 File queued to open once the user decides.
 
std::unordered_map< std::string, std::vector< WorkspaceDeclaration > > m_workspaceDecls
 
bool m_workspaceIndexValid = false
 
std::unique_ptr< st2cpp::library::LibraryRegistry > m_projectRegistry
 Declarations of the sibling files, as the analyzer's external scope.
 
std::unordered_map< std::string, std::vector< WorkspaceMethod > > m_workspaceMethods
 METHODS of each indexed .st file, so the tree can show them.
 
std::string m_pendingTabAfterOpen
 Tab to select once a pending file switch has completed.
 
std::string m_pendingJumpName
 Identifier to reveal after a file switch.
 
std::vector< WorkspaceDeclaration > m_jumpCandidates
 
std::string m_jumpCandidateName
 
bool m_showJumpPopup = false
 True when a name is declared more than once.
 
std::vector< MethodData > m_methods
 List of methods.
 
std::string m_currentContext
 Current context: "POU" or "METHOD:name".
 
std::string m_pouVariablesText
 Variables text for the main POU.
 
std::string m_pouBodyText
 Body text for the main POU.
 
std::string m_activeTab
 "" = POU tab (Variables/Body), otherwise the open method's name
 
std::string m_pendingTabSelection
 One-shot request to select a tab, honoured via ImGuiTabItemFlags_SetSelected.
 
bool m_pendingSelectPOU = false
 Request to select the POU tab.
 
std::unordered_map< std::string, MethodEditors > m_methodEditors
 Lazily-created editors, keyed by method name.
 
bool m_showNewFilePopup = false
 
bool m_showNewFolderPopup = false
 
bool m_showRenamePopup = false
 
bool m_showNewPOUPopup = false
 
bool m_showAddMethodPopup = false
 True if add method popup is visible.
 
bool m_addMethodDialogPending = false
 Asked for from another panel; the document opens the popup.
 
TextEditor * m_completionEditor = nullptr
 
std::vector< MemberAccess > m_completionCandidates
 Candidates the pattern still matches, best match first.
 
int m_completionSelected = 0
 Index into m_completionCandidates.
 
std::string m_completionPrefix
 Prefix the candidates were filtered with.
 
std::string m_completionObject
 Instance name the '.' was typed after.
 
TextEditor * m_parameterPickerEditor = nullptr
 
bool m_completionIsParameterList = false
 
CompletionSpot m_completionDismissed
 
bool m_completionDismissedValid = false
 
int m_completionLine = -1
 Line and column span the completion would replace, in editor coordinates.
 
int m_completionColStart = 0
 
int m_completionColEnd = 0
 
ImVec2 m_completionRectMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_completionRectMax = ImVec2(0.0f, 0.0f)
 
ImVec2 m_completionEditorMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_completionEditorMax = ImVec2(0.0f, 0.0f)
 
ImVec2 m_completionCursorScreen = ImVec2(0.0f, 0.0f)
 
int m_completionScroll = 0
 
int m_completionPageSize = 8
 Rows the last frame had room for, so navigation knows a page.
 
TextEditor * m_signatureEditor = nullptr
 
CallSignature m_signature
 The callee the cursor is inside.
 
CallSite m_signatureCall
 Where that call is, for its label.
 
int m_signatureArgument = 0
 Index of the argument the cursor is in.
 
CompletionSpot m_signatureDismissed
 
bool m_signatureDismissedValid = false
 
ImVec2 m_signatureRectMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_signatureRectMax = ImVec2(0.0f, 0.0f)
 
ImVec2 m_signatureCursorScreen = ImVec2(0.0f, 0.0f)
 
ImVec2 m_signatureEditorMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_signatureEditorMax = ImVec2(0.0f, 0.0f)
 
bool m_signatureArgumentEmpty = false
 
TextEditor * m_snippetEditor = nullptr
 Editor the list belongs to.
 
std::vector< StatementSnippet > m_snippetCandidates
 Matching skeletons, best first.
 
std::vector< std::vector< int > > m_snippetMatchMask
 One row per candidate, a byte per label character, 1 where the pattern matched.
 
int m_snippetSelected = 0
 Index into m_snippetCandidates.
 
int m_snippetScroll = 0
 First candidate row on screen.
 
std::string m_snippetPrefix
 What the candidates were filtered with.
 
bool m_snippetInVariables = false
 Pane the list was built for.
 
int m_snippetLine = -1
 Line and column span the list would replace, in editor coordinates.
 
int m_snippetColStart = 0
 
int m_snippetColEnd = 0
 
CompletionSpot m_snippetDismissed
 
bool m_snippetDismissedValid = false
 
ImVec2 m_snippetRectMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_snippetRectMax = ImVec2(0.0f, 0.0f)
 
ImVec2 m_snippetCursorScreen = ImVec2(0.0f, 0.0f)
 
ImVec2 m_snippetEditorMin = ImVec2(0.0f, 0.0f)
 
ImVec2 m_snippetEditorMax = ImVec2(0.0f, 0.0f)
 
bool m_showDeleteMethodConfirmation = false
 True if delete method confirmation is visible.
 
POUType m_newPOUType = POUType::Program
 
std::string m_newPOUName
 
std::string m_newItemName
 
std::string m_newItemParent
 
std::string m_renamePath
 
float m_splitterPos = 0.5f
 Where the Variables and Body sections are divided.
 
bool m_splitterDirty = false
 It has been dragged and not yet written out.
 
std::string m_functionReturnType
 
std::string m_newMethodName
 
std::string m_newMethodReturnType
 
std::string m_newMethodVisibility
 
std::string m_methodToDelete
 
bool m_showDeleteConfirmation = false
 True if delete confirmation popup is visible.
 
bool m_showWorkspaceDialog = false
 
char m_workspaceDialogPath [1024] = {}
 
std::string m_deletePendingPath
 Path of the file/folder pending deletion.
 
std::string m_draggedItemPath
 
bool m_isDragging = false
 
std::string m_dropTargetPath
 
bool m_showDropIndicator = false
 

Static Private Attributes

static constexpr ImGuiWindowFlags kMemberCompletionWindowFlags
 
static constexpr ImGuiWindowFlags kSignatureHelpWindowFlags = kMemberCompletionWindowFlags
 Same flags for the signature help, which is the same kind of overlay.
 

Detailed Description

Main application class for the Structured Text editor plugin.

Implements a two-pane editor (Variables + Body) with workspace management, syntax highlighting, semantic validation, AST outline, and method support.

Member Function Documentation

◆ acceptMemberCompletion()

void undoApp::ST::STApp::acceptMemberCompletion ( )
private

◆ acceptStatementCompletion()

void undoApp::ST::STApp::acceptStatementCompletion ( )
private

◆ addMethod()

void undoApp::ST::STApp::addMethod ( const std::string &  name,
const std::string &  returnType 
)

Add a new, empty method and switch to its tab.

◆ addOutput()

void undoApp::ST::STApp::addOutput ( OutSeverity  severity,
std::string  text 
)

Append a tagged line to the Output panel.

◆ anyOverlayOpen()

bool undoApp::ST::STApp::anyOverlayOpen ( ) const
private

True while any of the three overlays is on screen.

◆ applyPendingJump()

void undoApp::ST::STApp::applyPendingJump ( )

Resolve a name queued by a cross-file Ctrl+Click and reveal it.

◆ beginEditorFrame()

void undoApp::ST::STApp::beginEditorFrame ( )

Do the ST editor's per-frame work, before any document is drawn.

Keyboard shortcuts, the unsaved-changes state, and the two popups that have to be opened and closed inside the panel that draws them: ImGui resolves a popup against the window it is opened in, so one opened anywhere else is never found again.

◆ buildParameterPicker()

bool undoApp::ST::STApp::buildParameterPicker ( TextEditor &  editor,
const std::vector< std::string > &  lines,
const TextEditor::Coordinates &  cursor 
)
private

Fill the completion list with the parameters of the call at the caret.

Returns
True when there is such a call and it has parameters to choose from

The one thing the list can offer that the text at the caret cannot: what the callee is called, written out as names. The parameters already written to the left of the caret are marked and pushed down, so Tab walks the call in the order it was declared rather than in the order the user remembers it.

◆ claimOverlayNavigationKeys()

void undoApp::ST::STApp::claimOverlayNavigationKeys ( )
private

Claim the navigation keys for whichever overlay is open.

A suggestion list owns the arrow keys and the two page keys while it is up, and ImGui's keyboard navigation has to be blind to them for the same period: it turns an arrow press into a request to move the focus to another window, and the window it lands on is scrolled into view, which drags the panel out from under the popup.

Ownership is the mechanism rather than clearing ImGuiConfigFlags_NavEnableKeyboard, which is a flag on the whole application and not this editor's to stand down: the keys are taken one at a time, and only while a list is up. NavProcessKey() asks for them with ImGuiKeyOwner_NoOwner, so a key that has an owner is not seen by it at all, while the list's own IsKeyPressed() — which asks with ImGuiKeyOwner_Any — keeps working.

Nothing is released here. Ownership is given up by ImGui on the frame after the key comes up, and claiming a key the list is no longer using would take it from whatever does.

◆ clearMemberCompletion()

void undoApp::ST::STApp::clearMemberCompletion ( )
private

◆ clearSignatureHelp()

void undoApp::ST::STApp::clearSignatureHelp ( )
private

◆ clearStatementCompletion()

void undoApp::ST::STApp::clearStatementCompletion ( )
private

◆ closeFile()

void undoApp::ST::STApp::closeFile ( )

Close the currently open ST file and clear the editor state.

◆ columnOfName()

static int undoApp::ST::STApp::columnOfName ( const std::vector< std::string > &  srcLines,
int  line,
const std::string &  name 
)
static

Column of a name inside a generated line, or -1 when absent.

◆ compile()

void undoApp::ST::STApp::compile ( )

Compile the current ST code.

◆ consumeAddMethodDialogRequest()

bool undoApp::ST::STApp::consumeAddMethodDialogRequest ( )

Take the pending "Add Method" request, if there is one.

Returns
true once per request, and clear the fields for the dialog

◆ countLines()

static int undoApp::ST::STApp::countLines ( const std::string &  text)
static

Count the number of lines in a text string.

◆ createNewFile()

void undoApp::ST::STApp::createNewFile ( const std::string &  parentPath,
const std::string &  name 
)

Create a new ST file under parentPath.

◆ createNewFolder()

void undoApp::ST::STApp::createNewFolder ( const std::string &  parentPath,
const std::string &  name 
)

Create a new folder under parentPath.

◆ deleteFile()

void undoApp::ST::STApp::deleteFile ( const std::string &  path)

Delete the file or folder at path.

◆ deleteMethod()

void undoApp::ST::STApp::deleteMethod ( const std::string &  name)

Delete a method by name.

◆ dismissMemberCompletion()

void undoApp::ST::STApp::dismissMemberCompletion ( )
private

◆ dismissSignatureHelp()

void undoApp::ST::STApp::dismissSignatureHelp ( )
private

◆ dismissStatementCompletion()

void undoApp::ST::STApp::dismissStatementCompletion ( )
private

◆ editorForSegment()

TextEditor * undoApp::ST::STApp::editorForSegment ( const SourceSegment &  segment) const
private

Resolve the TextEditor that backs a segment, or nullptr if closed.

◆ endEditorFrame()

void undoApp::ST::STApp::endEditorFrame ( )

Draw the ST editor's overlays, after the document.

The signature help and the two completion lists are separate windows drawn after the document so that the editor cannot clip them, and the navigation keys are claimed last so that the claim exists by the end of the frame.

◆ ensureProjectRegistry()

void undoApp::ST::STApp::ensureProjectRegistry ( )

Build (or reuse) the library registry describing the sibling files.

The analyzer resolves an unknown named type by consulting its external scope, so exporting every other .st file as a semantic-only library is what makes a FUNCTION_BLOCK declared in a sibling file usable from the open one. Cached: parsing every file on each keystroke is not affordable.

◆ ensureWorkspaceIndex()

void undoApp::ST::STApp::ensureWorkspaceIndex ( )

Build (or reuse) the index of declarations across the workspace.

◆ findDeclaration()

const Declaration * undoApp::ST::STApp::findDeclaration ( const std::string &  name,
const std::string &  scope 
) const

Resolve a name to the declaration it should navigate to.

◆ findMethodIndex()

int undoApp::ST::STApp::findMethodIndex ( const std::string &  name) const

Find the index of a method by name, or -1 if not found.

◆ findWorkspaceDeclarations()

std::vector< WorkspaceDeclaration > undoApp::ST::STApp::findWorkspaceDeclarations ( const std::string &  name) const

All declarations of a name across the workspace.

◆ generateSTFile()

std::string undoApp::ST::STApp::generateSTFile ( )

Generate the full ST file content from the editor sections and methods.

◆ generateSTFileWithMap()

std::string undoApp::ST::STApp::generateSTFileWithMap ( std::vector< SourceSegment > &  outSegments)

Generate the ST file and record where each editor section landed.

Parameters
outSegmentsReceives one entry per editor-backed block
Returns
The generated file content

This is the single source of truth for the generated layout: the segment list is filled while the text is emitted, so it can never drift from what generateSTFile() actually produces. Diagnostic and semantic mapping both consume it instead of re-deriving offsets by hand.

◆ getInstance()

static STApp & undoApp::ST::STApp::getInstance ( )
static

Get the singleton instance of STApp.

◆ getOrCreateMethodEditors()

MethodEditors & undoApp::ST::STApp::getOrCreateMethodEditors ( MethodData &  method)

Get (creating on first use) the editor pair for a method tab.

◆ handleKeyboardShortcuts()

bool undoApp::ST::STApp::handleKeyboardShortcuts ( )

Handle keyboard shortcuts.

◆ handleMemberCompletionKeys()

ImGuiKey undoApp::ST::STApp::handleMemberCompletionKeys ( )
private
Returns
the key the list took, or ImGuiKey_None

◆ handleNavigationInput()

void undoApp::ST::STApp::handleNavigationInput ( const char *  id,
TextEditor &  editor 
)

Handle Ctrl+Click and hover on one editor.

◆ handleSignatureHelpKeys()

ImGuiKey undoApp::ST::STApp::handleSignatureHelpKeys ( )
private
Returns
the key the signature took, or ImGuiKey_None

◆ handleStatementCompletionKeys()

ImGuiKey undoApp::ST::STApp::handleStatementCompletionKeys ( )
private
Returns
the key the list took, or ImGuiKey_None

◆ hasUnsavedChanges()

bool undoApp::ST::STApp::hasUnsavedChanges ( ) const
inline

Whether the file has edits that are not on disk.

Kept here rather than asked of the editors, because the ST file is not one buffer: it is the panes, and what they hold together is not what any single one of them can answer.

◆ identifierAt()

static bool undoApp::ST::STApp::identifierAt ( const TextEditor &  editor,
int  line,
int  col,
std::string &  outName 
)
static

Extract the identifier surrounding a position in an editor.

◆ indexSTFile()

void undoApp::ST::STApp::indexSTFile ( const std::string &  path,
std::unordered_map< std::string, std::vector< WorkspaceDeclaration > > &  outDecls 
) const

Index the declarations of one .st file.

◆ initialize()

bool undoApp::ST::STApp::initialize ( )

Initialize the ST undoApp.

◆ invalidateSemanticTokens()

void undoApp::ST::STApp::invalidateSemanticTokens ( )
private

Drop the semantic spans the editors are painting.

◆ invalidateWorkspaceIndex()

void undoApp::ST::STApp::invalidateWorkspaceIndex ( const std::string &  path)

Invalidate the workspace index after a file changed.

◆ loadWorkspace()

void undoApp::ST::STApp::loadWorkspace ( const std::string &  path)

Load a workspace directory into the file tree.

◆ methodScopeAtLine()

std::string undoApp::ST::STApp::methodScopeAtLine ( int  line) const
private

The METHOD whose body a line sits in, empty for POU-level code.

◆ moveFile()

void undoApp::ST::STApp::moveFile ( const std::string &  sourcePath,
const std::string &  destDir 
)

Move sourcePath into destDir.

◆ moveMemberCompletion()

void undoApp::ST::STApp::moveMemberCompletion ( int  delta)
private

◆ moveMemberCompletionByPage()

void undoApp::ST::STApp::moveMemberCompletionByPage ( int  pages)
private

◆ moveStatementCompletion()

void undoApp::ST::STApp::moveStatementCompletion ( int  delta)
private

◆ moveStatementCompletionByPage()

void undoApp::ST::STApp::moveStatementCompletionByPage ( int  pages)
private

◆ openFile()

void undoApp::ST::STApp::openFile ( const std::string &  path)

Open a file for editing (with method extraction)

◆ openMethodOf()

void undoApp::ST::STApp::openMethodOf ( const std::string &  filePath,
const std::string &  methodName 
)

Open a file and land on one of its METHOD tabs.

◆ openWorkspaceDialog()

void undoApp::ST::STApp::openWorkspaceDialog ( )

Open a folder-picker dialog and load the chosen workspace.

◆ refreshSemanticHighlighting()

void undoApp::ST::STApp::refreshSemanticHighlighting ( )

Re-run the st2cpp analyzer and push resolved symbol colors to the editors.

◆ registerPanels()

void undoApp::ST::STApp::registerPanels ( )

Register UI panels with ImGuiManager.

◆ renameFile()

void undoApp::ST::STApp::renameFile ( const std::string &  oldPath,
const std::string &  newName 
)

Rename the entry at oldPath to newName.

◆ renameFileTo()

void undoApp::ST::STApp::renameFileTo ( const std::string &  path)

Record that the file this editor holds has moved on disk.

Only the path, never the panes: the editor is still showing the same file, and without this a save after a rename writes a second copy at the old path. The workspace index is invalidated for both paths, because it is keyed by path and the entry that described the file now answers to the other one.

Parameters
pathWhere the file now is

◆ renderDirtyPrompt()

void undoApp::ST::STApp::renderDirtyPrompt ( )

Render the save / discard confirmation.

◆ renderDocument()

void undoApp::ST::STApp::renderDocument ( )

Draw the Structured Text document, inside the editor panel.

The panel belongs to EditorApp, which draws the bar of open files and then asks for whichever backend the file on screen needs. This is the ST one, so it draws no window of its own: a second Begin here would be a second window with the panel's name, laid out twice in one frame.

◆ renderFileTree()

void undoApp::ST::STApp::renderFileTree ( FileNode &  node)

Render one file-tree node and its children recursively.

◆ renderJumpPopup()

void undoApp::ST::STApp::renderJumpPopup ( )

Let the user pick a target when a name has several declarations.

◆ renderMemberCompletion()

void undoApp::ST::STApp::renderMemberCompletion ( )
private

◆ renderOutlinePanel()

void undoApp::ST::STApp::renderOutlinePanel ( )

Render the Outline panel (AST structure tree with methods)

◆ renderOutputPanel()

void undoApp::ST::STApp::renderOutputPanel ( )

Render the Output panel (validation and compilation messages)

◆ renderParameterNameHint()

void undoApp::ST::STApp::renderParameterNameHint ( const char *  id,
TextEditor &  editor 
)
private

Draw the parameter name and type in place after the cursor, the way an editor hints at the next thing to type

◆ renderSignatureHelp()

void undoApp::ST::STApp::renderSignatureHelp ( )
private

◆ renderSplitEditor()

void undoApp::ST::STApp::renderSplitEditor ( TextEditor &  varEditor,
TextEditor &  bodyEditor,
float &  splitterPos,
const char *  varLabel,
const char *  bodyLabel,
const char *  varId,
const char *  bodyId 
)

Render one Variables/Body split editor (shared by the POU tab and every method tab)

◆ renderStatementCompletion()

void undoApp::ST::STApp::renderStatementCompletion ( )
private

◆ renderWorkspacePanel()

void undoApp::ST::STApp::renderWorkspacePanel ( )

Render the workspace/file-tree panel.

◆ requestAddMethodDialog()

void undoApp::ST::STApp::requestAddMethodDialog ( )

Ask the ST document to show the "Add Method" dialog.

Meant for callers outside the Editor panel, such as the tree's context menu: the popup lives in the window the document is drawn in and a popup opened in another window is never submitted, so the request is carried over and opened there.

◆ requestOpenFile()

void undoApp::ST::STApp::requestOpenFile ( const std::string &  path)

Open a file, asking first when there are unsaved changes.

◆ requestTabSelection()

void undoApp::ST::STApp::requestTabSelection ( const std::string &  tabName)

Ask the tab bar to show a tab on the next frame.

Parameters
tabNameMETHOD name, or empty for the POU tab

◆ resetMethodState()

void undoApp::ST::STApp::resetMethodState ( )

Reset all method-related state (called whenever the open file changes/closes)

◆ revealDeclaration()

bool undoApp::ST::STApp::revealDeclaration ( const Declaration &  decl)

Reveal a declaration, handling METHOD headers and parameters.

◆ revealGeneratedLine()

void undoApp::ST::STApp::revealGeneratedLine ( int  fullLine,
int  col,
int  tokenLength = 0 
)

Move the editor to a generated-file line, switching METHOD tabs.

◆ revealMethodTab()

bool undoApp::ST::STApp::revealMethodTab ( const std::string &  methodName)

Switch to a METHOD tab, materializing it if needed.

◆ runTranspiler()

void undoApp::ST::STApp::runTranspiler ( )
private

Run st2cpp over the open project and report what it says.

◆ saveCurrentFile()

void undoApp::ST::STApp::saveCurrentFile ( )

Save the currently open file.

◆ scopeIdForLine()

st2cpp::semantic::ScopeId undoApp::ST::STApp::scopeIdForLine ( int  line) const
private

The scope an identifier on a line resolves from, 0 when nothing is.

◆ segmentForLine()

const SourceSegment * undoApp::ST::STApp::segmentForLine ( int  fullLine) const

Map a generated-file line to the editor that owns it.

◆ setDocument()

void undoApp::ST::STApp::setDocument ( const STDocument &  doc)

Show a file taken out by takeDocument()

Parameters
docThe file and its contents

Refuses a document that is not a POU, rather than showing an empty editor: a file that parses as nothing is a file worth looking at, and taking its content on the way in is what it is worth looking at for.

◆ setErrorMarkers()

void undoApp::ST::STApp::setErrorMarkers ( )

Set error markers on the appropriate editors based on m_errors.

◆ setupEditors()

void undoApp::ST::STApp::setupEditors ( )

Setup and configure the TextEditor widgets.

◆ showIdentifierTooltip()

void undoApp::ST::STApp::showIdentifierTooltip ( TextEditor &  editor)

Show the resolved declaration of the identifier under the mouse.

◆ shutdown()

void undoApp::ST::STApp::shutdown ( )

Shutdown the ST undoApp and release resources.

◆ statementCompletionOpen()

bool undoApp::ST::STApp::statementCompletionOpen ( ) const
inlineprivate

True while a statement list is up, which the member list defers to.

◆ syncMethodEditorsToData()

void undoApp::ST::STApp::syncMethodEditorsToData ( )

Pull the live text out of every currently-open method editor back into m_methods.

◆ takeDocument()

STDocument undoApp::ST::STApp::takeDocument ( )

Take the open file out whole, to be put back later.

The other end of switching tabs. Everything the editors hold is read out, including unsaved changes, because that is the only copy of them: reading the file off disk instead would hand back the saved version and lose the rest.

The AST, the semantic analysis and the source map are left out on purpose. They are derived from the text and are rebuilt when the file is shown again, so keeping them would mean carrying a second, stale copy of the truth.

◆ updateDirtyState()

void undoApp::ST::STApp::updateDirtyState ( )

Poll the editors and update the dirty flag.

◆ updateMemberCompletion()

void undoApp::ST::STApp::updateMemberCompletion ( const char *  id,
TextEditor &  editor,
bool  editorHasKeyboard 
)
private

◆ updateSignatureHelp()

void undoApp::ST::STApp::updateSignatureHelp ( const char *  id,
TextEditor &  editor,
bool  editorHasKeyboard 
)
private

◆ updateStatementCompletion()

void undoApp::ST::STApp::updateStatementCompletion ( const char *  id,
TextEditor &  editor,
bool  editorHasKeyboard,
bool  inVariables 
)
private

◆ validateAndParse()

void undoApp::ST::STApp::validateAndParse ( )

Validate and parse the current ST code (includes semantic analysis)

Member Data Documentation

◆ kMemberCompletionWindowFlags

constexpr ImGuiWindowFlags undoApp::ST::STApp::kMemberCompletionWindowFlags
staticconstexprprivate
Initial value:
=
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNavFocus |
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse

Window flags for the member completion list.

The list is drawn as a plain overlay rather than a real popup, and it never takes the keyboard: the editor keeps it and keeps receiving the characters that filter the list, which is what makes the list feel like part of the text rather than a dialog that stole it. NoFocusOnAppearing and NoNavFocus are what keep that true — the editors are BeginChild windows, and TextEditor::HandleKeyboardInputs only claims io.WantTextInput when its own child is focused, so a list that took focus the moment it opened would strip the keyboard from the editor underneath.

The overlay is therefore given a border and a background explicitly, since a popup-window background would be drawn only for a window the user is interacting with.

◆ kSignatureHelpWindowFlags

constexpr ImGuiWindowFlags undoApp::ST::STApp::kSignatureHelpWindowFlags = kMemberCompletionWindowFlags
staticconstexprprivate

Same flags for the signature help, which is the same kind of overlay.

◆ m_activeTab

std::string undoApp::ST::STApp::m_activeTab
private

"" = POU tab (Variables/Body), otherwise the open method's name

◆ m_addMethodDialogPending

bool undoApp::ST::STApp::m_addMethodDialogPending = false
private

Asked for from another panel; the document opens the popup.

◆ m_ast

std::unique_ptr<TranslationUnit> undoApp::ST::STApp::m_ast
private

AST of the current file.

◆ m_bodyEditor

std::unique_ptr<TextEditor> undoApp::ST::STApp::m_bodyEditor
private

Editor for the Body section.

◆ m_completionCandidates

std::vector<MemberAccess> undoApp::ST::STApp::m_completionCandidates
private

Candidates the pattern still matches, best match first.

◆ m_completionColEnd

int undoApp::ST::STApp::m_completionColEnd = 0
private

◆ m_completionColStart

int undoApp::ST::STApp::m_completionColStart = 0
private

◆ m_completionCursorScreen

ImVec2 undoApp::ST::STApp::m_completionCursorScreen = ImVec2(0.0f, 0.0f)
private

◆ m_completionDismissed

CompletionSpot undoApp::ST::STApp::m_completionDismissed
private

◆ m_completionDismissedValid

bool undoApp::ST::STApp::m_completionDismissedValid = false
private

◆ m_completionEditor

TextEditor* undoApp::ST::STApp::m_completionEditor = nullptr
private

The editor the completion belongs to; the pointer is stable because editors are held by unique_ptr and never moved.

◆ m_completionEditorMax

ImVec2 undoApp::ST::STApp::m_completionEditorMax = ImVec2(0.0f, 0.0f)
private

◆ m_completionEditorMin

ImVec2 undoApp::ST::STApp::m_completionEditorMin = ImVec2(0.0f, 0.0f)
private

◆ m_completionIsParameterList

bool undoApp::ST::STApp::m_completionIsParameterList = false
private

True while the open list is that parameter list rather than a member or identifier list, which decides what a key press means

◆ m_completionLine

int undoApp::ST::STApp::m_completionLine = -1
private

Line and column span the completion would replace, in editor coordinates.

◆ m_completionObject

std::string undoApp::ST::STApp::m_completionObject
private

Instance name the '.' was typed after.

◆ m_completionPageSize

int undoApp::ST::STApp::m_completionPageSize = 8
private

Rows the last frame had room for, so navigation knows a page.

◆ m_completionPrefix

std::string undoApp::ST::STApp::m_completionPrefix
private

Prefix the candidates were filtered with.

◆ m_completionRectMax

ImVec2 undoApp::ST::STApp::m_completionRectMax = ImVec2(0.0f, 0.0f)
private

◆ m_completionRectMin

ImVec2 undoApp::ST::STApp::m_completionRectMin = ImVec2(0.0f, 0.0f)
private

Screen rectangle of the editor child that owns the list, plus where the cursor sits inside it, so the list opens under the glyph being typed rather than at the top-left of the pane Screen rectangle the list took this frame, set once the window exists and is really the size ImGui gave it. Empty corners mean it drew nothing, which a window left over from an earlier frame cannot tell you.

◆ m_completionScroll

int undoApp::ST::STApp::m_completionScroll = 0
private

First candidate row on screen. Kept in step with the highlight while arrowing, and moved by the wheel.

◆ m_completionSelected

int undoApp::ST::STApp::m_completionSelected = 0
private

Index into m_completionCandidates.

◆ m_currentContext

std::string undoApp::ST::STApp::m_currentContext
private

Current context: "POU" or "METHOD:name".

◆ m_currentFileContent

std::string undoApp::ST::STApp::m_currentFileContent
private

Content of the currently open file.

◆ m_currentFilePath

std::string undoApp::ST::STApp::m_currentFilePath
private

Path of the currently open file.

◆ m_declarations

DeclarationIndex undoApp::ST::STApp::m_declarations
private

Declarations of the open file, keyed by normalized name.

◆ m_deletePendingPath

std::string undoApp::ST::STApp::m_deletePendingPath
private

Path of the file/folder pending deletion.

◆ m_draggedItemPath

std::string undoApp::ST::STApp::m_draggedItemPath
private

◆ m_dropTargetPath

std::string undoApp::ST::STApp::m_dropTargetPath
private

◆ m_errors

std::vector<ParseError> undoApp::ST::STApp::m_errors
private

Parsing errors.

◆ m_functionReturnType

std::string undoApp::ST::STApp::m_functionReturnType
private

◆ m_ignoreChangeFrames

int undoApp::ST::STApp::m_ignoreChangeFrames = 0
private

Frames to skip after a programmatic load.

◆ m_initialized

bool undoApp::ST::STApp::m_initialized = false
private

Initialization flag.

◆ m_isDirty

bool undoApp::ST::STApp::m_isDirty = false
private

Editor text differs from the file on disk.

◆ m_isDragging

bool undoApp::ST::STApp::m_isDragging = false
private

◆ m_jumpCandidateName

std::string undoApp::ST::STApp::m_jumpCandidateName
private

◆ m_jumpCandidates

std::vector<WorkspaceDeclaration> undoApp::ST::STApp::m_jumpCandidates
private

◆ m_methodEditors

std::unordered_map<std::string, MethodEditors> undoApp::ST::STApp::m_methodEditors
private

Lazily-created editors, keyed by method name.

◆ m_methods

std::vector<MethodData> undoApp::ST::STApp::m_methods
private

List of methods.

◆ m_methodToDelete

std::string undoApp::ST::STApp::m_methodToDelete
private

◆ m_newItemName

std::string undoApp::ST::STApp::m_newItemName
private

◆ m_newItemParent

std::string undoApp::ST::STApp::m_newItemParent
private

◆ m_newMethodName

std::string undoApp::ST::STApp::m_newMethodName
private

◆ m_newMethodReturnType

std::string undoApp::ST::STApp::m_newMethodReturnType
private

◆ m_newMethodVisibility

std::string undoApp::ST::STApp::m_newMethodVisibility
private

◆ m_newPOUName

std::string undoApp::ST::STApp::m_newPOUName
private

◆ m_newPOUType

POUType undoApp::ST::STApp::m_newPOUType = POUType::Program
private

◆ m_outputFilter

OutputFilter undoApp::ST::STApp::m_outputFilter
private

Which severities the Output panel shows. A member, not a local of renderOutputPanel(), because a local is rebuilt on every frame and the checkbox that writes it would be writing into a copy that dies at the end of the frame: the box would flip, the panel would ignore it, and nothing would say so.

◆ m_outputLines

std::vector<OutputLine> undoApp::ST::STApp::m_outputLines
private

Lines to display in the Output panel

◆ m_outputLinesShown

size_t undoApp::ST::STApp::m_outputLinesShown = 0
private

Last line count the Output panel drew, so it can tell new output from old.

◆ m_outputSearch

char undoApp::ST::STApp::m_outputSearch[256] = {}
private

What the Output panel is filtered by, as the user typed it. A member, and a fixed array rather than a std::string because ImGui 1.92.9's InputText takes a char buffer and this tree does not link imgui_stdlib, which is the wrapper that takes a std::string. A function-local static, which is what this was, also held its text and so appeared to work: it survived because it was static, not because the panel owned it, so a query typed for one project was still filtering the next one's log to nothing.

◆ m_parameterPickerEditor

TextEditor* undoApp::ST::STApp::m_parameterPickerEditor = nullptr
private

Set for one frame when Tab asks for the parameters of the call being written. The editor it was asked for, since both are visited every frame and only the one holding the keyboard may answer it.

◆ m_pendingJumpName

std::string undoApp::ST::STApp::m_pendingJumpName
private

Identifier to reveal after a file switch.

◆ m_pendingOpenPath

std::string undoApp::ST::STApp::m_pendingOpenPath
private

File queued to open once the user decides.

◆ m_pendingSelectPOU

bool undoApp::ST::STApp::m_pendingSelectPOU = false
private

Request to select the POU tab.

◆ m_pendingTabAfterOpen

std::string undoApp::ST::STApp::m_pendingTabAfterOpen
private

Tab to select once a pending file switch has completed.

◆ m_pendingTabSelection

std::string undoApp::ST::STApp::m_pendingTabSelection
private

One-shot request to select a tab, honoured via ImGuiTabItemFlags_SetSelected.

METHOD to select, empty for none

◆ m_pouBodyText

std::string undoApp::ST::STApp::m_pouBodyText
private

Body text for the main POU.

◆ m_pouName

std::string undoApp::ST::STApp::m_pouName
private

Name of the current POU.

◆ m_pouType

POUType undoApp::ST::STApp::m_pouType = POUType::Program
private

Type of the current POU.

◆ m_pouVariablesText

std::string undoApp::ST::STApp::m_pouVariablesText
private

Variables text for the main POU.

◆ m_projectRegistry

std::unique_ptr<st2cpp::library::LibraryRegistry> undoApp::ST::STApp::m_projectRegistry
private

Declarations of the sibling files, as the analyzer's external scope.

◆ m_renamePath

std::string undoApp::ST::STApp::m_renamePath
private

◆ m_rootNode

FileNode undoApp::ST::STApp::m_rootNode
private

Root of the file tree.

◆ m_semantic

std::unique_ptr<st2cpp::semantic::SemanticInfo> undoApp::ST::STApp::m_semantic
private

Cached analysis of the current AST, rebuilt by validateAndParse()

◆ m_showAddMethodPopup

bool undoApp::ST::STApp::m_showAddMethodPopup = false
private

True if add method popup is visible.

◆ m_showDeleteConfirmation

bool undoApp::ST::STApp::m_showDeleteConfirmation = false
private

True if delete confirmation popup is visible.

◆ m_showDeleteMethodConfirmation

bool undoApp::ST::STApp::m_showDeleteMethodConfirmation = false
private

True if delete method confirmation is visible.

◆ m_showDirtyPrompt

bool undoApp::ST::STApp::m_showDirtyPrompt = false
private

True while the confirmation popup is open.

◆ m_showDropIndicator

bool undoApp::ST::STApp::m_showDropIndicator = false
private

◆ m_showGeneratedDump

bool undoApp::ST::STApp::m_showGeneratedDump = false
private

Whether the Output panel dumps the generated ST in full. Off by default: it is hundreds of lines and it buried the diagnostics under it.

◆ m_showJumpPopup

bool undoApp::ST::STApp::m_showJumpPopup = false
private

True when a name is declared more than once.

◆ m_showNewFilePopup

bool undoApp::ST::STApp::m_showNewFilePopup = false
private

◆ m_showNewFolderPopup

bool undoApp::ST::STApp::m_showNewFolderPopup = false
private

◆ m_showNewPOUPopup

bool undoApp::ST::STApp::m_showNewPOUPopup = false
private

◆ m_showRenamePopup

bool undoApp::ST::STApp::m_showRenamePopup = false
private

◆ m_showTooltips

bool undoApp::ST::STApp::m_showTooltips = false
private

Hover tooltips are opt-in: they interrupt reading.

◆ m_showWorkspaceDialog

bool undoApp::ST::STApp::m_showWorkspaceDialog = false
private

Fallback workspace picker, for when neither tinyfiledialogs nor zenity is available. A modal of the app's own, so it has to be drawn by the panel.

◆ m_signature

CallSignature undoApp::ST::STApp::m_signature
private

The callee the cursor is inside.

◆ m_signatureArgument

int undoApp::ST::STApp::m_signatureArgument = 0
private

Index of the argument the cursor is in.

◆ m_signatureArgumentEmpty

bool undoApp::ST::STApp::m_signatureArgumentEmpty = false
private

True when the cursor sits at an empty argument, which is what the inline parameter-name hint is drawn for

◆ m_signatureCall

CallSite undoApp::ST::STApp::m_signatureCall
private

Where that call is, for its label.

◆ m_signatureCursorScreen

ImVec2 undoApp::ST::STApp::m_signatureCursorScreen = ImVec2(0.0f, 0.0f)
private

◆ m_signatureDismissed

CompletionSpot undoApp::ST::STApp::m_signatureDismissed
private

◆ m_signatureDismissedValid

bool undoApp::ST::STApp::m_signatureDismissedValid = false
private

◆ m_signatureEditor

TextEditor* undoApp::ST::STApp::m_signatureEditor = nullptr
private

◆ m_signatureEditorMax

ImVec2 undoApp::ST::STApp::m_signatureEditorMax = ImVec2(0.0f, 0.0f)
private

◆ m_signatureEditorMin

ImVec2 undoApp::ST::STApp::m_signatureEditorMin = ImVec2(0.0f, 0.0f)
private

◆ m_signatureRectMax

ImVec2 undoApp::ST::STApp::m_signatureRectMax = ImVec2(0.0f, 0.0f)
private

◆ m_signatureRectMin

ImVec2 undoApp::ST::STApp::m_signatureRectMin = ImVec2(0.0f, 0.0f)
private

Screen rectangle the signature help took this frame, so a list anchored to the same cursor can step around it instead of covering it. Two corners rather than an ImRect, which lives in an internal header this one does not need. Equal corners mean nothing was on screen.

◆ m_snippetCandidates

std::vector<StatementSnippet> undoApp::ST::STApp::m_snippetCandidates
private

Matching skeletons, best first.

◆ m_snippetColEnd

int undoApp::ST::STApp::m_snippetColEnd = 0
private

◆ m_snippetColStart

int undoApp::ST::STApp::m_snippetColStart = 0
private

◆ m_snippetCursorScreen

ImVec2 undoApp::ST::STApp::m_snippetCursorScreen = ImVec2(0.0f, 0.0f)
private

◆ m_snippetDismissed

CompletionSpot undoApp::ST::STApp::m_snippetDismissed
private

◆ m_snippetDismissedValid

bool undoApp::ST::STApp::m_snippetDismissedValid = false
private

◆ m_snippetEditor

TextEditor* undoApp::ST::STApp::m_snippetEditor = nullptr
private

Editor the list belongs to.

◆ m_snippetEditorMax

ImVec2 undoApp::ST::STApp::m_snippetEditorMax = ImVec2(0.0f, 0.0f)
private

◆ m_snippetEditorMin

ImVec2 undoApp::ST::STApp::m_snippetEditorMin = ImVec2(0.0f, 0.0f)
private

◆ m_snippetInVariables

bool undoApp::ST::STApp::m_snippetInVariables = false
private

Pane the list was built for.

◆ m_snippetLine

int undoApp::ST::STApp::m_snippetLine = -1
private

Line and column span the list would replace, in editor coordinates.

◆ m_snippetMatchMask

std::vector<std::vector<int> > undoApp::ST::STApp::m_snippetMatchMask
private

One row per candidate, a byte per label character, 1 where the pattern matched.

◆ m_snippetPrefix

std::string undoApp::ST::STApp::m_snippetPrefix
private

What the candidates were filtered with.

◆ m_snippetRectMax

ImVec2 undoApp::ST::STApp::m_snippetRectMax = ImVec2(0.0f, 0.0f)
private

◆ m_snippetRectMin

ImVec2 undoApp::ST::STApp::m_snippetRectMin = ImVec2(0.0f, 0.0f)
private

◆ m_snippetScroll

int undoApp::ST::STApp::m_snippetScroll = 0
private

First candidate row on screen.

◆ m_snippetSelected

int undoApp::ST::STApp::m_snippetSelected = 0
private

Index into m_snippetCandidates.

◆ m_sourceMap

std::vector<SourceSegment> undoApp::ST::STApp::m_sourceMap
private

Layout of the last generated file.

◆ m_splitterDirty

bool undoApp::ST::STApp::m_splitterDirty = false
private

It has been dragged and not yet written out.

◆ m_splitterPos

float undoApp::ST::STApp::m_splitterPos = 0.5f
private

Where the Variables and Body sections are divided.

◆ m_srcLines

std::vector<std::string> undoApp::ST::STApp::m_srcLines
private

Generated source, 1-based via index+1.

◆ m_variablesEditor

std::unique_ptr<TextEditor> undoApp::ST::STApp::m_variablesEditor
private

Editor for the Variables section.

◆ m_workspaceDecls

std::unordered_map<std::string, std::vector<WorkspaceDeclaration> > undoApp::ST::STApp::m_workspaceDecls
private

◆ m_workspaceDialogPath

char undoApp::ST::STApp::m_workspaceDialogPath[1024] = {}
private

◆ m_workspaceIndexValid

bool undoApp::ST::STApp::m_workspaceIndexValid = false
private

◆ m_workspaceMethods

std::unordered_map<std::string, std::vector<WorkspaceMethod> > undoApp::ST::STApp::m_workspaceMethods
mutableprivate

METHODS of each indexed .st file, so the tree can show them.

◆ m_workspacePath

std::string undoApp::ST::STApp::m_workspacePath
private

Current workspace path.


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