Commit Graph

2401 Commits

Author SHA1 Message Date
ZJUGKC 385cabf3aa
Add const qualifiers to can_undo and can_redo (#720) 2023-04-17 16:12:03 +02:00
Albrecht Schlosser c3560a8b02 Fix compiler warning [-Wunused-parameter] 2023-04-15 20:05:12 +02:00
Matthias Melcher e18b5353cd Fixed leak in Fl_Text_Buffer #716 2023-04-14 16:54:11 +02:00
Matthias Melcher afd3fde5de Memory leak in Input_ #716 2023-04-14 16:32:36 +02:00
Albrecht Schlosser 7b2c770ef7 Fix trailing comma in enums of public headers
Compiler warning: comma at end of enumerator list [-Wpedantic]

Note 1: I decided to fix these warnings although trailing commas in
enums are allowed at least since C++11.

Note 2: I fixed only public headers because these headers may be
compiled in user code. To do: check internal headers.
2023-04-13 20:14:36 +02:00
Albrecht Schlosser 9d380f24bd Fix misplaced 'const' [-Wignored-qualifiers]
warning: type qualifiers ignored on function return type
2023-04-13 19:58:26 +02:00
Albrecht Schlosser c9ea7380d2 Fix compiler warning if user code is compiled with '-Wextra' (2)
Replace '(void*)' cast with '(fl_intptr_t)' because older gcc (4.8.2)
issues a warning with '(void*)'.
2023-04-13 18:56:59 +02:00
ManoloFLTK caaa11a96f Standardize API to "graphics context" across platforms
Rename fl_wl_cairo() to fl_wl_gc()
Add function cairo_t* fl_cairo_gc() under OPTION_USE_CAIRO
2023-04-13 10:02:40 +02:00
Albrecht Schlosser 7d8195140c Add public accessor methods Fl_Widget::needs_keyboard()
- add public getter and setter for
- document the new methods
- document that these methods are not yet used internally
- remove unnecessary friend declaration 'NEEDS_KEYBOARD' flag
- simplify Fl::focus(Fl_Widget *) using the new methods.
2023-04-11 16:38:24 +02:00
Albrecht Schlosser 8639c43e3a Fix compiler warning if user code is compiled with '-Wextra'
This commit fixes two similar warnings:

"cast between incompatible function types from ‘void (*)(Fl_Widget*)’
 to ‘void (*)(Fl_Widget*, void*)’ [-Wcast-function-type]"
2023-04-11 15:10:07 +02:00
ManoloFLTK f3423d3e83 More accurate documentation of function fl_wl_cairo() 2023-03-25 14:51:57 +01:00
Albrecht Schlosser aebf2fec39 Improve Fl_Cairo_Window documentation (typos + indentation)
Also fix a doxygen warning in Fl_String.
2023-03-23 13:26:14 +01:00
Matthias Melcher 5c482f9d9b
Fix and update alignment #346 (#701)
* interactive layout alignment rewritten
* interface for new alignment rules
* new alignment dialog box
* user defined layout rules added
* layout rules can be stored in projects, settings, and external files
* Valgrind verification
2023-03-18 17:33:27 +01:00
Rob McDonald 09b7b4719d Protect GL_SILENCE_DEPRECATION from re-definition. 2023-03-15 23:15:32 +01:00
Albrecht Schlosser 0f41797b7a Cairo: introduce Fl::cairo_flush() in FLTK API
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)
2023-03-14 19:51:34 +01:00
ManoloFLTK eeb9267e6e Wayland: add support for multiple high or low DPI displays 2023-03-13 10:38:28 +01:00
Albrecht Schlosser 0f3b5ded8f Fix dependencies, typos, trailing whitespace, and formatting
No code changes.
2023-03-09 18:28:37 +01:00
ManoloFLTK e18ce5400f Remove Doxygen warning about incorrect #include directive 2023-03-09 18:16:45 +01:00
ManoloFLTK a624290b27 Remove warnings when fl_attr.h is compiled in C 2023-03-09 18:10:38 +01:00
Albrecht Schlosser 5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
Albrecht Schlosser 2626962dd3 Fix regression: failed to build shared FLTK libs
Add FL_EXPORT to some classes to make building shared libs possible.
Building shared libs and 'fluid-shared' missed global symbols.
2023-03-01 17:24:03 +01:00
Matthias Melcher 13cd927ab4
Add Fl_String to Fl_Preferences (#687) 2023-02-25 22:44:39 +01:00
Matthias Melcher 9f87af8ad9
Fl_String refactoring and extension (#683)
- add true unittest and Fl_String testing
- interface and printout are similar to gtest
  without requiring external linkage.
  just run `unittest --core`.
- new Fl_String API
- extended API to fl_input_str and fl_password_str
- co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2023-02-23 15:42:05 +01:00
Matthias Melcher 2971625418 Add GLUT_ELAPSED_TIME simulation 2023-02-20 13:40:27 +01:00
Matthias Melcher 6fbfaba19d
Move class Fl_Shortcut_Button from FLUID to core (#677) (#680) 2023-02-15 15:24:25 +01:00
Matthias Melcher 7f87c847ba
Unlimited undo/redo for Fl_Input_ and Fl_Text_Buffer (#558) (#676) 2023-02-10 17:13:20 +01:00
Matthias Melcher 4440e35693 Deprecated warnings wording adapted 2023-02-10 16:29:14 +01:00
Matthias Melcher fc9d0a23af Fixes FL_DEPRECATED for Fl_Text_Buffer.h 2023-02-10 16:29:14 +01:00
Albrecht Schlosser 2239ecc4a1 Fix typos in documentation and comments
(no code changes)
2023-02-10 13:13:36 +01:00
Matthias Melcher ffadc23cab
Expose elapsed time API (#670) 2023-02-09 14:48:39 +01:00
Albrecht Schlosser 9f8b65a70e Document MSVC macro _MSVC_LANG for future use in fl_attr.h
This macro defines the C++ standard used by the compiler since
Visual Studio 2015 Update 3.
2023-02-06 23:03:45 +01:00
ManoloFLTK d4251d8b73 Fix "\todo Description of box types is incomplete" from Enumerations.H 2023-02-06 16:15:22 +01:00
ManoloFLTK dc51880e28 Fix "\todo Add a flag to ignore case" from Fl_Browser_.cxx 2023-02-06 15:26:53 +01:00
ManoloFLTK 57a87f7053 Fix "\todo provide user documentation for fl_set_status function" 2023-02-06 11:17:31 +01:00
ManoloFLTK a56c48079e Fix "\todo Complete documentation of class Fl_String"
Also
- fix "\todo Unicode?" in Fl_Text_Display::display_insert() after verification
- fix "\todo [Internal] The user_data value must be implemented using \p fl_intptr_t"
because that's now in place.
2023-02-06 10:34:47 +01:00
ManoloFLTK 7f4a14e376 Fix "\todo FL_Button and FL_key... constants could be structured better" 2023-02-06 10:31:14 +01:00
ManoloFLTK 9f55e93ffa Use correct Doxygen syntax for "member groups" 2023-02-06 09:04:50 +01:00
ManoloFLTK 515680a633 Remove a bunch of \todo items from documentation 2023-02-05 16:07:14 +01:00
ManoloFLTK b4b7166b85 Better document Fl_Window::show(int, char**)
This removes one \todo.
2023-02-05 09:37:48 +01:00
Matthias Melcher fa9915e1e3 Doxygen fix for FL_DEPRECATED 2023-02-05 00:22:08 +01:00
ManoloFLTK 782fa4e5c8 Improve documentation of the Fl_Cursor enumeration 2023-02-04 12:49:13 +01:00
Matthias Melcher 8178d005de Missing include for FL_DEPRECATED 2023-02-02 23:13:40 +01:00
Matthias Melcher 1aa6c4fed8
Fix position() methods that shadow Fl_Widget::position()
* `FL_DEPRECATED` macro to mark `position()` method that shadow `Fl_Widget::position()` #69 (#666)
2023-02-02 20:54:19 +01:00
Albrecht Schlosser 796ff44268 Fix documentation of FL/Fl_Box.H 2023-02-02 19:14:14 +01:00
ManoloFLTK 6276822e9e Allow cmake -DOPTION_APPLE_X11=On without -U__APPLE__ 2023-02-02 18:48:24 +01:00
Albrecht Schlosser 4e75549e7b Update dependencies and fix whitespace errors
- replace tabs with spaces
- remove trailing whitespace
2023-02-02 17:09:14 +01:00
Albrecht Schlosser fb00fb3d66 Minimize and fix include statements of Fl_Int_Vector
- replace <FL/Fl.H> with <FL/Fl_Export.H> in public header
- add missing <string.h> in implementation
2023-02-02 17:00:28 +01:00
ManoloFLTK 7b245ef0ab Remove warnings when building doc with Doxygen 2023-01-24 10:32:57 +01:00
Matthias Melcher 3a7c9fe978 STR 2639 Fixes Fl_Pack resize behaviour
FLUID cleanups
FLUID Fl_Pack support improvement
FLUID fix error in handling live mode resizables
2023-01-23 16:08:59 +01:00
wcout 2ddfd9d949
Animated GIF support (Fl_Anim_GIF_Image class) (#375) 2023-01-21 17:27:58 +01:00