Commit Graph

2501 Commits

Author SHA1 Message Date
ManoloFLTK 3e61ec7044 New member function Fl_Image_Surface::mask(Fl_RGB_Image*) 2023-12-04 12:34:44 +01:00
Greg Ercolano b9ac6bd728 Solves issue #856: improve Fl_File_Chooser enum docs 2023-12-03 18:10:33 -08:00
Albrecht Schlosser 9950c8e082 Improve contrast of check marks and radio buttons (#443)
- add fl_draw_radio(...) to standardize radio button drawing
- src/Fl_Light_Button.cxx: use fl_contrast() to determine color of
  radio button and check (light) button check marks, and use
  new fl_draw_radio() method
- src/Fl_Menu.cxx: same as src/Fl_Light_Button.cxx and use
  fl_draw_check() instead of "manually" drawing the check mark
  (forgotten in an earlier update)
2023-12-02 19:34:29 +01:00
Greg Ercolano 38aff7d9b4 solve issue 853: make scrollbar public 2023-11-29 08:29:24 -08:00
Albrecht Schlosser 727bd94560 Add commandline conversion for Windows (no-op on other platforms)
- add Fl::args_to_utf8() to convert commandline arguments to UTF-8

This new function closes the gap that previously only Visual Studio
applications converted their commandlines to UTF-8.

Tested with MinGW, MSYS2/MinGW-w64, and Visual Studio (2019).
2023-11-29 16:29:54 +01:00
ManoloFLTK 44b845cc42 Change type of member variables Fl_Graphics_Driver::ascent + descent
Type short is too small for Fl_Cairo_Graphics_Driver and font sizes ≥ 110.
2023-11-29 10:03:14 +01:00
Albrecht Schlosser 57371365d8 Fix compiler warning, dependencies, and trailing whitespace
The benign warning was:
  ‘Fl_Browser_::hscrollbar’ will be initialized after [-Wreorder]
  ‘int Fl_Browser_::linespacing_’ ...
2023-11-27 15:33:53 +01:00
ManoloFLTK f6d2ba651b Cairo graphics driver: Improve drawing of Fl_Pixmap and Fl_Bitmap 2023-11-27 10:02:59 +01:00
Matthias Melcher 6817e821af STR 1373: adds vsync control to OpenGL contexts on macOS
Windows and X11 to follow, no idea about Wayland.
2023-11-26 12:37:59 +01:00
Matthias Melcher 39a3212fc3 Adds pulldown menu to Fl_Text_Display and ..._Editor 2023-11-25 22:52:00 +01:00
Matthias Melcher c097f63ff8 Cleans up Fl_Input right mouse button menu 2023-11-25 22:08:05 +01:00
Matthias Melcher 7bef4ebf78 STR 749: Adds cut/copy/paste popup menu to Fl_Input 2023-11-25 21:42:27 +01:00
Matthias Melcher 34ed30fe1a Adds `linespacing()` to `Fl_Browser_` and all derived widgets 2023-11-25 18:20:08 +01:00
Greg Ercolano 0080850092 Fl_Terminal better name for flags -> charflags 2023-11-25 06:56:38 -08:00
Matthias Melcher b6be421a1f Added safety when calling Text_Display methods
- before assigning a buffer (Github #845)
- also fixed a warning form unused arg in Fl_Terminal
2023-11-23 15:16:34 +01:00
Greg Ercolano 9894812644 Make new handle_lf/cr methods private 2023-11-22 06:34:24 -08:00
Matthias Melcher 81e26b9089 Adding size range settings to Fl_Tile, initial commit.
- some documentation missing
- Fl_Tile::resize() not satisfying yet
- minimums work, maximums currently ignored
- 0 size children may make program hang
2023-11-22 14:45:13 +01:00
Greg Ercolano 9383f172a8 Fl_Terminal docs: Added some tables 2023-11-21 14:41:15 -08:00
Greg Ercolano c568056244 Added output_translate(): controls lf -> crlf translation 2023-11-21 11:24:27 -08:00
Greg Ercolano 56e85e8522 Fl_Terminal docs for fg/bg colors 2023-11-21 09:06:46 -08:00
Greg Ercolano 6252131017 Solve issue 837, doc some protected methods. 2023-11-20 09:26:40 -08:00
Greg Ercolano bc8b186398 Doc all pub/prot members, remove unused, add todo
- Made sure all public+protected members are documented.

- Reclassified some private -> protected:
   > vscroll_width()

- Removed signatures for unimplemented (non-existant) methods:
   > u8c_cursor(void)
   > history_use(int,bool)
   > cursor_h()

- Reclassified some protected -> private:
   > x_to_glob_col()
   > xy_to_glob_rowcol()
   > is_hist_ring_row()
   > is_disp_ring_row()
   > handle_ctrl()
   > is_printable()
   > is_ctrl()
   ..etc..
   > handle_selection_autoscroll()
   > handle_selection()
   > is_redraw_style

- Add todo for ESC 7 and ESC 8
- Small code formatting mods
- Small typos
2023-11-19 22:46:04 -08:00
Albrecht Schlosser a72eff7588 Fix compiler warnings in Fl_Terminal on Windows
- missing FL_EXPORT: Visual Studio (dll)
- missing include <stdarg.h>: MinGW
2023-11-19 17:58:57 +01:00
Albrecht Schlosser 367d302b5f Apply two patches provided by user 'Andre' via mail
1. add missing FL_EXPORT to class Fl_Terminal
2. add missing test/wizard demo to test/Makefile
2023-11-17 19:27:00 +01:00
Albrecht Schlosser 44bb080c0f Remove friend declaration from Fl_Window.H (see STR 3354)
Although this was not strictly necessary I decided to implement the
proposed patch, but in a slightly different way.

This adds a static public method for internal use only but it wouldn't
do any harm if a user called it.
2023-11-17 16:55:37 +01:00
Albrecht Schlosser 6f7e1f4fb7 Enhance documentation of event processing 2023-11-17 15:25:21 +01:00
Greg Ercolano 38fc08c15f Added clear(), some methods protected->public
New public methods:

    void clear(void);
    void clear(Fl_Color val);

old protected methods made public:

    void clear_screen(bool scroll_to_hist=true);      // ESC [ 2 J
    void clear_screen_home(bool scroll_to_hist=true); // ESC [ H ESC [ 2 J
    void cursor_home(void);                           // ESC [ 0 H

test/terminal modified to test these, and added separate tests
for both the API and ANSI code ways to do these ops.
2023-11-16 15:45:29 -08:00
Matthias Melcher d1d38090fb Fixes return type of Fl_Input_::dvalue() 2023-11-15 22:45:20 +01:00
Greg Ercolano 605328e045 Added textcolor() and color(), doc fixes.
textcolor() needed for consistency, color() behavior documented.

Both added to the test/terminal app.

Elaborated on the special background "see through" color value + behavior,
tested with color() in test/terminal app.
2023-11-14 12:23:23 -08:00
Albrecht Schlosser 4b315d190c Fix dependencies and whitespace issues 2023-11-14 18:14:48 +01:00
erco77 6842a43a31
Fl_Terminal widget (#800)
Pull Fl_Terminal widget from Greg's fork
2023-11-14 07:01:52 -08:00
Albrecht Schlosser d32de2fc14 Fix missing FL_EXPORT of class Fl_Grid
Thanks to Andre for finding this and sending a patch via mail.
2023-11-12 19:23:53 +01:00
Matthias Melcher d7768b76d0 FLUID: Adds template for tutorial.
Tutorial still to be written.
Also adds convenience methods to Fl_Input_
for getting and setting numeric values.
2023-11-07 14:28:22 +01:00
Matthias Melcher e690e76da1 FLUID: Adds undo for all grid operations. 2023-11-05 22:19:03 +01:00
Matthias Melcher 1f5472a7d3 FLUID: Adds transient cells to Fl_Grid
This allows multiple widgets to occupy a single cell which is
needed when moving cells across the grid interactively.
2023-11-05 20:04:49 +01:00
ManoloFLTK 0ae927a00e Add Fl_Window::maximize() and Fl_Window::un_maximize() 2023-11-05 19:42:55 +01:00
ManoloFLTK 994f5d058b Fix: Fl::clipboard_contains() cannot query selection buffer (#690) 2023-11-01 10:41:51 +01:00
ManoloFLTK bcc6de5332 Improve the documentation of class Fl_Display_device 2023-10-31 19:07:31 +01:00
ManoloFLTK ded4018b89 Member Fl_Widget_Surface::draw_decorated_window() needs not be virtual 2023-10-31 18:33:31 +01:00
Matthias Melcher 17baeceb7a FLUID: Positioning grid cells intuitively.
User can now drag widgets from the toolbox into the grid
or use the context menu to add them into the corresponding
cell. If no position is indicated, now children are added at the
first free cell.
2023-10-23 01:36:55 +02:00
Matthias Melcher d573bfe799 FLUID: Adds grid child positioning via +/- keys 2023-10-23 00:44:26 +02:00
Matthias Melcher 6cc3eb32db Removes Fl_String from documentation as well. 2023-10-22 23:10:06 +02:00
Albrecht Schlosser 1209e9dcd7 Make Fl_String and Fl_Int_Vector private (#789)
- add CMake option 'OPTION_USE_STD'
- add configure option '--enable-use_std'
- move FL/Fl_String.H to src/Fl_String.H
- move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H
- remove Fl_String from demo program examples/callbacks.cxx
- remove Fl_Int_Vector from public header FL/Fl_Table.H
- some methods of Fl_Table are no longer inline
- add CMake option OPTION_USE_STD to allow std::string in some
  selected functions and methods

Experimental, may be removed before release:

- use either Fl_Int_Vector or std::vector in Fl_Table depending
  on CMake OPTION_USE_STD or configure --enable-use_std

Move all fl_filename* functions that use Fl_String to fluid

Main changes in fluid:
 - add fluid_filename.h and .cxx
 - include "fluid_filename.h" rather than <FL/filename.H>

Update fl_input(), fl_password() and test/ask

- add maxchar parameter to fl_input() and fl_password()
- fl_input_str() and fl_password_str() are optional and return
  std::string if enabled (FLTK_USE_STD)
2023-10-22 19:35:17 +02:00
Matthias Melcher b4fd7037ac FLUID: more Fl_Grid settings 2023-10-22 01:51:53 +02:00
Matthias Melcher bbf0ea664d Removes dependency on Fl_Preferences::get/set(.., Fl_String, ...) 2023-10-21 18:41:57 +02:00
Matthias Melcher 0c35212467 FLUID: grid becomes a bit more interactive 2023-10-21 17:45:40 +02:00
Matthias Melcher f8d7ee6f5c FLUID: adding a subset of Fl_Grid child parameters. 2023-10-21 13:20:11 +02:00
Matthias Melcher 9817536cfd FLUID: basic Fl_Grid support
* no settings for children yet
* ne good interactive editing for children
2023-10-20 19:00:52 +02:00
ManoloFLTK 143a18ee11 Add "#define MAC_OS_VERSION_14_0 140000" to mac.H 2023-10-20 10:57:48 +02:00
Albrecht Schlosser 5c7ad00e07 Improve Fl_Grid example code
Add 'grid->end();' although it's redundant in this specific example.
2023-10-19 14:22:58 +02:00