As a follow-up to the discussion I used the posted screenshot demo
(thanks to Greg), redesigned it using Fl_Grid, and added it as a
new test program, including Makefiles and CMakeLists.txt.
New file: test/line_style_docs.cxx to create screenshot. Note that the
old test/line_style.cxx is not obsolete, it can be used to test the
line styles interactively.
Docs have been updated in both chapter "Drawing Things" and the
function description.
Also added the new demo to test/demo.menu under "Images for Manual...".
Flushing the Cairo context is necessary on Windows to make Cairo
drawings appear on the device (screen). This new method makes it easy
for user code to do this correctly after using Cairo drawings.
- add Fl::cairo_flush(cairo_t *)
- document Fl::cairo_flush(cairo_t *)
- reformat Cairo doxygen docs and code (partially)
- use the new method in Fl_Cairo_Window
- use the new method in test/cairo_test.cxx
- other minor (text) changes in test/cairo_test.cxx
- add test/cairo_test to the demo menu (test/demo.menu)
- Add internal fl_contrast_cielab() as the new default.
- Keep old function as internal fl_contrast_legacy().
- Add fl_contrast_mode() to switch between fl_contrast() functions.
- Add fl_contrast_level() to fine tune fl_contrast() per mode.
- Add option to register and use a custom contrast function.
- Add test/contrast.cxx test program.
- Move all fl_contrast() related code to a new file src/fl_contrast.cxx.
- Add fl_lightness() convenience function for perceived lightness.
- Add fl_luminance() convenience function for physical luminance.
Adding only 2 of 3 new examples is intentional (9 per menu level).
Figure numbers have been removed in all the HTML docs recently for
better maintainability.
Test programs that open files don't use platform specific code.
They don't open files from macOS bundles.
Support files must either be in the current working directory or
given on the command line.
On macOS this requires a full path when using bundles.
This is an attempt to unify the code for all build systems (CMake,
autotools with make), platforms (operating systems) and toolchains
(make + gcc/clang, Visual Studio IDE, Xcode ...) to avoid duplicate
code and clarify the differences for future devs and to simplify
maintenance.
The goal is to minimize the platform specific code.
Much of the new code are comments to describe the different situations.
The main program does now all the "hard work" to construct the paths
necessary to access the other applications and data files.
Use macOS specific code to determine the application path (app_path)
in main() instead of function dobut(), when test apps are activated.
Remove obsolete comments and dead code.
Tested on Windows and Linux with both autotools/configure/make
and CMake with make (Linux + MinGW), Visual Studio.
MacOS uses bundles instead of executables. CMake creates those bundles in various locations, depending on the generator used (Xcode or Makefiles). I tried to fix all instances where demo apps did not find the resources they needed. This probably must be done for Linux and MSWindows as well.
This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This test program may not be in the optimal position in the menu,
but w/o restructuring more of the menu this was the best position
I could find. Maybe we can restructure the menu in the future.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10433 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
existing fltk file chooser test.
Also, I've taken the liberty of making the native file chooser load the system icons by default
(Greg had them not loaded by default, but I think it looks better with them...) and I have
adjusted the Makefile accordingly to make the linked libraries match.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7000 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Add missing Id keywords to input_choice.
Add sudoku to demo program.
Add on-line help to sudoku game, and put all of the cells in the main
window so that the keyboard navigation is sane.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Add threading demo from 2.0, with minor improvements to make the
prime number generation faster/more realistic.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
the window list. This window is used as the "parent" of any modal
windows you create so it is a good idea to be able to change it.
Normally it is whatever window got the last event.
Fixed Fl_Menu::global handler to use first_window so if a modal window
pops up in response it is parented to the window containing the
menubar rather than the current top window. This was an annoying bug!
Copied fl_line_style() and the line_style demo over from fltk 2.0
because I am tired of mailing this code to people. Better to advertise this
as "added fl_line_style() function to set line thickness, dash patterns,
and end caps".
Fixed the documentation for these changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
- Added #defines for Visual C++ to speed up compiles.
- Added FLTK.DLL project to visualc directory.
- Added editor project to visualc directory.
- Added icon() method to Fl_Window class.
- Implemented xclass() method for WIN32.
- Fixed extern declaration of fl_send_extra_move in Fl_Menu_Window.cxx.
- scandir_win32.c needed to include <stdlib.h>.
- Added fix from Bill for fl_width() bug.
- Updated fix for Fl_Input to default to FL_DOWN_BOX.
- Added visible() check for children of Fl_Pack.
- Added WinMain() function to library.
- Now show console window in debug mode.
- Fixed demo.menu and demo.cxx to work under WIN32.
git-svn-id: file:///fltk/svn/fltk/trunk@180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121