Commit Graph

11568 Commits

Author SHA1 Message Date
ManoloFLTK
5e6c47f446 Fix "line_style_doc program under X11: join type wrong" (#1017) 2024-07-23 10:13:27 +02:00
Greg Ercolano
dc95cd55c0 Further removal of fl_line_style() asciiart (#1016) 2024-07-21 19:54:50 -07: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
0291b48a73 Fix slowness due to not clipping (#1014) 2024-07-21 10:20:13 -07: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
ffe39737e5 Remove unused function after commit 325004f 2024-07-19 14:04:59 +02:00
ManoloFLTK
56f0671b32 Fix border case of use of fl_end_loop under Windows with USE_GDIPLUS=1 2024-07-19 13:48:18 +02:00
Greg Ercolano
49a161e68d Fix warnings during 'make html'
This fix solves these warnings:

    $ make html
    [100%] Generating HTML documentation
    /usr/local/src/fltk-1.4.x.git/src/Fl.cxx:2275: warning: explicit link request to 'include' could not be resolved
    /usr/local/src/fltk-1.4.x.git/src/Fl.cxx:2263: warning: explicit link request to 'include' could not be resolved
2024-07-19 00:39:42 -07:00
Greg Ercolano
0dec8cdc18 Improve line style docs (#1016) 2024-07-18 23:52:16 -07:00
ManoloFLTK
3fbb1c4af2 Remove obsolete content in documentation of Fl_Gl_Window
see "About the documentation of OpenGL usage in FLTK" in fltk.coredev
2024-07-19 07:33:03 +02:00
ManoloFLTK
4fb4f395a3 Remove duplicated comment
The remaining instance is in Fl_Gl_Window_Driver.cxx
2024-07-18 18:43:46 +02: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
3e9c77b62a Fix Fl_Tree related -Wall warnings 2024-07-17 10:29:49 -07:00
Greg Ercolano
f950b93e9c Added is_visible_r() for consistency w/is_visible() 2024-07-17 10:20:39 -07:00
Greg Ercolano
741d58757b Fix last_visible_item() to check parents (#1012) 2024-07-17 10:19:29 -07:00
ManoloFLTK
325004fb33 Simplify creation of OpenGL contexts under X11 platform (#1005)
The previous approach FLTK used to create OpenGL contexts under the X11 platform
followed a different code path to create contexts for OpenGL version 3 and above
than to create contexts for OpenGL versions 1 or 2.
The FLTK code followed exactly "Tutorial: OpenGL 3.0 Context Creation (GLX)"
of the official OpenGL wiki, see:
https://www.khronos.org/opengl/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
That code worked OK with Debian 11 and with any tested Linux configurations
in a VM running on Apple hardware. However, it failed with Debian 12 and later
on native Linux boxes to create GL3 contexts with the FL_DOUBLE flag.
That's what issue #1005 reports.

A first attempt to fix #1005 followed instructions given at:
https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glXIntro.xml
which supposedly describe how to create OpenGL contexts with GLX.
That had no effect on issue #1005.

This commit erases all attempts to use OpenGL3-specific calls or even
the more modern glXCreateNewContext() function that appears with
GLX version 1.3. The committed code uses only OpenGL 1-age
functions to create OpenGL contexts for X11 windows.
Created contexts follow the "Compatibility Profile" which means they
are compatible with both modern OpenGL3-style and legacy OpenGL1/2-style.

This appears to fix issue #1005.
2024-07-17 17:12:23 +02:00
ManoloFLTK
fd257a7bf3 Wayland: support move/resize of subwindow independently from parent (#1003) 2024-07-14 13:24:28 +02:00
ManoloFLTK
ee05d4bd3a Fix typo in comment referring to github issue 2024-07-12 17:50:29 +02:00
Cyprinus Carpio
dac5f0ab39 gl_draw: fix drawing of text outside of viewport 2024-07-12 17:42:32 +02:00
Greg Ercolano
6ed7b56c79 Fix warning (#1008) 2024-07-09 11:00:52 -07:00
Greg Ercolano
6776f89872 Fix horiz connection lines (#1008) 2024-07-08 12:13:44 -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
Albrecht Schlosser
2252ba9839 X11: don't send FL_RELEASE event after FL_MOUSEWHEEL
Horizontal mousewheel events use pseudo button numbers 6 and 7, resp.,
similar to vertical mousewheel events which use buttons 4 and 5.

The old code erroneously sent FL_RELEASE events for buttons 6 and 7
although it was prevented for buttons 4 and 5 explicitly.
2024-07-07 20:00:43 +02:00
Albrecht Schlosser
ecb3c9c6fc Fl_File_Chooser: set insert position to end of string (#1004)
... after filename "expansion" with current directory.

This is done when the entered filename is relative. The old behavior
was confusing and error prone.

Also: improve documentation of Fl_File_Chooser::value(const char *).
Clarify behavior and side effects of this method.
2024-07-04 16:03:01 +02:00
ManoloFLTK
31b386930e New Wayland-specific function: int fl_wl_buffer_scale(Fl_Window *) 2024-07-04 08:56:16 +02:00
ManoloFLTK
fc910ae892 Wayland: fix interactive moving and resizing of a subwindow - cont'd (#1003) 2024-07-03 17:57:55 +02:00
Michael R Sweet
944ae5b040
Use pkg-config to find libpng - still does the simple test as a backup... 2024-07-03 11:50:52 -04: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
Albrecht Schlosser
d411d39092 Improve test/handle_keys.cxx
- colorize output
- improve formatting
- log status of Fl::OPTION_SIMPLE_ZOOM_SHORTCUT
2024-07-01 00:30:35 +02:00
Greg Ercolano
54f44d5ac9 Fix compiler warnings 2024-06-30 09:25:31 -07: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
ManoloFLTK
55daede41d Wayland: improve mapping of subwindows on display 2024-06-29 14:32:45 +02:00
Albrecht Schlosser
216ddd09c9 Update documentation 2024-06-28 13:47:33 +02:00
Albrecht Schlosser
bdd658ee35 Add "Color Contrast" section to "Drawing Things" docs
This section describes fl_contrast() and the related new methods.
2024-06-27 19:49:15 +02:00
ManoloFLTK
26ea55d5a4 Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987) 2024-06-27 09:37:50 +02:00
ManoloFLTK
b692cc55da Navigation in menubar: wrap around when using arrow past end or start of menubar.
Slight behavior change of Fl_Menu_Bar relatively to 1.3: left and right arrow keys
when pressed in the first (resp. last) (sub)menu of a menubar wrap to the menu
at the other end of the bar. Also, left and right arrow keys open the previous
(resp. next) menu of the bar when pressed in a submenu.
Rationale: macOS, gnome and Windows apps equipped with a menubar do that.
2024-06-27 07:45:45 +02:00
Albrecht Schlosser
64cd50c130 Update test/input_choice demo (#978)
- add Fl_Choice widget for layout comparison
- rewrite button callbacks
- improve layout and other details

This is a follow-up to issue #978, "merging" the existing input_choice
demo with "choicetest_v3" as mentioned.
2024-06-27 03:19:26 +02:00
Greg Ercolano
a678dba2e3 More copyright updates (#978) 2024-06-26 16:02:12 -07:00
Greg Ercolano
6f5ef5bb43 Update copyright date (#978) 2024-06-26 16:00:30 -07:00
Greg Ercolano
438a8af9da Fixes to Fl_Choice provided by Albrecht (#978)
This addresses some border case issues in Fl_Choice wrt erco's
recent Fl_Input_Choice modifications. As Albrecht writes in issue #978:

- The width of the (simulated) menu button in Fl_Choice is shrunk
  if the height of the widget is lower than 20 for some schemes.
  This (a) is inconsistent, (b) doesn't look good, and (c) doesn't
  match the better layout of the Fl_Input_Choice widget after your patch.

- The constant height (+/- 8) of the divider line in some schemes
  would overlap the border of the widget if the widget's height is
  smaller than about 19. You fixed this in your patch and I "stole"
  your [erco's] fix for Fl_Choice.

- The divider line and the box borders of Fl_Choice and Fl_Input_Choice
  didn't align properly. I fixed this in my Fl_Choice patch as well
  (IMHO this is the right place to fix it).
2024-06-26 15:46:36 -07:00
Greg Ercolano
5c7ba51be3 Fix Fl_Input_Choice vs Fl_Choice drawing issues (#978)
Differences in size of arrows and overall look varies
with different schemes applied for issue raised by Philip Rose
first on fltk.general:

Subject: Discrepancy between Fl_Choice and Fl_Input_Choice
2024-06-26 15:40:41 -07:00
ManoloFLTK
fe4c94b4dc Navigation in menubar: wrap around when using arrow past end or start of menubar.
Fix some border cases.
2024-06-25 13:23:49 +02:00
Greg Ercolano
f44c163234 Add example to build w/warnings+fltk examples 2024-06-24 21:14:51 -07:00
ManoloFLTK
c1a950e25f Navigation in menubar: wrap around when using arrow past end or start of menubar.
See "Menu navigation in FLTK is different from Ubuntu X11 navigation" in fltk.general.
Menubar wrapping is what macOS and gnome applications do.
2024-06-24 16:18:56 +02:00
ManoloFLTK
0bb559c803 Wayland: account for old versions of the GTK shell protocol - cont'd
Not easy to get it right in absence of any documentation for "GTK Shell" protocol.
2024-06-24 14:52:08 +02:00
ManoloFLTK
8250cc7f7b Wayland: account for old versions of the GTK shell protocol - cont'd 2024-06-24 09:30:07 +02:00