summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
AgeCommit message (Collapse)Author
2022-08-20Add int Fl::system(const char *command) static member function.ManoloFLTK
2022-03-20 Fix issue #413: Commit 29d9e31 creates memory handling problem under macOS.ManoloFLTK
2022-02-03Reorganize classes Fl_System_Driver and Fl_Screen_DriverManoloFLTK
These virtual members are moved from Fl_Screen_Driver to Fl_System_Driver - wait(double) - ready() These virtual members are moved from Fl_System_Driver to Fl_Screen_Driver - copy(const char *stuff, int len, int clipboard, const char *type) - void paste(Fl_Widget &widget, int clipboard, const char *type) - clipboard_contains(const char *type) - clipboard_notify_change() These members are moved from Fl_X11_Screen_Driver to Fl_X11_System_Driver - poll_or_select_with_delay(double time_to_wait) - poll_or_select() and are made virtual in preparation for the introduction of class Fl_Unix_System_Driver.
2022-01-31Consolidate timeout handling across platforms (#379)Albrecht Schlosser
Add Fl_Timeout class Move platform independent code of Fl::wait() to main part - basic timeout handling - Fl::run_checks() - Fl::run_idle() - Fl::idle() - waiting time calculation (next timeout) - remove platform dependent "screen driver" stuff
2022-01-07Re-organize cross-platform support for text input methods.ManoloFLTK
FLTK 1.3 supports complex text input methods (TIMs) for the 3 platforms (X11, Windows, macOS). This support has an interface with FLTK that is common for X11 and Windows, via (undocumented) functions fl_set_spot(), fl_set_status() and fl_reset_spot(). In contrast, and because it's been developed independently, the interface between the macOS TIM and FLTK 1.3 is completely different : static functions FL::insertion_point_location() and Fl::reset_marked_text(). The present change implements a single TIM/FLTK interface used by all platforms based on functions fl_set_spot() and fl_reset_spot(). The previous macOS-specific functions FL::insertion_point_location() and Fl::reset_marked_text() are maintained only for compatibility with 1.3 and deprecated.
2021-12-17Fix a tiny documentation bugAlbrecht Schlosser
2021-07-01Fix FL_MOUSEWHEEL event coordinates in subwindow (#210)Albrecht Schlosser
Issue #210: "Fl::event_x() & event_y() doesn't take into account embedded window's coords with Mouse wheel events" In fact the calculation of Fl::event_x() and Fl::event_y() used the wrong window coordinates if the event was sent to a subwindow.
2021-02-27Remove config_lib.h and runtime configuration infoAlbrecht Schlosser
... as discussed in fltk.coredev.
2020-11-07Simpler code and doc of Fl::screen_scale(int n, float factor)ManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- 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-06-24Avoid crash in Fl::next_window(win)Albrecht Schlosser
As documented, Fl::next_window(win) must only be called with a valid *shown* window. The old code would crash if the argument was NULL or the window was not shown. The new code avoids the crash, issues an error message, and returns NULL to the caller.
2020-01-31Update Fl::keyboard_screen_scaling()Albrecht Schlosser
- make the internal variable static - make it callable after fl_open_display() - document that it's currently only usable to switch scaling off
2020-01-31Fix typoAlbrecht Schlosser
2020-01-31Add Fl::keyboard_screen_scaling(int) to control recognition of ctrl/+/-/0/ManoloFLTK
2020-01-17Make Fl::screen_scale(int, float) functional also after initial window display.ManoloFLTK
2019-12-31Limiting file access for Fl_Preferences.Matthias Melcher
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
2019-09-15X11 platform: use Gnome printer dialog when the GTK library is available at ↵ManoloFLTK
run-time The code to determine whether the GTK library is available is now in Fl_X11_System_Driver::probe_for_GTK() called both by Fl_Printer::begin_job() and Fl_Native_File_Chooser. New Fl::option OPTION_PRINTER_USES_GTK allows to deactivate use of the Gnome print dialog. Minor change in Fl_Native_File_Chooser: GTK version 3 is searched before version 2, whereas the search order was the opposite before.
2019-03-27Correct typo in Doxygen doc of Fl::focus()ManoloFLTK
2018-12-27Fixing some minor lint, found by Pavel Shlyak using PVS studioMatthias Melcher
2018-08-30Doc only: better doc of recently added events: ↵Manolo Gouy
FL_SCREEN_CONFIGURATION_CHANGED, FL_FULLSCREEN,... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-23Remove the need to call fl_open_display() before using Fl::screen_scale(int, ↵Manolo Gouy
float). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13025 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-09Fix typo in Doxygen docManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-08Support for GUI scaling: add API to get/set the scaling factor value.Manolo Gouy
Also, define an FLTK event triggered when the scaling is changed and an option to disable the transient window showing the new scaling factor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_System_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_Screen_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_Window_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23Doxygen only: fixed all block comments starting with an asterisk to ↵Matthias Melcher
space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24Slightly improve the doc of Fl::reset_marked_text().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12931 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-24Add documentation for Fl::reset_marked_text() and ↵Manolo Gouy
Fl::insertion_point_location(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-22Add Fl::screen_scale(int) function to get the scaling factor value of a screen.Manolo Gouy
This allows to keep class Fl_Screen_Driver away from the public API. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-12Remove public member function Fl_Window_Driver *Fl_Window::driver() so class ↵Manolo Gouy
Fl_Window_Driver is not in FLTK public API. This function is replaced by static Fl_Window_Driver* Fl_Window_Driver::(const Fl_Window *win). The purpose is to have class Fl_Window_Driver outside from FLTK ABI. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-31Added Fl::menu_linespacing() to solve STR# 2927.Greg Ercolano
Method name follows Fl_Tree::linespacing(). Implemented similarly to Fl::scrollbar_size(), since its use crosses Fl_Menu_Item and 'menuwindow' classes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26Android: Avoids hiding and showing keyboard when focus changes from text ↵Matthias Melcher
input to text input git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26Android: Widgets can now request the on-screen keyboard when they get focus. ↵Matthias Melcher
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-16Fix whitespace and comments only.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-15Fixing Tabs, typos, and comments.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-20Remove Fl::run_also_windowless() and FL::wait_also_windowless() from planned ↵Manolo Gouy
public FLTK 1.4 API. These were introduced at r12647, that is, during development of the 1.4 API. These functions provided windowless support only on the MacOS platform, where this can be obtained without those functions. Windowless support on other platforms would require changing the event loop. There's no evidence from STR's there's a demand for windowless mode on other platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12680 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-17Documentation: fix inconsistency in doc of Fl::wait(double).Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12671 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10Documentation: separate the doc of the 2 versions of Fl::add_fd() as Doxygen ↵Manolo Gouy
mandates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12662 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-10Documentation: separate docs of Fl::wait() and Fl::wait(double) as Doxygen ↵Manolo Gouy
mandates. Also, for Fl::run_also_windowless() and Fl::wait_also_windowless(), mention that MacOS is a platform supporting the windowless mode and what happens with platforms that don't support it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09Replace "WIN32" with "_WIN32" or "Windows".Albrecht Schlosser
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08Move xxx_also_windowless member functions from Fl_System_Driver to ↵Manolo Gouy
Fl_Screen_Driver. Because these functions are related to Fl_Screen_Driver::wait(double) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-08Documentation: add \version info to new member functions.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-07STR#3450: Draw text with OpenGL using textures on all platforms.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-06Add support for detection and processing of clean program termination request.Manolo Gouy
The default handling of cmd-Q/Quit program under MacOS was to terminate the program if all its windows are closed without returning from FLTK's event loop. This was running against a strong design feature of FLTK that programs should always complete their event loop and return from main() when cleanly terminating. In the new code for the MacOS platform, cmd-Q/Quit program no longer terminates the program. Instead, the event loop is interrupted and a call to Fl::program_should_quit() allows to detect that program termination has been requested, if necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12647 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-19Add details to the doc of fl_open_callback().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12517 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19Convert the initialisation of global variables fl_local_shift, ↵Manolo Gouy
fl_local_meta, etc... using the driver approach. This avoids repeating the default values "Shift", "Meta", etc... for several platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-15Add missing #include "config_lib.h" in Fl.cxx.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12387 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28Fix code formatting and typos.Albrecht Schlosser
Added some braces around the bodies of one-statement for loops for clarity. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121