Commit Graph

2482 Commits

Author SHA1 Message Date
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
Albrecht Schlosser
27a779b235 Fix trailing whitespace 2023-10-18 15:00:37 +02:00
Albrecht Schlosser
38871c5b31 Add Fl_Grid widget and test and demo programs
- FL/Fl_Grid.H: header file
- src/Fl_Grid.cxx: implementation

- examples/grid-simple.cxx: simple example program
- test/cube.cxx:            use Fl_Grid for layout
- test/grid_alignment.cxx:  test cell alignment and other functions
- test/grid_buttons.cxx:    demo program as discussed in fltk.general
- test/grid_login.cxx:      like test/flex_login.cxx but with Fl_Grid
- test/flex_login.cxx:      modified to match test/grid_login.cxx
2023-10-16 22:18:24 +02:00
ManoloFLTK
ae4ed35229 Add virtual void Fl_Graphics_Driver::draw_circle() 2023-10-16 20:53:55 +02:00
Albrecht Schlosser
6ba7b49baf Improve subclassing cababilities of Fl_Tile (STR 2791)
- remove static variables and functions
- make move_intersection() virtual
- add (protected) cursor access methods

These changes were inspired by STR 2791 where the user proposing an
enhancement was not able to subclass Fl_Tile properly. This commit
fixes the mentioned issues and enables subclassing without copying
internal code.
2023-10-16 13:33:40 +02:00
ManoloFLTK
52f5653545 Doxygen-only: warn when current color is changed
Also, remove the statement that rectangles are drawn with 1-pixel lines
which is wrong with HighDPI displays.
2023-10-16 11:24:17 +02:00
Albrecht Schlosser
01038e832a Fix trailing whitespace and dependencies 2023-10-13 19:08:30 +02:00
Matthias Melcher
b1321bb97e #748: Adds option to choose menu window boxtype
...independently from the menu button or menu bar boxtype
2023-10-13 12:49:26 +02:00
Matthias Melcher
c41b3a1a64
Fixes fl_filename_relative on Linux, Mac, and Windows (#787)
* fixed filename_relative for Linux
* Fixing fl_filename_relative for MSWindows.
* Update documentation
* Fixed docs.
* Fixes Linux and macOS builds
2023-10-11 23:26:36 +02:00
Albrecht Schlosser
1fd6f0dd3a Fix STR 3458: "GLUT compatibility mode segfaults"
... "when there's no current window".

Silently ignore GLUT function calls that need a current window if the
current window is NULL, return 0 from functions that return an 'int'.

Check if window is shown in Fl_X11_Gl_Window_Driver::swap_buffers().
This would issue "XRequest.nnn: GLXBadDrawable 0x0" on X11 otherwise.

Note: the chosen implementation to ignore GLUT calls silently appears
to be compatible with GLUT (3.7) whereas FreeGLUT 3.0 would issue error
messages and exit. The latter could be implemented as well but would
be much more work.
2023-10-07 17:14:11 +02:00
ManoloFLTK
f20e2188fd Change prototype to Fl::now(double offset = 0) - cont'd 2023-10-06 17:11:43 +02:00
ManoloFLTK
4d9805537b Change prototype to Fl::now(double offset = 0) 2023-10-06 16:23:08 +02:00
Matthias Melcher
144d7d3529 Adds Fl_Menu_::prev_mvalue() (#685) 2023-09-29 15:22:47 +02:00
Matthias Melcher
f3eae58c52 Draw parent window backdrop on Fl_Tabs (#718) 2023-09-29 14:12:39 +02:00
Matthias Melcher
71b8e77935
FLUID: adds greatly enhanced Shell Commands (#774)
The user can add an arbitrary number of highly configurable 
shell commands through the setting panel. The commands can
be saved as user preferences, inside the .fl file, or exported
to an external file. Shell scripts can be limited to individual 
platforms, can have shortcut keys, etc. .

* documentation will follow
* support to call `fltk-config` will follow
2023-09-26 16:01:03 +02:00
ManoloFLTK
75273c06c5 Add Fl_Timestamp Fl::distant_past()
Can be handy when Fl::seconds_since() is used early at program startup
2023-09-26 12:31:20 +02:00
Greg Ercolano
cee69943e5 Small FNFC doc clarification; "pilots" -> "presets" 2023-09-20 23:34:43 -07:00
ManoloFLTK
824818303c Restore Doxygen doc of fl_graphics_driver 2023-09-17 09:00:48 +02:00
Albrecht Schlosser
ede381c005 Fix Visual Studio shared library build
Todo: fluid-shared can't (yet) be built agains the shared fltk lib
  because of some linker errors. Needs investigation.

Note: fluid-shared is basically a test program to demonstrate linking
  against the shared FLTK libs but doesn't work yet using VS (MSVC).
  This is no problem for the functionality.
2023-09-12 23:18:46 +02:00
Albrecht Schlosser
a75024213f Fix doxygen "undocumented parameter" warnings
... and argument order in FL_INLINE_CALLBACK_2 macro
2023-09-07 12:01:43 +02:00