summaryrefslogtreecommitdiff
path: root/src/Fl_Group.cxx
AgeCommit message (Collapse)Author
3 dayswipmaxim nikonov
2025-03-06Fl_Group: convert array of children to std::vectorAlbrecht Schlosser
Note: this is only a hidden implementation detail: all concerned variables are private, and the code is simplified (less error prone). Size of Fl_Group on 64-bit Linux: 168 -> 176 Bytes (+8 Bytes). test/group.cxx: test for Fl_Group::{add, insert, remove} etc.
2024-07-28Remove FL_AUTO_DELETE_EVENT featureMatthias Melcher
It's not ripe for release yet and possibly not even needed according to pyFLTK maintainers. Added: 8cffbd694106a2371d297caa008f2290185fed2f
2024-07-26Adds the FL_AUTO_DELETE_EVENT to suppress auto delete.Matthias Melcher
Language wrappers can have major issues with FLTK auto deleting all children of a group if a group is deleted. This event gives individual widget the opportunity to override auto delete.
2024-07-01Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)ManoloFLTK
This commit removes changes in class Fl_Group introduced in 1c6a0c1.
2024-06-29Wayland: fix interactive moving and resizing of a subwindow - cont'd (#987)ManoloFLTK
This fix requires to be able to recognize whether Fl_Wayland_Window_Driver::resize() is called by a resize operation of an encompassing widget or not. To do that, private static int variable group_resize_depth_ is added to class Fl_Group and an accessor to this variable is added to class Fl_Window_Driver.
2024-04-26Fix repositioning subwindows.Matthias Melcher
The commit f288aea from Feb. 23rd introduced a regression where children of subwindows were moved inside the subwindow when only the subwindow itself was supposed to move. 
2024-02-23Fix Fl_Group::resize() for groups w/o resizable() (#917)Albrecht Schlosser
Improve code comments to clarify which cases are handled in a code block and why this is done. Subwindows have some special needs.
2023-12-10Documentation: Improve doc comment for ~Fl_GroupKyriet
2023-09-02#718: Fixes drawing issues for Fl_TabsMatthias Melcher
Tabs were drawn incorrectly when children's box was not FL_NO_BOX Current solution is cleaned up and always redraws tabs area without leaving breadcrumbs behind
2023-01-02Fix a doxygen warning and improve "file list" contentsAlbrecht Schlosser
FL/Fl_Group.H: add `\brief` keyword src/Fl_Group.cxx: fix warning: the '#' in '#include' must be escaped
2022-11-20Fix Fl_Group::insert() and Fl_Scroll::on_move()Albrecht Schlosser
2022-11-17Fix rearranging children in Fl_Scroll (#546)Matthias Melcher
Implement Fl_Scroll::on_move() Fix indexing in Fl_Group::on_move()
2022-11-03Implement destructor of Fl_Scroll and fix inconsistenciesAlbrecht Schlosser
2022-11-01Added Fl_Group::on_insert/on_remove/on_move (#527)Matthias Melcher
2022-11-01Remove reversal of children in Fl_Group::clear()Albrecht Schlosser
See implementation note in src/Fl_Group.cxx: Fl_Group::clear().
2022-10-28Fix removal and deletion of the resizable() of Fl_GroupAlbrecht Schlosser
If the resizable() of an Fl_Group is deleted it is automatically removed from the group. New: to avoid dangling resizable() pointers the resizable widget is set to the group itself.
2022-01-08Remove obsolete (dead) code from Fl_Group.cxxAlbrecht Schlosser
This code had been inactive at least since Mar 29, 2018.
2021-05-25Add virtual int Fl_Group::delete_child(int n) (STR 3218)Albrecht Schlosser
This is a convenience method that does range checking (index n), removes the child given by index n from the group and deletes it.
2020-07-10Convert Fl_Group::array_ to union to better represent its behaviorRobert Schumacher
Amended by Albrecht: - rename union member variables as discussed - add comments to new array_ union members Fixes #96 Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
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-15Fix stale current_ pointer when deleting Fl_GroupAlbrecht Schlosser
If a user program accidentally deletes the "current" group, then the pointer would still point at the deleted widget. This commit prevents this and makes the Fl_Group's parent the current group. Fixes issue #88.
2020-05-08Replace Fl_Window_Driver::is_a_rescale() by Fl_Window::is_a_rescale()ManoloFLTK
so it can be called by any user code.
2020-03-11Remove CodeWarrior "support"Albrecht Schlosser
Metrowerks CodeWarrior was an ancient macOS compiler (discontinued since 2005) that defined the macro __MWERKS__. Code using this macro and several comments have been removed.
2020-01-23Remove unnecessary extern declarationManoloFLTK
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-04-12Remove unnecessary dependency on FL/Fl_Rect.H.Albrecht Schlosser
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary dependencies on Fl_Rect.H. Currently it is only needed to access the array returned by the protected method bounds(). Also clarified documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-30Minimal code edit, no functional change.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-29Refactor and simplify Fl_Group::resize().Albrecht Schlosser
I renamed variables (more consistent names), fixed code formatting, and refactored the code around the resizing of widgets. I put common code before and after the conditional '#if 1' that separated old code from new "much simpler code from Francois Ostiguy" as a comment in the existing code mentioned. Then I deactivated the old code and activated the new "much simpler" code. Tested, works well. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12813 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-28Replace static protected bool Fl_Window_Driver::is_a_rescale by a private ↵Manolo Gouy
static variable and a public getter. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-27Rename Fl_Window_Driver::in_resize_after_scale_change to 'is_a_rescale' ↵Manolo Gouy
which is more expressive. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25Rewrite Fl_Window_Driver::resize_after_scale_change() removing calls to ↵Manolo Gouy
Fl_Window::hide() and Fl_Window::show(). Windows are now rescaled with a call to Fl_Window::resize() which has been slightly modified. Static member variable bool Fl_Window_Driver::in_resize_after_scale_change is created, and is true if and only if Fl_Window::resize() is called by Fl_Window_Driver::resize_after_scale_change(). This new flag allows Fl_Window::resize() to perform correctly the rescaling of the window. Fl_Gl_Window::resize() and Fl_Double_Window::resize() also consult the value of the Fl_Window_Driver::in_resize_after_scale_change flag. The platform-specific Fl_WinAPI_Window_Driver::resize() and Fl_X11_Window_Driver::resize() also use the Fl_Window_Driver::in_resize_after_scale_change flag. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Introduce Fl_Group::bounds(), deprecate Fl_Group::sizes().Albrecht Schlosser
The new method Fl_Group::bounds() replaces Fl_Group::sizes() whose internal array structure was not documented. Fl_Group::bounds() uses the new and documented class Fl_Rect for its internal structure. src/Fl_Tile.cxx now uses bounds() instead of sizes(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12302 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-11Separated Fl_Input_Choice.H and Fl_Input_Choice.cxx (STR #2750).Albrecht Schlosser
As proposed in STR #2750 and #2752: only status quo, i.e.: - no new method Fl_Input_Choice::maximum_size(int) (STR #2750 and #2752) - no handling of FL_Down key to open menu (STR #2752) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-09Separated Fl_Spinner.H and Fl_Spinner.cxx (STR #2776).Albrecht Schlosser
Also removed deprecated (misspelled) method names mininum() and maxinum(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-27Improve label alignment docs and border case implementations.Albrecht Schlosser
Make clear that some alignment bit combinations are "illegal" and yield undefined behavior that can be changed without notice. Fix label alignment in some border cases where illegal bit combinations like FL_ALIGN_LEFT and FL_ALIGN_RIGHT or FL_ALIGN_TOP and FL_ALIGN_BOTTOM are both set, respectively. Todo: There appears to be inconsistent handling WRT these "illegal" cases, for instance with inside labels as opposed to outside labels, such that the behavior seems to be unpredictable. See test/label.cxx. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02Mac OS: support for high resolution OpenGL windows.Manolo Gouy
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941 are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added. The documentation explains in more detail how to write cross-platform FLTK code supporting high resolution OpenGL windows on retina displays. The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the ↵Manolo Gouy
mouse event position in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display. On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y(). The example/OpenGL3test demo program is modified to call these new functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-08-29Don't grab navkeys with modifiers, as the app may want them. STR #3104Lauri Kasanen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10261 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-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
2011-01-04Some minor doc changes to avoid doxygen warning.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8184 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-10-30Fixed label alignment (STR #2436)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30Fixed special handling for ISO back-tab keycode (STR #2369)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-12Optimized Fl_Group::clear() and Fl_Scroll::clear(). This speedsAlbrecht Schlosser
up mass deletes (lots of children in a group) significantly. See also STR #2409. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-08-31New method: Fl_Group::remove(int index) to speed up the removalAlbrecht Schlosser
of widgets if the widget's index is known. Thanks to Greg for the patch. See also STR #2409. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7693 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-08-24Fixed compiler warningsAlbrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7687 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-07Added new flags for label alignment: FL_LEFT_TOP, FL_RIGHT_TOP, ↵Matthias Melcher
FL_LEFT_BOTTOM, and FL_RIGHT_BOTTOM align outside labels first to the side, then to the top or botton, filling a gap in possible alignment. Also FL_ALIGN_TEXT_NEXT_TO_IMAGE and FL_ALIGN_IMAGE_NEXT_TO_TEXT which do just that, and finally FL_ALIGN_IMAGE_BACKDROP which renders the image in the background and draws the label on top. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7469 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