diff --git a/ChangeLog b/ChangeLog index c46c02c6..1e87e489 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2020-02-04 Markus Gans + * Add screenshorts to the first steps document + 2020-02-02 Markus Gans * The methods clear() and remove() were added to FListView * Add some const type qualifiers diff --git a/doc/first-steps.md b/doc/first-steps.md index b900b3e5..a654f770 100644 --- a/doc/first-steps.md +++ b/doc/first-steps.md @@ -50,6 +50,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ dialog.cpp +
Figure 1. A blank dialog
+
+
+ *(Note: You can close the dialog with the mouse, Shift+F10 or Ctrl+^)* @@ -191,6 +197,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ memory.cpp +
Figure 2. FObject manages its child objects
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* @@ -319,6 +331,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ timer.cpp +
Figure 3. FObject::onTimer event handler
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* @@ -477,6 +495,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ callback-function.cpp +
Figure 4. Button with a callback function
+
+
+ *(Note: You can close the dialog with the mouse, Shift+F10 or Ctrl+^)* @@ -535,6 +559,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ callback-lambda.cpp +
Figure 5. Button with lambda expression callback.
+
+
+ *(Note: You can close the dialog with the mouse, Shift+F10 or Ctrl+^)* @@ -587,6 +617,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ callback-method.cpp +
Figure 6. Button with a callback method
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* @@ -619,7 +655,7 @@ class dialogWidget : public FDialog { setGeometry (FPoint(25, 5), FSize(22, 7)); setText ("Emit signal"); - FSize size(5, 1); + const FSize size(5, 1); label.setGeometry (FPoint(8, 1), size); label.setAlignment (fc::alignRight); label.setForegroundColor (fc::Black); @@ -725,6 +761,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ emit-signal.cpp +
Figure 7. Callbacks with custom signals
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* @@ -762,7 +804,7 @@ If you want to ignore padding spaces, you must force this with the
widget-coordinates -
Figure 1. Widget coordinates
+
Figure 8. Widget coordinates


@@ -812,7 +854,7 @@ methods.
widget-lengths -
Figure 2. Width and height of a widget
+
Figure 9. Width and height of a widget


@@ -865,7 +907,7 @@ absolute geometry values as a `FRect` object, you can call the method
widget-geometry -
Figure 3. Geometry of widgets
+
Figure 10. Geometry of widgets


@@ -946,11 +988,11 @@ class dialogWidget : public FDialog void adjustWidgets() { - auto bx = int(getWidth() - button.getWidth() - 3); - auto by = int(getHeight() - 4); + const auto bx = int(getWidth() - button.getWidth() - 3); + const auto by = int(getHeight() - 4); button.setPos (FPoint(bx, by), false); input.setWidth (getWidth() - 4); - auto ly = int(getHeight() / 2) - 1; + const auto ly = int(getHeight() / 2) - 1; input.setY (ly, false); } @@ -996,6 +1038,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ size-adjustment.cpp +
Figure 11. Dynamic layout
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* @@ -1118,6 +1166,12 @@ int main (int argc, char* argv[]) return app.exec(); } ``` +
+ scrollview.cpp +
Figure 12. Dialog with a scrolling viewport
+
+
+ *(Note: You can close the window with the mouse, Shift+F10 or Ctrl+^)* diff --git a/doc/first-steps_callback-function.cpp.png b/doc/first-steps_callback-function.cpp.png new file mode 100644 index 00000000..67c6f312 Binary files /dev/null and b/doc/first-steps_callback-function.cpp.png differ diff --git a/doc/first-steps_callback-lambda.cpp.png b/doc/first-steps_callback-lambda.cpp.png new file mode 100644 index 00000000..9d95169a Binary files /dev/null and b/doc/first-steps_callback-lambda.cpp.png differ diff --git a/doc/first-steps_callback-method.cpp.png b/doc/first-steps_callback-method.cpp.png new file mode 100644 index 00000000..47669cef Binary files /dev/null and b/doc/first-steps_callback-method.cpp.png differ diff --git a/doc/first-steps_dialog.cpp.png b/doc/first-steps_dialog.cpp.png new file mode 100644 index 00000000..c9b0af93 Binary files /dev/null and b/doc/first-steps_dialog.cpp.png differ diff --git a/doc/first-steps_emit-signal.cpp.png b/doc/first-steps_emit-signal.cpp.png new file mode 100644 index 00000000..3bd6a152 Binary files /dev/null and b/doc/first-steps_emit-signal.cpp.png differ diff --git a/doc/first-steps_memory.cpp.png b/doc/first-steps_memory.cpp.png new file mode 100644 index 00000000..33a1b494 Binary files /dev/null and b/doc/first-steps_memory.cpp.png differ diff --git a/doc/first-steps_scrollview.cpp.png b/doc/first-steps_scrollview.cpp.png new file mode 100644 index 00000000..e7ec1583 Binary files /dev/null and b/doc/first-steps_scrollview.cpp.png differ diff --git a/doc/first-steps_size-adjustment.cpp.png b/doc/first-steps_size-adjustment.cpp.png new file mode 100644 index 00000000..a3dfead2 Binary files /dev/null and b/doc/first-steps_size-adjustment.cpp.png differ diff --git a/doc/first-steps_timer.cpp.png b/doc/first-steps_timer.cpp.png new file mode 100644 index 00000000..4ae8a3f4 Binary files /dev/null and b/doc/first-steps_timer.cpp.png differ