Skip to content

figure_editor ​

figure_editor, a code editor (code_editor_object) with highlighting, marks, completion and find, and a text diff.

The editor is ImGuiColorTextEdit (the goossens fork, MIT, vendored in third_party/ImGuiColorTextEdit) with FIGURE's own glue (native/figure_editor.cpp): it draws through Dear ImGui only, so window, headless and remote modes show the same pixels. Text is UTF-8; lines and columns are numbered from 1, columns in characters. Everything is polled: ed%draw returns true on the frame the user changed the text, ed%completing while the completion popup is open.

fortran
 type(code_editor_object) :: ed
 call ed%init(code_language('input'))          ! key = value files; code_language('fortran') for Fortran
 call ed%set_text(text)
 call ed%set_completions(['reynolds number', 'save frequency '])
 ... every frame, inside a window:
 if (ed%draw('editor')) call validate(ed%text())   ! the user changed it: check it again
 call ed%clear_marks()
 call ed%mark(3, 'error', 'reynolds number must be positive')

A language (language_object) is data: keywords, types, comments, strings, numbers, case, and a key = value mode; code_language gives the shipped ones (Fortran, input files, plain text) and the fork's own (C, C++, Python, JSON, Markdown, ...). code_diff draws the difference of two texts, code_diff_lines reports the lines that differ.

Source: src/lib/figure_editor.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
LFcharacter(len=*)parameterLine feed.
UScharacter(len=*)parameterField separator of a packed language. The fork's own languages, by the names code_language takes.
FORK_LANGUAGEScharacter(len=*)parameter

Derived Types ​

language_object ​

A language the editor highlights: lang%init(name, ...), or one of code_language's. Default: plain text.

Components

NameTypeAttributesDescription
name_character(len=:)allocatableIts name ('': plain text).
forklogicalOne of the fork's own languages.
keywordscharacter(len=:)allocatableKeywords, LF-separated.
typescharacter(len=:)allocatableTypes and attributes, LF-separated.
commentcharacter(len=:)allocatableStart of a line comment.
comment_altcharacter(len=:)allocatableAnother start of a line comment.
block_startcharacter(len=:)allocatableStart of a block comment.
block_endcharacter(len=:)allocatableEnd of a block comment.
preprocessorcharacter(len=:)allocatableThe character starting a preprocessor line.
single_quoteslogical'...' strings.
double_quoteslogical"..." strings.
numberslogicalNumbers coloured.
case_sensitivelogicalKeywords and types by case.
key_valuelogicalkey = value lines.

Type-Bound Procedures

NameAttributesDescription
initpass(self)Define the language.
namepass(self)Its name.

code_editor_object ​

