Commit Graph

150 Commits

Author SHA1 Message Date
ManoloFLTK
f269367d41 Clarify the documentation of class Fl_Callback_User_Data 2024-10-17 14:10:38 +02:00
Albrecht Schlosser
d589c05b17 Fix documentation typos and trailing whitespace 2024-10-15 18:59:28 +02:00
Matthias Melcher
ec05f78d98 Adding horiizonatl and vertical label margin
- sizeof(Fl_Widget) not increased
- label positions can be adjusted
- try it out in test/label app
- full support in FLUD
2024-08-27 15:13:32 +02:00
Matthias Melcher
cfc54a3b19 Adding Fl_Widget::label_image_spacing() (#1039)
- May need a better method name.
- This makes the gap between the image in a label and
the label text user settable.
- Can be tested using test/label app
2024-08-14 01:52:37 +02:00
ManoloFLTK
676e976cb6 Fl_Window_Driver::set_popup_window(), Fl_Screen_Driver::screen_boundaries_known()
Fl_Window_Driver::set_popup_window() is to be used to declare a window should be
positioned relatively to a previously mapped other window.  This allows a platform
to process such windows differently from other windows if needed.
Menu and tooltip windows are so declared.

A call to Fl_Window_Driver::set_popup_window() also allows to distinguish a real
menu or tooltip window from a window marked by Fl_Window::set_menu_window()
or by Fl_Window::set_tooltip_window() but that's not a real menu or tooltip.

New member function bool Fl_Screen_Driver::screen_boundaries_known() returns
true by default. A platform where the position of windows inside a screen is hidden
(e.g., Wayland) returns false. This allows FLTK to refrain from trying to make sure
a computed position is inside a screen.
2024-02-05 12:39:10 +01:00
Albrecht Schlosser
6f7e1f4fb7 Enhance documentation of event processing 2023-11-17 15:25:21 +01:00
ManoloFLTK
0ae927a00e Add Fl_Window::maximize() and Fl_Window::un_maximize() 2023-11-05 19:42:55 +01:00
ManoloFLTK
64f64835dd Fix typos in names of Doxygen items (#729) 2023-08-17 08:22:25 +02:00
Matthias Melcher
10d9010ed9
Improved, yet compatible, widget callback system using macros (#729)
* adds FL/fl_callback.macros.H
* adds FL_FUNCTION_CALLBACK_n(widget, function, [type, data])
* adds FL_METHOD_CALLBACK_n(widget, class, instance, method, [type, data])
* adds FL_INLINE_CALLBACK_n(widget, [type, name, data], callback_body)
* adds `examples/callback`
* full documentation
2023-08-15 11:36:58 +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
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
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
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
515680a633 Remove a bunch of \todo items from documentation 2023-02-05 16:07:14 +01:00
Matthias Melcher
6ada45f1f2 Fix missing parameter documentation 2023-01-08 01:07:04 +01:00
Matthias Melcher
8826dca106
Add close buttons for individual tabs in Fl_Tabs (#628)
Add close buttons for Fl_Tabs
Introducing callback reasons
FLUID shows all FL_WHEN_... options
Adding Fl_Tabs overflow types
Improved test/tabs to show new features
2023-01-05 13:51:30 +01:00
Albrecht Schlosser
64d8c913be Fix trailing whitespace and dependencies 2022-12-13 15:58:56 +01:00
Matthias Melcher
a5adbd99ca
Add option to bind images to a widget (#589)
Adding image binding to FLUID as well
2022-12-10 23:22:24 +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
Albrecht Schlosser
f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
ManoloFLTK
76da518b97 Document who's responsible for deletion of widget's image labels. 2020-06-18 10:21:28 +02:00
Albrecht Schlosser
3746b8986e Clarify documentation of Fl_Pack 2020-03-03 17:29:00 +01:00
ManoloFLTK
1e9e742245 Fix 2 typos in Fl_Widget::shortcut_label() Doxygen doc. 2020-01-26 19:23:59 +01:00
ManoloFLTK
3384fe93df Add Fl_Widget::shortcut_label(int) to control effect of '&' in some widget labels 2020-01-26 19:15:30 +01:00
ManoloFLTK
20ab318875 Link Doxygen doc of Fl_Widget::label(text) to relevant part of FLTK programming manual. 2019-11-06 11:09:34 +01:00
Albrecht Schlosser
75b6cee6cc Document that Fl_Widget::GROUP_RELATIVE bit is not used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 16:50:57 +00:00
Matthias Melcher
e8818e968c Android: Widgets can now request the on-screen keyboard when they get focus. This may fail if visible_focus is disabled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26 15:33:22 +00:00
Albrecht Schlosser
a8c4f77d50 Improve docs of Fl_Widget::callback() and do_callback().
Clarify that all variants of do_callback() call clear_changed() after
the callback and that 'long Fl_Widget::argument()' may truncate the
user_data value on some (particularly Windows 64-bit) platforms.

Some code has been reformatted and refactored with better variable names,
but there are no effective code changes.

Obsolete, inactive code was removed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-20 15:16:37 +00:00
Albrecht Schlosser
1db8d51eae Move typedef fl_(u)intptr_t to FL/platform_types.h.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-23 15:08:26 +00:00
Matthias Melcher
30756ae350 Window functions to retrieve more detailed window type
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-13 15:31:26 +00:00
Albrecht Schlosser
c2601505bb Documentation updates on callbacks and Fl::readqueue().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10677 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-05 09:04:44 +00:00
Albrecht Schlosser
f05b677a4b Fix Windows 64-bit compilation warnings (STR #2813).
Thanks to Csaba for providing a patch.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10670 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-04 09:52:53 +00:00
Ian MacArthur
e402a64457 Add some doxygen descriptions for the (previously undocumented) Fl_Multi_Label struct, and make some minor related adjustments to the docs for Fl_Label and Fl_Labeltype.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10553 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-04 13:12:43 +00:00
Albrecht Schlosser
84f87addfc Add method Fl_Widget::is_label_copied() as discussed in fltk.general.
Thread was: "How get X,Y,W,H for current clip region ?" on Feb 2-3, 2015.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-03 12:19:01 +00:00
Lauri Kasanen
3ce67eb594 Expose the INACTIVE flag in Fl_Widget similarly to other flags. STR #3122
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-08 08:55:49 +00:00
Albrecht Schlosser
df2a448ee3 Clarify docs of Fl_Widget::measure_label().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10096 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-08 01:10:44 +00:00
Albrecht Schlosser
49e4b8e3fa Fix clang support on Win64 (STR #3027).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10053 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-11 13:02:25 +00:00
Greg Ercolano
9fc45db999 As per notes from STR#2948:
Moved top_window_offset() to being a member of Fl_Widget (was Fl_Window)
    and moved its code near implementations of top_window() and window().



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9872 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-10 21:16:16 +00:00
Greg Ercolano
3fe3f24427 Solve STR#2948: Add new method Fl_Widget::top_window() to return the widget's top-level window.
Docs for existing Fl_Widget::window() revised to clarify the difference between these two methods.

Docs for window() also moved from .H -> .cxx as per CMP (docs should be where code implementation is).



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9871 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-10 20:51:24 +00:00
Manolo Gouy
482c4a5e0a Mac OS: added support for the text input feature introduced in OS 10.7 "Lion" where pressing and holding
some key opens a window with possible accented characters. This feature is used by the Fl_Input_ and
Fl_Text_Editor widgets. User-defined text input widgets can optionally use this feature, but the default
behavior is to not use it. Fl_Secret_Input turns it off, for example.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-13 15:25:37 +00:00
Matthias Melcher
e2d3d400cd Reverted flags in Fl_Widget to protected.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 20:12:06 +00:00
Matthias Melcher
4f7f902a00 Updated PNG library to current version 1.5.10
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9370 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 00:06:25 +00:00
Manolo Gouy
60d448d150 Removed Fl_Widget::is_fullscreen() that is just another name for Fl_Window::fullscreen_active()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9331 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-09 09:12:34 +00:00
Albrecht Schlosser
8ed93f0065 fix a typo and indenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 14:30:19 +00:00
Fabien Costantini
8809c5d65d Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 05:12:30 +00:00
Manolo Gouy
08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +00:00
Manolo Gouy
5e136f4c39 Remove Doxygen warnings introduced at r.9116
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 13:10:55 +00:00
Matthias Melcher
c1caad3e62 STR 2714: remove lint (variables that have the same name as a function in the same scope).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-02 06:25:13 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00