mirror of
https://github.com/fltk/fltk.git
synced 2026-03-23 07:24:03 +08:00
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.
72 lines
2.7 KiB
Plaintext
72 lines
2.7 KiB
Plaintext
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)
|