A code editor: ed%init([language]), ed%set_text, then ed%draw every frame. Not to be copied (the copy would share the editor). No finaliser, as texture_object: an assignment or a function result would finalise a copy and destroy the editor the original still uses; destroy releases it (at the program's end the system does).

Components

NameTypeAttributesDescription
handleinteger(kind=c_int)Native handle (0: none).

Type-Bound Procedures

NameAttributesDescription
initpass(self)Create the editor.
destroypass(self)Release it.
is_initializedpass(self)Whether it exists.
set_languagepass(self)Highlight another language.
set_textpass(self)Replace the text.
textpass(self)The text.
line_countpass(self)The number of lines.
drawpass(self)Draw the editor as a widget.
markpass(self)Mark a line with a message.
clear_markspass(self)Remove every mark.
mark_ofpass(self)The mark on a line.
gotopass(self)Move the cursor to a line.
focuspass(self)Give the editor the keyboard.
findpass(self)Select the next occurrence of a text.
replacepass(self)Replace every occurrence of a text.
cursorpass(self)The cursor's line and column.
selectionpass(self)The selection.
selectpass(self)Select a range.
insertpass(self)Insert a text at the cursor.
word_at_cursorpass(self)The word at the cursor.
set_completionspass(self)The words completion offers.
completingpass(self)The completion popup is open.
read_onlypass(self)Make it read-only, or editable.
is_read_onlypass(self)Whether it is read-only.
set_optionspass(self)Line numbers, tab size, whitespace, the current line.
undopass(self)Undo the last change.
redopass(self)Redo the last undone change.
line_rectpass(self)A line's rectangle on the screen.

Interfaces ​

fig_editor_create ​

fig_editor_language ​

fig_editor_set_text ​

fig_editor_string ​

fig_editor_draw ​

fig_editor_mark ​

fig_editor_clear_marks ​

fig_editor_mark_of ​

fig_editor_goto ​

fig_editor_find ​

fig_editor_replace ​

fig_editor_cursor ​

fig_editor_selection ​

fig_editor_select ​

fig_editor_insert ​

fig_editor_completions ​

fig_editor_completing ​

fig_editor_option ​

fig_editor_undo ​

fig_editor_info ​

fig_editor_focus ​

fig_editor_line_rect ​

fig_code_diff ​

fig_code_diff_lines ​

fig_editor_destroy ​

Subroutines ​

language_init ​

Define a language: name (shown nowhere, it tells languages apart), the words it colours, its comments and strings. Keywords and types are each trimmed of trailing blanks; matched whole, by case only if case_sensitive. With key_value, a line [section] takes the types' colour and the words before a line's = the keywords'. Status: FIG_ERR_ARGUMENT for an empty name, a keyword or type with a blank or a separator inside, a preprocessor of more than one character. Any thread (it is data).

Attributes: recursive

fortran
subroutine language_init(self, name, keywords, types, comment, comment_alt, block_comment, preprocessor, single_quotes, double_quotes, numbers, case_sensitive, key_value, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(language_object)inoutLanguage.
namecharacter(len=*)inIts name.
keywordscharacter(len=*)inoptionalKeywords (the keywords' colour).
typescharacter(len=*)inoptionalTypes, attributes (the types' colour).
commentcharacter(len=*)inoptionalStart of a line comment (default none).
comment_altcharacter(len=*)inoptionalAnother start of a line comment.
block_commentcharacter(len=*)inoptionalStart and end of a block comment.
preprocessorcharacter(len=*)inoptionalThe character of a preprocessor line ('#').
single_quoteslogicalinoptional'...' strings (default true).
double_quoteslogicalinoptional"..." strings (default true).
numberslogicalinoptionalNumbers coloured (default true).
case_sensitivelogicalinoptionalBy case (default true).
key_valuelogicalinoptionalkey = value lines (default false).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_init ​

Create the editor (an existing one is destroyed first), empty, highlighting language (default: plain text). It shows line numbers, highlights the current line, matches brackets, and has the fork's find and replace window (ctrl+f; cmd+f on macOS), undo and redo (ctrl+z, ctrl+y), cut, copy and paste with the clipboard. After app%init*. Statuses: FIG_ERR_STATE from a task. The same in every mode.

Attributes: recursive

fortran
subroutine editor_init(self, language, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
languagetype(language_object)inoptionalLanguage (default: plain text).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_destroy ​

Release the editor (safe in any state).

Attributes: recursive

fortran
subroutine editor_destroy(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.

Call graph

editor_set_language ​

Highlight language from now on (the text, its marks and its undo history kept). Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_set_language(self, language, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
languagetype(language_object)inLanguage.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_set_text ​

Replace the text with text (UTF-8, lines ended by LF or CR LF): the marks and the undo history go, the cursor goes to the start. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_set_text(self, text, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
textcharacter(len=*)inText.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_mark ​

Mark line with a message: severity 'error', 'warning' or 'info' tints the line and its number (vermilion, orange, blue) and puts its icon (a crossed circle, a triangle, an "i") beside the number; the message, after its severity's word, is the line's tooltip. A second mark on a line joins the messages and keeps the gravest severity. A mark moves with its line as lines are inserted or deleted above it, and goes with it. Statuses: FIG_ERR_ARGUMENT for another severity or a line outside [1, line_count()]; FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_mark(self, line, severity, message, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
lineinteger(kind=int32)inLine, from 1.
severitycharacter(len=*)in'error', 'warning' or 'info'.
messagecharacter(len=*)inMessage (UTF-8).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_clear_marks ​

Remove every mark. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_clear_marks(self, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_goto ​

Move the cursor to line (and column, default 1), clamped to the text, and scroll it into view at the next draw; with focus, give the editor the keyboard too. Statuses: FIG_ERR_ARGUMENT for a line or column below 1; FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_goto(self, line, column, focus, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
lineinteger(kind=int32)inLine, from 1.
columninteger(kind=int32)inoptionalColumn, from 1 [characters].
focuslogicalinoptionalGive it the keyboard (default false).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_focus ​

Give the editor the keyboard at the next draw (as a click in it does). Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_focus(self, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_cursor ​

The cursor's line and column, from 1 (column in characters); 1, 1 before init and from a task.

Attributes: recursive

fortran
subroutine editor_cursor(self, line, column)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
lineinteger(kind=int32)outLine.
columninteger(kind=int32)outColumn [characters].

Call graph

editor_select ​

Select from (first_line, first_column) to just before (last_line, last_column) (from 1, clamped to the text). Statuses: FIG_ERR_ARGUMENT for a position below 1; FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_select(self, first_line, first_column, last_line, last_column, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
first_lineinteger(kind=int32)inFirst line.
first_columninteger(kind=int32)inFirst column [characters].
last_lineinteger(kind=int32)inLast line.
last_columninteger(kind=int32)inColumn after the last [characters].
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_insert ​

Insert text at the cursor, in place of the selection if any, as one change (one undo); the cursor goes after it. Statuses: FIG_ERR_STATE for a read-only editor, before init and from a task.

Attributes: recursive

fortran
subroutine editor_insert(self, text, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
textcharacter(len=*)inText (UTF-8).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_set_completions ​

The words completion offers (each trimmed of trailing blanks; none: completion off). While the user types a word, a popup under the cursor lists the words that start with it, then those that contain it, in this order and in any case; up and down choose, tab or enter inserts, escape closes it. In a key = value language a word may hold blanks and dashes ('reynolds number'): the term is then the line's text up to the cursor, its indentation kept. Not in comments and strings. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_set_completions(self, words, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
wordscharacter(len=*)inWords.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_read_only ​

Make the editor read-only (on true: the user moves, selects and copies, nothing changes the text but set_text) or editable again. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_read_only(self, on, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
onlogicalinRead-only.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_set_options ​

The editor's options: line_numbers shown (default true), tab_size [characters] in [1, 16] (default 4), whitespace shown as dots and arrows (default false), the current line_highlight (default true). Statuses: FIG_ERR_ARGUMENT for a tab size outside [1, 16]; FIG_ERR_STATE before init and from a task.

Attributes: recursive

fortran
subroutine editor_set_options(self, line_numbers, tab_size, whitespace, line_highlight, stat)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
line_numberslogicalinoptionalLine numbers shown.
tab_sizeinteger(kind=int32)inoptionalTab size [characters].
whitespacelogicalinoptionalBlanks and tabs shown.
line_highlightlogicalinoptionalThe current line highlighted.
statinteger(kind=int32)outoptionalStatus.

Call graph

code_diff ​

Draw the difference of two texts (UTF-8, lines ended by LF or CR LF) as a widget at the cursor, width x height pixels (0: the available region; negative: up to that distance from its edge), read-only, in IBM Plex Mono: one column with each removed line of left (tinted red, marked -) before the added line of right (green, +), or side_by_side. Lines compared whole, by the diff's algorithm (dtl, the shortest edit script). Drawn by id, as a widget: the comparison is made again only when a text or the language changes; a diff not drawn for 600 frames is forgotten. Statuses: FIG_ERR_ARGUMENT for an empty id, FIG_ERR_STATE with no frame open and from a task. The same in every mode.

Attributes: recursive

fortran
subroutine code_diff(id, left, right, side_by_side, language, width, height, stat)

Arguments

NameTypeIntentAttributesDescription
idcharacter(len=*)inWidget id (unique in the window).
leftcharacter(len=*)inThe old text.
rightcharacter(len=*)inThe new text.
side_by_sidelogicalinoptionalTwo columns (default false: one).
languagetype(language_object)inoptionalHighlighting (default plain text).
widthreal(kind=real64)inoptionalWidth [pixels] (default 0: the available width).
heightreal(kind=real64)inoptionalHeight [pixels] (default 0: the available height).
statinteger(kind=int32)outoptionalStatus.

Call graph

code_diff_lines ​

The lines that differ between two texts, as code_diff shows them: added, the lines of right not in left, and removed, the lines of left not in right (from 1, ascending; a changed line is one of each). No frame needed, any mode; a task may call it. Status: always FIG_OK (FIG_ERR_EXCEPTION if the native layer fails).

Attributes: recursive

fortran
subroutine code_diff_lines(left, right, added, removed, stat)

Arguments

NameTypeIntentAttributesDescription
leftcharacter(len=*)inThe old text.
rightcharacter(len=*)inThe new text.
addedinteger(kind=int32)outallocatableLines of right added.
removedinteger(kind=int32)outallocatableLines of left removed.
statinteger(kind=int32)outoptionalStatus.

Call graph

joined ​

words, each trimmed, joined by LF into all; false for an empty word or one with a blank, LF or US inside.

Attributes: pure

fortran
subroutine joined(words, all, ok)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
allcharacter(len=:)outallocatableJoined.
oklogicaloutAll valid.

Call graph

split_lines ​

text's LF-separated parts, blank-padded to the longest.

Attributes: pure

fortran
subroutine split_lines(text, lines)

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)inText.
linescharacter(len=:)outallocatableParts.

Call graph

Functions ​

language_name ​

The language's name ('' for plain text).

Attributes: pure

Returns: character(len=:)

fortran
function language_name(self) result(name)

Arguments

NameTypeIntentAttributesDescription
selfclass(language_object)inLanguage.

code_language ​

A shipped language by name, in any case: 'fortran' (free form, any case, ! comments, both quotes, kinds and exponents in numbers, # preprocessor lines), 'input' (key = value files: [section] lines, keys, ! and # comments, the words true, false, yes, no, on, off), 'text' or '' (plain), and the fork's own: 'angelscript', 'c', 'c++', 'c#', 'glsl', 'hlsl', 'json', 'julia', 'lua', 'markdown', 'python', 'sql', 'wgsl'. Status: FIG_ERR_ARGUMENT for another name (plain text returned). Any thread.

Attributes: recursive

Returns: type(language_object)

fortran
function code_language(name, stat) result(lang)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inLanguage name.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_is_initialized ​

Whether the editor exists.

Attributes: pure

Returns: logical

fortran
function editor_is_initialized(self) result(yes)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.

editor_text ​

The text, its lines joined by LF (no LF after the last). '' before init and from a task.

Attributes: recursive

Returns: character(len=:)

fortran
function editor_text(self) result(t)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.

Call graph

editor_line_count ​

The number of lines (1 for an empty text; 0 before init and from a task).

Attributes: recursive

Returns: integer(kind=int32)

fortran
function editor_line_count(self) result(n)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.

Call graph

editor_draw ​

Draw the editor as a widget at the cursor, inside a window, width x height pixels (0: the available region; negative: up to that distance from its edge), in IBM Plex Mono at the current font size with the fallback font's symbols (they keep their own width: they may overlap the next character), and the style's colours. True on the frame the user changed the text (typing, a paste, undo, a completion: not set_text, insert or replace). The mouse and the keyboard as in a code editor (a click places the cursor, a drag selects, ctrl+click adds a cursor); the wheel scrolls. Statuses: FIG_ERR_ARGUMENT for an empty id; FIG_ERR_STATE before init, with no frame open, from a task. The same in every mode.

Attributes: recursive

Returns: logical

fortran
function editor_draw(self, id, width, height, stat) result(changed)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
idcharacter(len=*)inWidget id (unique in the window).
widthreal(kind=real64)inoptionalWidth [pixels] (default 0: the available width).
heightreal(kind=real64)inoptionalHeight [pixels] (default 0: the available height).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_mark_of ​

The severity of the mark on line ('error', 'warning', 'info'; '' for none, a line out of range, before init and from a task), and its message as its tooltip shows it (each message after its severity's word, LF between two).

Attributes: recursive

Returns: character(len=:)

fortran
function editor_mark_of(self, line, message) result(severity)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
lineinteger(kind=int32)inLine, from 1.
messagecharacter(len=:)outallocatable, optionalIts message.

Call graph

editor_find ​

Select the next occurrence of text after the cursor, from the start again past the end, and scroll it into view at the next draw. True when found (the selection is then text). Statuses: FIG_ERR_ARGUMENT for an empty text; FIG_ERR_STATE before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_find(self, text, case_sensitive, whole_word, stat) result(found)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
textcharacter(len=*)inText to find.
case_sensitivelogicalinoptionalBy case (default true).
whole_wordlogicalinoptionalWhole words only (default false).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_replace ​

Replace every occurrence of text by by, as one change (one undo), and return how many were replaced. Statuses: FIG_ERR_ARGUMENT for an empty text; FIG_ERR_STATE for a read-only editor, before init and from a task.

Attributes: recursive

Returns: integer(kind=int32)

fortran
function editor_replace(self, text, by, case_sensitive, whole_word, stat) result(count)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
textcharacter(len=*)inText to replace.
bycharacter(len=*)inIts replacement.
case_sensitivelogicalinoptionalBy case (default true).
whole_wordlogicalinoptionalWhole words only (default false).
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_selection ​

The selection: true when some text is selected, from (first_line, first_column) to just before (last_line, last_column), from 1, columns in characters, and its text; false otherwise (the four positions are then the cursor's). False before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_selection(self, first_line, first_column, last_line, last_column, text) result(has)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
first_lineinteger(kind=int32)outFirst line.
first_columninteger(kind=int32)outFirst column [characters].
last_lineinteger(kind=int32)outLast line.
last_columninteger(kind=int32)outColumn after the last [characters].
textcharacter(len=:)outallocatable, optionalThe selected text.

Call graph

editor_word_at_cursor ​

The word (letters, digits, _) the cursor is in or just after; '' when none, before init and from a task.

Attributes: recursive

Returns: character(len=:)

fortran
function editor_word_at_cursor(self) result(word)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.

Call graph

editor_completing ​

True while the completion popup is open (from the frame after the typing that opened it), with the words it offers in its order (blank-padded to the longest). False before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_completing(self, words) result(open)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
wordscharacter(len=:)outallocatable, optionalWords offered.

Call graph

editor_is_read_only ​

Whether the editor is read-only (false before init and from a task).

Attributes: recursive

Returns: logical

fortran
function editor_is_read_only(self) result(on)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.

Call graph

editor_undo ​

Undo the last change (as ctrl+z): true if there was one. Nothing in a read-only editor. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_undo(self, stat) result(done)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_redo ​

Redo the last undone change (as ctrl+y): true if there was one. Statuses: FIG_ERR_STATE before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_redo(self, stat) result(done)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inoutEditor.
statinteger(kind=int32)outoptionalStatus.

Call graph

editor_line_rect ​

The rectangle [pixels] of line's text area on the last draw, from the left of the text to the right of the editor (for a popup beside a line, or a test): true when the line was in view. False before the first draw, before init and from a task.

Attributes: recursive

Returns: logical

fortran
function editor_line_rect(self, line, x0, y0, x1, y1) result(visible)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
lineinteger(kind=int32)inLine, from 1.
x0real(kind=real64)outLeft [pixels].
y0real(kind=real64)outTop [pixels].
x1real(kind=real64)outRight [pixels].
y1real(kind=real64)outBottom [pixels].

Call graph

alive ​

True when the editor exists and the caller is on the main thread; else the refusal (FIG_ERR_STATE), silent for a query (quiet: its default value is the answer).

Attributes: recursive

Returns: logical

fortran
function alive(self, name, stat, quiet) result(ok)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
namecharacter(len=*)inThe method.
statinteger(kind=int32)outoptionalStatus.
quietlogicalinoptionalA query: no failure before init.

Call graph

editor_string ​

One of the editor's texts (fig_editor_string): '' before init and from a task.

Attributes: recursive

Returns: character(len=:)

fortran
function editor_string(self, what) result(t)

Arguments

NameTypeIntentAttributesDescription
selfclass(code_editor_object)inEditor.
whatinteger(kind=c_int)in0 text, 1 word, 2 selection, 3 offered.

Call graph

pack_language ​

The language's definition for the native layer (fields separated by US; '' for plain text).

Attributes: pure

Returns: character(len=:)

fortran
function pack_language(lang) result(packed)

Arguments

NameTypeIntentAttributesDescription
langtype(language_object)inLanguage.

Call graph

lower ​

s in lower case (ASCII letters).

Attributes: pure

Returns: character(len=len)

fortran
function lower(s) result(l)

Arguments

NameTypeIntentAttributesDescription
scharacter(len=*)inString.

Call graph

fortran_keywords ​

Fortran 2023's statements, constructs and operators (the keywords' colour).

Attributes: pure

Returns: character(len=16)

fortran
function fortran_keywords() result(k)

Call graph

fortran_types ​

Fortran's intrinsic types and attributes (the types' colour).

Attributes: pure

Returns: character(len=16)

fortran
function fortran_types() result(t)

Call graph

Released under the MIT licence.