Commit Graph

9463 Commits

Author SHA1 Message Date
Albrecht Schlosser 04ccc8cc46 Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule"
https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-23 18:12:47 +01:00
Greg Ercolano b275ff0715 Fix for fltk when make install used 2022-01-23 03:10:13 -08:00
Albrecht Schlosser c0f5080cb0 Fix compiler warnings [-Wunused-variable]
... and missing return value [-Wreturn-type]
2022-01-21 13:38:26 +01:00
Matthias Melcher 09eff7243a
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences

Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.

* ERROR is a macro on Windows, don't use it

* Added Fl_Preferences::dirty().

User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.

* Fl_Preferences::get binary data returns # of bytes read.

* Verified group deletion code

* Fl_Preferences ignores locale.

This will make .prefs files interchangeable
between different computers.

* Updating the Preferences Mode to ignore locale.

* Fixes in docs.
2022-01-19 16:08:29 +01:00
ManoloFLTK 793f4b90fa Remove potential compiler error with -Wc++11-narrowing 2022-01-19 12:03:45 +01:00
ManoloFLTK 86a9aa6099 Comment out deprecated Doxygen tag COLS_IN_ALPHA_INDEX. 2022-01-17 15:24:07 +01:00
Albrecht Schlosser cd611e3957 Remove unnecessary CMake test statement (#358)
Sorry for the noise, this statement was included in my proposed patch.
2022-01-17 15:17:17 +01:00
Greg Ercolano 196430b016 Issue #358 cont'd: Fl_Cairo_Window coord system docs
Elaborated on Fl_Cairo_Window's use of FLTK style coordinates,
    and how this differs from cairo's default native normalized
    coordinate system, and shows how to switch from one to the other.

    Also, small comment fix to the cairo example regarding the "X" color.
2022-01-16 16:59:49 -08:00
Greg Ercolano 313212b497 Adding Albrecht's CMakeLists.txt patch
Albrecht submitted this in issue 358.
    Tested the variations:

    	cmake ..		                               -- examples and cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on                        -- examples on, cairo off
	cmake -D FLTK_BUILD_EXAMPLES=on -D OPTION_CAIRO=on ..  -- examples on, cairo on

    When examples are 'on', they build into the bin/examples directory.
2022-01-16 15:42:23 -08:00
Greg Ercolano 6546814a23 For issue #358 - adds examples/cairo-draw-x.cxx
Since this is the first cairo example in the examples directory,
    it necessarily involved changes to the Makefile and to fltk-config
    to properly handle the absence/existance of the cairo libs.

    TBD: Add docs to the cario widget describing coordinate system
    and how it differs from the default cairo normalized coordinate system.
2022-01-16 15:22:16 -08:00
Albrecht Schlosser 4041608e94 Update fluid files and generated files
fluid/widget_panel.cxx: apply previous fluid fix
2022-01-16 19:47:16 +01:00
Albrecht Schlosser 788ca208f7 Rename FL/Fl_String_class.H to FL/Fl_String.H
This is part 2 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
Albrecht Schlosser 92e9181a0a Rename FL/fl_string.h to FL/fl_string_functions.h
This is part 1 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
ManoloFLTK 8213ba94aa Improve Fl_GTK_Native_File_Chooser_Driver in relation to FLTK windows.
Implement a new way to make the GTK file-chooser window modal-like
by preventing any event processing by other FLTK windows.
The new way is also no longer X11-specific.
2022-01-16 18:49:41 +01:00
ManoloFLTK 0f335ab440 Improve kdialog-based native file chooser.
Processing of all FLTK events as well as window resizing while the file chooser runs is suspended,
Normal event processing and resizing is restored when chooser closes.
2022-01-16 12:33:26 +01:00
ManoloFLTK ebd0c81f7e Move make_transient() to Fl_Posix_System_Driver from Fl_Screen_Driver 2022-01-14 19:25:17 +01:00
Albrecht Schlosser ab58971bcf Improve focus box drawing and documentation
Add new method
  Fl_Widget::draw_focus(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color bg)

  ... with background color for correct contrast testing (in Fl_Tabs)

Draw the focus box of the "tabs" of Fl_Tabs widgets with the correct
  boxtype and background color.

Make 'unsigned int visible_focus()' const so it can be used in 'const'
  methods.

Do not draw the focus box if the per-widget focus box option is off.
2022-01-14 17:17:09 +01:00
Greg Ercolano c45bf57c8f Fixes #369 2022-01-13 18:06:40 -08:00
Greg Ercolano 9c55ad4273 Fixes #362 2022-01-13 15:26:27 -08:00
Greg Ercolano 47cd9a11a0 Fixes issue #361. 2022-01-13 07:28:00 -08:00
Albrecht Schlosser 879da686b6 Fix typo in Fl_Menu_Item docs 2022-01-13 14:20:55 +01:00
Matthias Melcher 42f4ebab2f Renewing old code, as suggested by Albrecht. 2022-01-12 11:38:14 +01:00
Matthias Melcher b2498781de Reintroducing delet o; 2022-01-11 23:01:48 +01:00
Matthias Melcher 59384b359c Fluid: Window was not updated when widget was deleted.
For parents with a box type based on FRAME.
2022-01-11 21:42:03 +01:00
Matthias Melcher d699b617ac Avoiding CodeQL warning.
Changed a statement emitted by Fluid to avoid 'unused'
warnings: if(w){} into (void)w; to avoid triggering 'Bad
error checking' warnings.
2022-01-11 11:56:54 +01:00
Matthias Melcher 42a93eb8de avoid early include of Fl.H option 2022-01-08 22:12:41 +01:00
ManoloFLTK 9a2b3ef798 Input Method support: have the auxiliary window follow when the focus window is moved. 2022-01-08 17:08:39 +01:00
Albrecht Schlosser b12ed61548 Remove obsolete (dead) code from Fl_Group.cxx
This code had been inactive at least since Mar 29, 2018.
2022-01-08 16:23:01 +01:00
Matthias Melcher bcb78859bc Fixed a crash bug in Fluid where partial menus were deleted.
Reading an .fl file rebuilds a menu item arrays with every item read.
If a menu is only partially read, the end marker (label==NULL) is
not set, so that deleting the menu will run beyond the missing marker.
This bug was exposed by adding images to menu items, which
requires additional deletes.
2022-01-07 18:04:31 +01:00
ManoloFLTK 5bab46940c Re-organize cross-platform support for text input methods.
FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms
(X11, Windows, macOS). This support has an interface with FLTK that is
common for X11 and Windows, via (undocumented) functions fl_set_spot(),
fl_set_status() and fl_reset_spot().
In contrast, and because it's been developed independently, the
interface between the macOS TIM and FLTK 1.3 is completely different :
static functions FL::insertion_point_location() and Fl::reset_marked_text().

The present change implements a single TIM/FLTK interface
used by all platforms based on functions fl_set_spot() and
fl_reset_spot().

The previous macOS-specific functions FL::insertion_point_location() and
Fl::reset_marked_text() are maintained only for compatibility with 1.3
and deprecated.
2022-01-07 16:34:54 +01:00
ManoloFLTK 27c175dad8 Add virtual void Fl_Graphics_Driver::set_status() and implement for X11 platform. 2022-01-07 07:50:36 +01:00
Albrecht Schlosser 9d474dfcdf Fix whitespace and Makefile dependencies
No code changes
2022-01-05 22:00:54 +01:00
ManoloFLTK fc1efc7957 Create FL/x11.H holding declarations specific to X11 platform. 2022-01-05 07:46:57 +01:00
ManoloFLTK 3f2166ea91 Introduction of FL/fl_config.h - continued 2022-01-04 18:36:56 +01:00
ManoloFLTK e80a2734e8 Fix build error with CMake when libjpeg???-dev package is absent from the system (Linux).
The error was visible under Linux if OPTION_USE_SYSTEM_LIBJPEG and OPTION_BUILD_SHARED_LIBS are  on.
2022-01-04 16:20:49 +01:00
ManoloFLTK 9164e3c489 Text input method for X11: fix for case when text widget is inside subwindow. 2022-01-02 17:44:55 +01:00
Michael R Sweet ea34edc1ea
Tweak blocks game to use higher update rates and slightly larger window. 2022-01-01 10:01:23 -05:00
Matthias Melcher 14ae784f7f Installing Fluid correctly on macOS 2022-01-01 13:58:44 +01:00
ManoloFLTK eeb3e92eb2 Fix fullscreen window level corner cases on macOS - cont'd
See long discussion in PR#277 at
https://github.com/fltk/fltk/pull/277
2021-12-29 17:18:47 +01:00
Albrecht Schlosser c8bb2a3585 Add header guards to source files of FL/fl_config.h
There are two "source files", one for configure and one for CMake,
respectively.
2021-12-21 01:48:14 +01:00
Albrecht Schlosser b91db00d91 CMake: export Cairo include directories (issue #350)
If a user project is built using a FLTK library generated by CMake
with Cairo support then the CMake variable FLTK_INCLUDE_DIRECTORIES
now includes the required Cairo include directories.
2021-12-20 19:18:38 +01:00
Albrecht Schlosser e186ee0af3 Fix compiler warning [-Wignored-qualifiers]
In function ‘int glutExtensionSupported(const char*)’:
  warning: type qualifiers ignored on cast result type
2021-12-20 02:03:38 +01:00
Matthias Melcher 0d435d51ac GitHub #328: removed stray ';' in Fluid code generation. 2021-12-20 01:23:59 +01:00
Albrecht Schlosser e8961f10b8 Update fluid generated and .fl files (remove mac_shell...)
Commit updated .cxx files in src/ with fixed indenting

Remove `mac_shell_*' statements from fluid (.fl) files
2021-12-19 22:45:53 +01:00
Matthias Melcher 2328547538 Github #351: fixed missing curly brackets. 2021-12-19 22:33:12 +01:00
ManoloFLTK 47164bf954 Fix for issue #344 : New/Delete Type Mismatch on Windows 2021-12-19 19:49:39 +01:00
ManoloFLTK 4d934e003a Add check against NULL pointer (fix for issue #338). 2021-12-19 08:50:25 +01:00
Matthias Melcher 29531873ea STR 3289: Fluid i18n, gettext, catguts improvements
Removed some unneeded code.
2021-12-19 02:03:05 +01:00
Albrecht Schlosser 5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ

- Rename abi-version.h to fl_config.h, rename input files,
  update dependencies, .gitignore, CMake, configure and Makefiles.

- Include Cairo options in FL/fl_config.h

- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.

- Include <FL/fl_config.h> in config.h and wherever necessary,
  fix include order (move FL/Fl.H to the top) and more.

- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11

- Do not include <config.h> in Cairo demo program which is no
  longer required in Cairo programs since FLTK 1.4.0
2021-12-18 22:44:08 +01:00
Albrecht Schlosser 797616841c Remove unused and outdated demo, update dependencies
- remove test/connect.cxx
- fix typos in comments in a related android file
- update dependencies
2021-12-18 18:26:48 +01:00