FLUID: File Format Fault Fixes.
This commit is contained in:
parent
f8ebde4da4
commit
92a1cacd62
@ -50,7 +50,7 @@ File Structure
|
||||
--------------
|
||||
|
||||
.fl files start with a 'Header', followed by a list of 'Options', followed
|
||||
by a hierarchy of 'Type' entires, the 'Tree'. All elements besides the Header
|
||||
by a hierarchy of 'Type' entries, the 'Tree'. All elements besides the Header
|
||||
are composed of 'Words', 'Strings', and 'Groups'.
|
||||
|
||||
|
||||
@ -64,8 +64,8 @@ Simple Words that are composed of 'a'-'z', 'A'-'Z', '0'-'9', and '_' only are
|
||||
written verbatim, followed by a space or newline.
|
||||
|
||||
All other character sequences are bracketed between between ‘{‘ and ‘}’ without
|
||||
padding spaces. For example, "" is written as ‘{}’, and ".hello" is written as
|
||||
`{.hello}`.
|
||||
padding spaces. For example, an empty word with no characters is written
|
||||
as '{}', and ".hello" is written as '{.hello}'.
|
||||
|
||||
The special characters ‘\’ and ‘#’ are escaped by prepending the ‘\’ character,
|
||||
so "#define" is written as '{\#define}`.
|
||||
@ -73,14 +73,15 @@ so "#define" is written as '{\#define}`.
|
||||
The characters ‘{‘ and ‘}’ are also escaped with a '\' unless every opening
|
||||
‘{‘ in the Word is matched with a closing ‘}’.
|
||||
|
||||
Note: line endings are copied verbatim and become significant within a Word.
|
||||
Note: line endings and the following indents are copied verbatim and become
|
||||
significant within a Word.
|
||||
|
||||
|
||||
Strings
|
||||
-------
|
||||
|
||||
Strings are generated with 'printf' statements in the hope that the
|
||||
generated text can be read back as one Word, followed by a corresponding
|
||||
generated text can be read back as one Word, set against a corresponding
|
||||
'scanf' to retrieve the original values.
|
||||
|
||||
Note: As there are no defined start and end markers to a String, a reader must
|
||||
@ -126,8 +127,8 @@ Note: the version number corresponds not so much to the version of FLUID, but
|
||||
|
||||
Note: if the version number is above the internal version number, FLUID will
|
||||
report an error and continue reading, hoping for the best.
|
||||
There are no other uses inside the FLUID reader except for fltk2 features
|
||||
which is beyond the scope of this document.
|
||||
There are no other uses inside the FLUID reader except for features for
|
||||
the discontinued fltk2 which is beyond the scope of this document.
|
||||
|
||||
Note: fdesign files (.fd) start with the text "Magic:". FLUID can read these
|
||||
files, but Forms/XForms files are beyond the scope of this document.
|
||||
@ -173,7 +174,13 @@ an Option is missing, a default value is assumed.
|
||||
"code_name" <word> : can be the full filename, or just the
|
||||
extension e.g. “.cxx”
|
||||
|
||||
"snap" <word> : ignored
|
||||
"snap" <word> : starting in V1.4 since May 2023, the 'snap' keyword can be
|
||||
used to store one layout suite with three presets. 'snap' if followed by
|
||||
a '{', then a 'name' word followed by the name of the suite, and three
|
||||
'preset' words, each followed by a '{', a version number, and 24
|
||||
integers (V1), followed by a '}'. 'snap' is claosed with a trailin '}'.
|
||||
As with other attributes, the content of 'snap' appears like a single
|
||||
word to unsuspecting readers.
|
||||
|
||||
"gridx" <word> : ignored
|
||||
|
||||
@ -199,7 +206,7 @@ Tree
|
||||
If a keyword is read that is not in the Option list, we start reading Types.
|
||||
Types represent all possible entries in the hierarchy including C functions,
|
||||
class definitions, and of course all Widgets. A Type is any of the supported
|
||||
Widgets classes, or one of the following:
|
||||
Widgets classes, or one of the following (case sensitive):
|
||||
|
||||
Function, code, codeblock, decl, data, declblock, comment, class, widget_class
|
||||
|
||||
@ -219,7 +226,7 @@ another opening ‘{‘, followed by a list of Types, followed by a closing ‘}
|
||||
|
||||
The file ends when there are no more Types.
|
||||
|
||||
Note: the "class" Type has an additional Word following immediately after
|
||||
Note: the "class" Type may have an additional Word following immediately after
|
||||
the keyword. It contains the prefix for the class. A class definition may
|
||||
be written as:
|
||||
|
||||
@ -227,7 +234,10 @@ Note: the "class" Type has an additional Word following immediately after
|
||||
|
||||
or without a prefix as
|
||||
|
||||
class {} MyOtherClass { ...properties... } { ...children... }
|
||||
class MyOtherClass { ...properties... } { ...children... }
|
||||
|
||||
According to the source code, we know if the word after class is a prefix
|
||||
if the next word is not a lone '{'. We apologize for the inconvenience.
|
||||
|
||||
|
||||
Types
|
||||
|
||||
Loading…
Reference in New Issue
Block a user