summaryrefslogtreecommitdiff
path: root/src/Fl_Button.cxx
AgeCommit message (Collapse)Author
44 hourswipmaxim nikonov
2025-12-01Add background (`bg`) attribute to table of boxtypesAlbrecht Schlosser
This is a first step to fix some background (re-)drawing issues in widgets. A new bit in the array of boxtypes can be used to determine if a particular boxtype uses a solid background (e.g. all FL_*_BOX types) or if the parent widget is responsible for drawing it (FL_NO_BOX and all FL_*_FRAME) types, and maybe more ... The old struct member `set` in the struct of boxtypes has been renamed to `flags` and is now used as a bit field. Except these changes, this first commit fixes the focus box drawing of specific boxtypes, as seen in unittest_schemes.cxx in the Fl_Check_Button with label "Check", and very likely more.
2025-07-15Fix: Redundant redeclaration of Fl_Shortcut fl_old_shortcut(const char*) (#1277)ManoloFLTK
2025-07-09Improve Fl_Button event handling documentation (#1267)Matthias Melcher
2024-12-11Fix drawing issue for checkbox buttons with bad box type (#1130)Matthias Melcher
2024-12-05Fix button down state when triggered by shortcut (#1145)dannye
The visual feedback is really important. I was not aware that my patch suppressed that. And for the state values, I find it best to get back to what 1.3 did at this point. `value` is essential for check boxes and radio and toggle buttons. On push buttons, it has really not much of a meaning.
2024-11-28Fix changed flag for radio buttons (#1146)dannye
2024-06-22Fix typo reported in fltk.generalAlbrecht Schlosser
... by Brian Larsen
2024-03-19Update dependencies, whitespace, and Fl_File_Chooser.cxxAlbrecht Schlosser
Rewrite src/Fl_File_Chooser.cxx from its .fl source file
2024-01-17Synchronize mouse and keyboard callbacks for Fl_Button (#877)Matthias Melcher
Keyboard behavior for button types was not consistent with mouse click behavior. This change avoids callbacks when pressed radio buttons are pressed again.
2024-01-17Restore original Fl_Button event behavior(#877)Matthias Melcher
Previous commits introduced too many changes to Fl_Button callbacks, creating problems in user apps. This is the base for a second much more specific fix to event flags.
2024-01-14#877L: Formatting, Unused variable.Matthias Melcher
2024-01-14#889: Fixes missing return statement.Matthias Melcher
2024-01-13#877: Fixes shortcut callbacks for Fl_ButtonMatthias Melcher
- this commit does rewrite some of the logic, hoping to make thing more, um, logical. The bits react mostly the same and hopefully as expected. Everything is documented in the Fl_Button ctor.
2023-09-03Adds compact buttons feature to create keypads.Matthias Melcher
See test/buttons for an example.
2023-01-05Add close buttons for individual tabs in Fl_Tabs (#628)Matthias Melcher
Add close buttons for Fl_Tabs Introducing callback reasons FLUID shows all FL_WHEN_... options Adding Fl_Tabs overflow types Improved test/tabs to show new features
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.
2018-07-20Added fallthru indication in Fl_Button::handle()Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12992 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-19Update docs related to buttons and update Fl_Check_Button.png.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10386 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-29Code readability -- No logic was changed.Greg Ercolano
o Adjusted /*FALLTHROUGH*/ comments for clarity o Added /* NOTREACHED */ comment for clarity o Brace cosmetics git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-07-24STR 2705: moved all inline constructors (that I could find) from header ↵Matthias Melcher
files into source files. Even though this breaks downward compatibility, it does make dynamic linking possible for all classes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26Fixed regression (in FLTK 1.3.0) that could clear a radio button byAlbrecht Schlosser
using the keyboard (space or shortcut) (STR #2748). This regression was introduced in svn r7826 and released with FLTK 1.3.0 (!) to add visual feedback for Fl_Button's using the keyboard (STR #2372). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-14Added visual indication for buttons activated by a keyboard shortcut (STR 2372Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30Fl_Button shortcut handling would crash if the widget was deleted in the ↵Matthias Melcher
callback. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-09Added new label alignments for image and text to Fluid.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-26Adding FALLTHROUGH label to a buch of case fallthroughs in order to make ↵Matthias Melcher
lint happy. STR #2285 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7162 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-20Mixed bag. Please see CHANGES.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-20Added Fl_Widget_Tracker in handle() methods etc. to avoid accessing widgetsAlbrecht Schlosser
after deletion (STR #1306). This is all I could find, but maybe there are more places in the code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-17STR#2106 fix:callback not called if radio button state changed from a ↵Fabien Costantini
shortcut but is called when changed with mouse. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6588 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-16Reverting this change that was intented for another branch, not trunk, sorry.Fabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6585 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-16patch from STR2026 for testingFabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-06Reverted other STR fix as it is not fully working yetFabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-06STR#2030 first increment: Added an unsupported directory to ide dir.Fabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16applied Duncan Gibson's documentation patch (WP3).Albrecht Schlosser
Docs look good, compiles okay. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6264 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-02-20STR 1719: fixed inconsistencies with FL_WHEN_NOT_CHANGEDMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6031 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-25src/Fl_Button.cxx:Michael R Sweet
- Fl_Button::draw(): Only use fl_contrast() on the label color when value() is non-zero. src/fl_color.cxx: - fl_contrast(): Require at least 1/3 (85) instead of 1/2 (127) for contrast against the background. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-23Check buttons did not redraw properly with box() set to FL_NO_BOXMichael R Sweet
(STR #1440) src/Fl_Button.cxx: - Fl_Button::value(): Use redraw_label() if box() is not set. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-17Implement new "gtk+" scheme which provides a Bluecurve look-n-feel.Michael R Sweet
Fix size and position of dialog controls in FLUID to match the HIG. Add "GTK+" scheme to the list of selectable schemes in FLUID. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5438 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-07-27More doco updates.Michael R Sweet
All of the core widgets now consistently set changed() before calling the callback function for a change in value; this allows programs to check the changed() state in a callback to see why they are being called (STR #475) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-28Bug fixes from Howard.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-11-11Don't popup menus or activate buttons when (SHIFT/CTRL/ALT/META) + spaceMichael R Sweet
is pressed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-10-10Fix focus box redraw bug for buttons with FL_NO_BOX.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-10-10Take focus when the user presses a shortcut.Michael R Sweet
Call the callback when the user clicks or drags in a readonly input field. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121