summaryrefslogtreecommitdiff
path: root/src/Fl_Choice.cxx
AgeCommit message (Collapse)Author
3 dayswi[maxim nikonov
2025-03-29Adding `FL_BEFORE_MENU` event to classes derived from `Fl_Menu_`Matthias Melcher
2024-08-27Adding horiizonatl and vertical label marginMatthias Melcher
- sizeof(Fl_Widget) not increased - label positions can be adjusted - try it out in test/label app - full support in FLUD
2024-08-14Adding Fl_Widget::label_image_spacing() (#1039)Matthias Melcher
- May need a better method name. - This makes the gap between the image in a label and the label text user settable. - Can be tested using test/label app
2024-06-26Fixes to Fl_Choice provided by Albrecht (#978)Greg Ercolano
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).
2023-07-12corrects default popup menu box type for Fl_Choice (#748)Matthias Melcher
2022-11-25Add "Oxy" scheme (STR 2675, STR 3477)Albrecht Schlosser
This commit is similar to the patch given in STR 3477, oxy_v5.diff: https://www.fltk.org/strfiles/3477/oxy_v5.diff ... with modifications, and updated to current FLTK code.
2022-11-22Refactor and simplify "arrow drawing" in widgetsAlbrecht Schlosser
"Arrows" in widgets are those GUI elements mostly represented by triangles pointing in a particular direction as in scrollbars, choice widgets, some menus, valuators and Fl_Counter widgets. The code has been simplified and standardized such that all these GUI elements are drawn identically per FLTK scheme. Widget authors no longer need to write code to calculate arrow sizes and draw polygons etc. Different schemes can and do implement different drawing functions. Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and src/Fl_Menu.cxx
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-12-07Complete fix for STR #3503 (Fl_Choice).Albrecht Schlosser
Fl_Choice::handle() needs to be fixed as well.
2016-08-30Bringing over fix [r11907] from 1.3 current to the porting branch.Greg Ercolano
Fixes STR# 3325 - fixes scheme oriented focus box drawing problems when Fl_Choice height is <20 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-29Use Fl::is_scheme() where appropriate.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10542 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
2009-09-16Fixed Fl_Choice contrast with light-on-dark settings (STR #2219).Albrecht Schlosser
Patch provided by Aaron M. Ucko, thanks. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6873 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-06Replaced all occurrences of the deprecated fl_clip() function byAlbrecht Schlosser
fl_push_clip(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6551 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-04-23First attempt at consistently using Fl_Font as a type for the font index and ↵Matthias Melcher
Fl_Font_Size as a type to measure font height (or rather size). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-24Flip the color of Fl_Choice to FL_BACKGROUND2_COLOR when there is noMichael R Sweet
scheme so the menu uses the same color as the background. Add -Dname[=value] documentation to fltk-config man page. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-24Tweak gtk+ drawing of Fl_Choice.Michael R Sweet
Add support for "-Dname" option in fltk-config. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-23Use FL_BACKGROUND2_COLOR for the standard Fl_Choice background instead ofMichael R Sweet
fl_lighter(color()), so that the previous look-n-feel is preserved. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5483 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
2005-02-06Fl_Choice now allows click selection like Fl_Menu_Button andMichael R Sweet
Fl_Menubar (STR #706) src/Fl_Choice.cxx: - Fl_Chocie::handle(): remove call to event_is_click(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4031 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-04Remove duplicate definitions and argument-hides-function warning.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-03Fl_Help_View::topline() incorrectly set the changed() flag (STRMichael R Sweet
#631) Fl_Choice::value() now supports NULL or -1 to deselect the current item (STR #637) More VC++ 6 project file fixes (STR #638) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-29Documentation updates (STR #365)Michael R Sweet
The value(const Fl_Menu_Item*) method was not implemented for Fl_Choice (STR #366) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3402 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
2004-02-26WIN32's scandir() emulation did not allocate enough memory forMichael R Sweet
directory names (STR #263) Fl::compose() did not handle special keys like backspace properly (STR #293) Fl_Choice did not clip its text when drawing using the plastic scheme (STR #287) Fl_Group incorrectly mapped the emacs CTRL keys to keyboard navigation (STR #228) Fl_File_Browser::load() didn't handle a NULL directory name (STR #266) 64-bit library fixes (STR #261, ) The Fl_Valuator::format() function did not limit the size of the number buffer (STR #268) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-08-24Fl_Text_Display/Editor did not disable the currentMichael R Sweet
selection when focus was shifted to another widget (STR #131) Fl_Choice didn't use the normal focus box when the plastic scheme was in use (STR #129) Fl_Text_Editor didn't use selection_color() consistently (STR #130) The fltk_forms, fltk_gl, and fltk_images DSO's and HP-UX shared libraries are now linked against the fltk shared library to provide complete dependency resolution (STR #118) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3081 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
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-08-09Move the rest of the image file formats (except for XBM and XPM) toMichael R Sweet
the fltk_images library; saves about 16k in the FLTK core library on my Intel system. Fix a memory leak bug in most of the fl_set_fonts*.cxx implementations; as a result, the Fl_Fontdesc structure now has a fontname member to old the human-readable font name. Lots of fixes for shadowed variables, etc. Use snprintf, strlcpy, and strlcat in more places. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-09Range check input to Fl_Choice::value(n).Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2497 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-11Redefine FL_ color values to use the color cube.Michael R Sweet
Add FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR, and FL_FOREGROUND_COLOR, and use them instead of FL_GRAY, FL_WHITE, and FL_BLACK, respectively. (FL_GRAY defined to FL_BACKGROUND_COLOR for back-compatibility) Add fl_rgb_color(uchar g) inline method to map 8-bit grayscale to 24-bit RGB color. Doco updates for all of this... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-26Improve appearance of Fl_Choice when scheme is set to plastic.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-25Fix Fl_Choice drawing bugs.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01Copyright updates...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-16Fix other widgets to use Fl::focus() instead of take_focus().Michael R Sweet
Add keyboard nav to Fl_Color_Chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-17Limit width of drop-down button in Fl_Choice widgets.Michael R Sweet
Fix tooltip bug where the wrong tooltip would be shown. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-03Update all non-text widgets that take keyboard focus to checkMichael R Sweet
Fl::visible_focus() before taking or accepting focus; this allows one to disable the new 1.1 keyboard focus stuff completely (not much sense allowing focus if you can't see it...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1679 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-09-29Tooltips, and more tooltips.Michael R Sweet
Fl_Browser_, Fl_Choice, and Fl_Input_ did not do the tooltip stuff. Fix write_properties so it writes tooltips properly from FLUID. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-04New draw_focus() methods.Michael R Sweet
Keyboard nav for choice, menu button. Updated Fl_Choice to draw like a combo box. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1553 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22Copyright 2001.Michael R Sweet
FLTK 1.0.11. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05OK, now version 1.0.9Michael R Sweet
Updated email addresses to point to fltk.org domain... Updated README and CHANGES files accordingly. Updated makeinclude and Makefile files to put -L../lib before the LDFLAGS/GLDFLAGS to avoid problem reported by Alexander. documentation/Makefile wasn't including makeinclude. Updated FLUID about window to show version 1.0.9. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25Updated copyright notices for all of the 1.0.x files.Michael R Sweet
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions) Added install rule to documentation directory. Dumped old packages directory; added traditional RPM spec file and EPM list file (that replace all of the packages stuff) The FLUID man page is now "fluid.1" for the formatted page and "fluid.man" for the non-formatted page, since only IRIX uses pack'd formatted man pages. Whew! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-03-16Added clipping suggested by Dmitry PotapovBill Spitzak
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-03-13Fixed alignment of Fl_Choice label with the text in the pop-up menuBill Spitzak
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@425 ea41ed52-d2ee-0310-a9c1-e6b18d33e121