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

One statement skeleton the suggestion list can write out. More...

#include <undoAppSTSnippet.hpp>

Collaboration diagram for undoApp::ST::StatementSnippet:
Collaboration graph

Public Attributes

std::string label
 What the list shows, e.g. "IF ... END_IF".
 
std::string detail
 Dimmed right-hand column: what it is for.
 
std::string insert
 Keyword written when the skeleton is accepted.
 
SnippetPane pane = SnippetPane::Body
 
std::vector< std::string > lines
 Template lines, "\t" for one indent step.
 
int caretLine = 0
 Template line the caret lands on.
 
int caretColumn = 0
 Caret column, before the base indentation.
 

Detailed Description

One statement skeleton the suggestion list can write out.

The template is stored the way the statement reads, indented relative to the line the caret is on, so a nested skeleton is a matter of indenting the template rather than rewriting it. A "\t" in the template stands for one indent step and is widened to the editor's tab size on the way out.

The caret is stated against the template: caretLine counts template lines from zero, and caretColumn counts glyphs into that line before the base indentation is prepended. There is no placeholder character in the written text; the caret is placed inside it.

Member Data Documentation

◆ caretColumn

int undoApp::ST::StatementSnippet::caretColumn = 0

Caret column, before the base indentation.

◆ caretLine

int undoApp::ST::StatementSnippet::caretLine = 0

Template line the caret lands on.

◆ detail

std::string undoApp::ST::StatementSnippet::detail

Dimmed right-hand column: what it is for.

◆ insert

std::string undoApp::ST::StatementSnippet::insert

Keyword written when the skeleton is accepted.

◆ label

std::string undoApp::ST::StatementSnippet::label

What the list shows, e.g. "IF ... END_IF".

◆ lines

std::vector<std::string> undoApp::ST::StatementSnippet::lines

Template lines, "\t" for one indent step.

◆ pane

SnippetPane undoApp::ST::StatementSnippet::pane = SnippetPane::Body

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