Commit Graph

2620 Commits

Author SHA1 Message Date
ManoloFLTK
2337214e4e Fix for Windows and X11: Rounding issues with Fl_RGB_Image::draw() (#1120) 2024-11-12 10:56:19 +01:00
ManoloFLTK
37144c06a1 Undo 6f6a375 that does not properly support macOS SDK 15.x (#1103) 2024-11-04 04:50:31 +01:00
ManoloFLTK
6f6a375fca Recent macOS SDKs badly define MAC_OS_X_VERSION_MAX_ALLOWED
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-03 14:27:28 +01:00
Albrecht Schlosser
abf28f0b70 Improve and clarify documentation 2024-11-01 18:24:06 +01:00
ManoloFLTK
818e2b77d1 Wayland: Fix issue in maximization of a borderless window (#1099)
Also fixes scenarios mixing fullscreen and maximization:
- maximize
- set fullscreen
- unset fullscreen
- un-maximize
with and without window border.
2024-11-01 15:43:18 +01:00
Albrecht Schlosser
56cf5684dc Make Fl_Window::flush() public for consistency with subclasses
... as discussed on fltk.general recently

Note: this method was already public in all subclasses of Fl_Window.
2024-10-30 14:30:08 +01:00
Albrecht Schlosser
c0e07d3452 Add range check to Fl_Group::child(int)
Returns NULL if n is out of range to prevent accessing undefined
memory.
2024-10-25 02:39:47 +02:00
Albrecht Schlosser
74d827f71f Remove FL_MENU_RESERVED bit mask in favor of better documentation
This bit mask was added in commit 53b40f4138 in an attempt
to *document* reserved bits but it turned out that this mask could
have negative side effects on some newer compilers by propagating
the enum to an 'unsigned int' and issuing compiler warnings.

See this comment and follow-up's in fltk.general:
https://groups.google.com/g/fltkgeneral/c/7xrDkbkxiyw/m/rzEIJ7XhAgAJ
2024-10-19 15:58:51 +02:00
Matthias Melcher
737137cf78 Fixes Fl_Text_Display line number calculation. (#1088) 2024-10-19 15:53:29 +02:00
Albrecht Schlosser
04c8dd9d26 Add forgotten FL_OVERRIDE attribute 2024-10-18 19:18:23 +02:00
Albrecht Schlosser
89309ebbf2 Add missing *public* methods of Fl_Single_Window
- void make_current()
- void flush()
2024-10-18 16:30:23 +02:00
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
a0f1d5bc5e Fl_Preferences documentation update. 2024-10-10 11:46:31 +02:00
Albrecht Schlosser
05d78e8ebd Improve documentation on mouse and keyboard events 2024-10-07 16:13:11 +02:00
Albrecht Schlosser
4f4a9be15b Support mouse buttons 4 + 5 (aka "side buttons") (#1076, #1068)
This work is based on PR 1068 (patch by @CendioHalim) and
extended to store button status (4,5) in Fl::event_state() like
it's done for other mouse buttons (1-3).

Changes:
- new symbol: FL_BUTTON4 = side button 1 = "back"
- new symbol: FL_BUTTON5 = side button 2 = "forward"
- modified  : FL_BUTTONS now includes bits for two side buttons

Note: the status of these new buttons is not maintained by X11,
  therefore we need to maintain them in internal variables for
  this platform.
2024-10-06 18:53:03 +02:00
ManoloFLTK
b95a7eccd9 Fix Doxygen problems with fl_draw() functions. 2024-08-28 10:05:17 +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
ManoloFLTK
a0a91d4854 More detailed documentation of how Fl::event_state() differs between platforms 2024-08-23 16:25:11 +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
Matthias Melcher
325ac336c7 Adding gap parameter to fl_draw(...)
This allows the user to define the spacing between a
possible imge and the text.
2024-08-14 00:35:55 +02:00
Greg Ercolano
85d1d904ec Small doc fixes (\See -> \see) 2024-08-12 18:31:05 -07:00
Greg Ercolano
f825fca43c Improve handling of malformed ANSI. (#950) 2024-08-12 18:00:54 -07:00
Matthias Melcher
3922ef67c1 Further accelerating Fl_Text_Display (#596)
This commit adds lazy evaluation for the wrapped line calculation,
making scrolling much more interactive.
2024-08-12 12:22:25 +02:00
ManoloFLTK
eaf62a99dc Documentation: improve description of how to use drawing surfaces 2024-08-10 23:14:56 +02:00
Albrecht Schlosser
666bbda70e Fix tabs, trailing spaces, and update dependencies 2024-08-10 20:32:19 +02:00
mid-kid
b83a6abe01 Configure/make: Quote variables that may contain spaces
This allows installing FLTK to directories that contain spaces.
2024-08-10 16:28:37 +02:00
Matthias Melcher
9bb9cb3f96 Optimize Fl_Text_Display scrolling speed (#596). 2024-08-04 00:32:11 +02:00
Matthias Melcher
803ad5ace9 Fixes missing default argument in Fl_Fill_Dial constructor. 2024-08-03 19:06:23 +02:00
Matthias Melcher
68f437b63e Improve visibility of selected tab in Fl_Tabs (#1032). 2024-08-03 15:26:03 +02:00
Matthias Melcher
97b1df805e Better Fl_Tabs callback handling. 2024-08-03 13:05:31 +02:00
Matthias Melcher
abb2971654 Fix Fl_Tabs callback in Overflow mode (#1031). 2024-08-02 21:15:18 +02:00
Matthias Melcher
089f31018b Add RMB pulldown menu to Fl_Help_View, #75
- append underscores to private varaibles per CMP
- add public Fl_Help_View::copy() and Fl_Help_View::text_selected()
- add public Fl_Help_View::copy_menu_text
- fixes some of the focus handling
- add pulldown menu to copy selected text
2024-07-29 14:03:16 +02:00
Matthias Melcher
5cafae4a3a Remove FL_AUTO_DELETE_EVENT feature
It's not ripe for release yet and possibly not even needed
according to pyFLTK maintainers.
Added: 8cffbd6941
2024-07-28 16:32:36 +02:00
ManoloFLTK
c0dba15e4b Wayland: restore support of Fl_Tile with subwindow widget - cont'd 2024-07-28 14:21:51 +02:00
Matthias Melcher
8cffbd6941 Adds the FL_AUTO_DELETE_EVENT to suppress auto delete.
Language wrappers can have major issues with FLTK auto deleting
all children of a group if a group is deleted. This event gives individual
widget the opportunity to override auto delete.
2024-07-26 18:00:25 +02:00
ManoloFLTK
b740c48ee8 Wayland: restore support of Fl_Tile with subwindow widget 2024-07-26 16:01:16 +02:00
ManoloFLTK
3cc12d203f Fix Fl_Scalable_Graphics_Driver::rect(x,y,w,h) (#1017) 2024-07-24 17:09:30 +02:00
Albrecht Schlosser
7f24a0d6d8 Update docs and screenshot for fl_line_style() (#1016)
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...".
2024-07-21 22:34:02 +02:00
Greg Ercolano
7f998bac60 fl_line_style() diagrams replace ascii art (#1016) 2024-07-20 12:55:27 -07:00
Greg Ercolano
e64e708345 fl_line_style() docs refer to the enum (#1016) 2024-07-20 09:51:57 -07:00
ManoloFLTK
faaf1a0cb4 Fix typo in documentation 2024-07-18 16:44:45 +02:00
ManoloFLTK
0929624646 Document more accurately use of FL_OPENGL3 flag with Fl_Gl_Window's 2024-07-18 16:36:24 +02:00
Greg Ercolano
f950b93e9c Added is_visible_r() for consistency w/is_visible() 2024-07-17 10:20:39 -07:00
Albrecht Schlosser
317e06e5a3 X11: fix extraneous (undefined) event state bits
- Restrict FL_BUTTONS mask to only three valic mouse buttons.
  Pseudo mouse buttons 4-7 are used for FL_MOUSEWHEEL events and
  are no longer reflected in Fl::event_buttons().
- Return only state of mouse buttons 1-3 in Fl::event_buttons().
  Buttons 4-7 are not "sticky" (used for FL_MOUSEWHEEL).
- Keep undefined keyboard related bits in Fl::event_state() for
  backwards compatibility and transparency. These bits may be masked
  out in a later release.
- Document Fl::event_state() bits for X11 in src/Fl_x.cxx.

Note: this is a bug fix for X11 only, Wayland and other platforms are
not affected.
2024-07-07 20:25:12 +02:00
ManoloFLTK
31b386930e New Wayland-specific function: int fl_wl_buffer_scale(Fl_Window *) 2024-07-04 08:56:16 +02:00
ManoloFLTK
b5516449a6 Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)
This commit removes changes in class Fl_Group introduced in 1c6a0c1.
2024-07-01 17:02:27 +02:00
Cyprinus Carpio
b55dc47aae
Documentation: remove implication of concave 3 sided polygons existence (#1000) 2024-07-01 16:51:22 +02:00
Cyprinus Carpio
a69c5c5c92
Fl_Tree +/- buttons are no longer drawn using bitmaps, different default line color (#995)
Fl_Tree changed to support system color themes (PR #995)

merging CyprinusCarpio's mods carried over from from issue #972.

* Fl_Tree: use named (colormap) colors to support system color themes (see issue #972). changed connectorcolor() default from gray ramp color to FL_INACTIVE_COLOR (Fl_Color(8)), and similar named colormap colors for icon drawing.

* Fl_Tree ⊞ / ⊟ icons (and on macs, ▶ / ▼icons) are now drawn w/fl_draw() functions instead of with xpm bitmaps for colormap control

---------
Co-authored-by: Greg Ercolano <erco@seriss.com>
2024-06-30 09:08:00 -07:00
ManoloFLTK
1c6a0c1a8f Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)
This fix requires to be able to recognize whether Fl_Wayland_Window_Driver::resize() is called
by a resize operation of an encompassing widget or not.
To do that, private static int variable group_resize_depth_ is added to class Fl_Group
and an accessor to this variable is added to class Fl_Window_Driver.
2024-06-29 14:57:54 +02:00