summaryrefslogtreecommitdiff
path: root/fluid/documentation/src/code.dox
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-11-01 17:22:31 +0100
committerMatthias Melcher <github@matthiasm.com>2023-11-01 17:22:40 +0100
commitaaaf0a0537e03cec7a47330550a31bb4e96dacde (patch)
tree820ea79b85ed1e3b9fdcfe9ef0b2fc16a15c5cc6 /fluid/documentation/src/code.dox
parent5f836377a0f4e5c7b90b06ba4b4fefc3ccf04a39 (diff)
FLUID: Adds options to draw ghosted outlines.
Diffstat (limited to 'fluid/documentation/src/code.dox')
-rw-r--r--fluid/documentation/src/code.dox40
1 files changed, 24 insertions, 16 deletions
diff --git a/fluid/documentation/src/code.dox b/fluid/documentation/src/code.dox
index cff61ea97..65f31a96c 100644
--- a/fluid/documentation/src/code.dox
+++ b/fluid/documentation/src/code.dox
@@ -4,8 +4,7 @@
\page codeNodes Code Nodes
-Overview of code nodes.
-
+\tableofcontents
\section function Functions and Methods
@@ -15,12 +14,14 @@ Fluid can generate C functions, C++ functions, and methods in classes.
Functions can contain widgets to build windows and dialogs. *Code* nodes can
be used to add more source code to a function.
-### Parents ###
+## Parents ##
+
To generate a function, the function node must be created at the top level or
inside a declaration block. If added inside a class node, this node generates
a method inside that class.
-### Children ###
+## Children ##
+
Function nodes can contain code nodes and widget trees. The topmost node of a
widget tree must be a window.
If the function node has no children, only a forward declaration will be
@@ -39,8 +40,8 @@ If the *Name* field is left empty, Fluid will generate a typical 'main()' functi
```
// .cxx
int main(int argc, char **argv) {
- /* code generated by children */
- w->show(argc, argv); /* <-- code generated if function has a child widget */
+ // code generated by children
+ w->show(argc, argv); // <-- code generated if function has a child widget
Fl::run();
}
```
@@ -59,7 +60,7 @@ overrides the default type.
```
// .cxx
void make_window() {
- /* code generated by children */
+ // code generated by children
}
```
@@ -75,9 +76,8 @@ Fl_Window* make_window();
// .cxx
Fl_Window* make_window() {
Fl_Window* w;
- /* code generated by children:
- * w = new Fl_Window(...)
- */
+ // code generated by children:
+ // w = new Fl_Window(...)
return w;
}
```
@@ -136,7 +136,7 @@ public:
// .cxx
Fl_Double_Window* UserInterface::make_window() {
Fl_Double_Window* w;
- /* code generated by children */
+ // code generated by children
return w;
}
```
@@ -155,13 +155,13 @@ is no text after the keyword.
Users can define a comment text in the *comment* field. The first line of the
comment will be shown in the widget browser. The comment text will be generated
-in the source file ahead of thefunction.
+in the source file before the function.
```
// .cxx
-/*
- My multilen comment
- will be here
- */
+ //
+ // My multilen comment will be here... .
+ // Fluid may actually use C style comment markers.
+ //
Fl_Window* make_window() {
```
@@ -179,6 +179,14 @@ creates an inlined function in the header file.
...write me.
+ ### Parents ###
+
+ ...write me.
+
+ ### Children ###
+
+ ...write me.
+
\section codeblock Code Block
\section declaration Declaration