summaryrefslogtreecommitdiff
path: root/screenshots/README.txt
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2026-01-04 19:16:53 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2026-01-04 19:16:53 +0100
commit68d2c48514fcb1161da3bf9db0d385faf650b2a1 (patch)
tree7d2cf7156ebe7350495a30c9e621fb6bb9680367 /screenshots/README.txt
parent46e681561241d0a123dfc08c234745c40c4a262a (diff)
Add an option and the first program to create screenshots
This is the first step in creating additional programs for saving screenshots for documentation purposes. These screenshots must be saved in the documentation/images directory and checked into the Git repository. These programs allow developers to create new screenshots or change existing ones. More screenshots may be created by programs in the /test/ folder. To-do: add more *new* screenshot programs, and if useful, move some existing programs from the `/test/` folder to `/screenshots/`, such as `test/resize-example*.cxx` and maybe more.
Diffstat (limited to 'screenshots/README.txt')
-rw-r--r--screenshots/README.txt71
1 files changed, 71 insertions, 0 deletions
diff --git a/screenshots/README.txt b/screenshots/README.txt
new file mode 100644
index 000000000..8229261d8
--- /dev/null
+++ b/screenshots/README.txt
@@ -0,0 +1,71 @@
+Screenshot Programs for FLTK Documentation
+
+Contents
+
+ All programs in this subdirectory of the FLTK source tree are intended to
+ be used for screenshot generation for the documentation.
+
+ Each program should open one window (maybe more in the future) that can be
+ used as an image for our documentation. Here should be programs developed
+ only for the documentation that are not included in the /test/ or /examples/
+ folders.
+
+Rationale
+
+ Creating screenshots "manually" and storing only the results as (PNG)
+ images should be avoided. There *should* be a source file for each image
+ in the `documentation/images` directory. Many of the existing images can
+ be reproduced by programs in the /test/ folder, but some images used for
+ illustration can currently not be reproduced easily by developers if
+ necessary or wanted.
+
+ These programs are NOT intended to be used automatically by documentation
+ generation. All screenshots generated by these programs shall be checked
+ in (committed) to the FLTK repository for consistency.
+
+Development Status
+
+ Source files for screenshots are collected here. As of today (Jan. 2026)
+ Screenshots must be taken manually but this shall be simplified later.
+
+ This folder is in an early development phase. For now the most important
+ point is to collect the code to prepare for future changes.
+
+Future Development
+
+ The intention is to use a commandline to automate screenshot generation or
+ to output one or more specific screenshot images per program automatically,
+ similar to the code screenshot generation and Fluid's documentation.
+ Details are yet to be defined.
+
+Build System
+
+ The programs in this directory are not built by default in the standard
+ FLTK build.
+
+CMake Option FLTK_BUILD_SCREENSHOTS
+
+ CMake option FLTK_BUILD_SCREENSHOTS (Default: 'OFF') can be set to 'ON'
+ to build all screenshot programs.
+
+ Developers are advised to set FLTK_BUILD_SCREENSHOTS=ON to build the
+ screenshot programs to verify that they compile and work.
+
+Adding New Screenshot Programs
+
+ To add a new program, add the source code here, and add it to the list
+ of programs in CMakeLists.txt. All programs should be built with similar
+ options (using fltk::fltk and fltk::images).
+ Some programs may also use fltk::gl for OpenGL screenshots.
+
+ Note: CMake and some of its supported "generators" (like Ninja) need
+ unique "target" names throughout the entire build system. To avoid
+ conflicts all programs in this folder will be built using a target
+ name with the prefix 'scr_' in folder `bin/screenshots/`.
+ The program is not affected by this prefix.
+
+ Example:
+
+ source file name: unicode.cxx
+ CMake target name: scr_unicode
+ Executable: bin/screenshots/unicode (.exe, .app)