aboutsummaryrefslogtreecommitdiff
path: root/dw/widget.hh
AgeCommit message (Collapse)Author
2025-02-19Fix build on Solaris 10 and old gcc 4.0.1Claes Nästén
Remove extra semicolons and commas, as well as isinf() so it builds and runs on Solaris 10. Also add extra fixes for non C++11 courtesy of Sevan Janiyan, making Dillo compile and run on OS X 10.4 PowerPC with GCC 4.0.1 and 8.5. Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
2024-10-17Add support for aspect ratio in WidgetRodrigo Arias Mallo
Images should preserve their own aspect ratio, which is determined by the image buffer size, also known as the intrinsic size. Currently, when a child requests a requisition to be corrected by correctRequisition(), only the size was adjusted, ignoring the aspect ratio. The new Widget ratio variable holds the desired aspect ratio for the widget, and will only be taken into account when non-zero. In that case, then correcting the requisition, a naive algorithm tries to first increase the length of the small size to fill the preferred aspect ratio. In the case that it is not enough, the larger size is then decreased to fit the aspect ratio. And if that doesn't work either, the aspect ratio is not enforced and the widget will be distorted. There are special cases for correctRequisition() depending if the parent exists or not. The same approach is taken for both cases, but using the viewport size instead of the parent size.
2024-10-17Allow widgets to adjust new requisitionRodrigo Arias Mallo
When a widget calls the parent to correct its own requisition, let the child widget perform adjustments on the requisition. This allows images to control the height when the parent changes the width, so the image can preserve its own aspect ratio.
2024-10-17Improve comments in dw::core::WidgetRodrigo Arias Mallo
2024-07-27Add SVG support for currentColorRodrigo Arias Mallo
The currentColor special value for the fill and stroke attributes allows an image to follow the same foreground color of the surounding text.
2016-04-23GROWS: Fix rounding errors.Sebastian Geerken
2016-04-23GROWS: new options allowDecreaseWidth and allowDecreaseHeight for size ↵Sebastian Geerken
correction.
2016-04-13Removed Layout::queueQueueResizeList and optimized multiple (both nested and ↵Sebastian Geerken
sequential) queueResize.
2016-04-03WidgetReference: Widget::widgetReference.Sebastian Geerken
2016-01-09Widget::calcExtraSpace is only called for size, not for extremes.Sebastian Geerken
2016-01-09SRDOP: Extend Widget::calcExtraSpace and Widget::calcExtraSpaceImpl by ↵Sebastian Geerken
references.
2016-01-01SRDOP: Consider references and positions in Widget::getExtremes.Sebastian Geerken
2016-01-01SRDOP: Consider references and positions in Widget::sizeRequest.Sebastian Geerken
2015-12-28SRDOP: Fix endless recursion.Sebastian Geerken
2015-06-08SRDOP: Positions relative to multiple references; design now considers ↵Sebastian Geerken
handling conflicts.
2015-06-06SRDOP: Positions also for extremes.Sebastian Geerken
2015-05-21SRDOP: started implementation for Textblock.Sebastian Geerken
2015-05-20Size requisitions depending on positions (SRDOP): added method signatures.Sebastian Geerken
2015-01-23Interrupted drawing etc: cleanup.Sebastian Geerken
2015-01-23Same simplifications for Widget::getWidgetAtPoint as for Widget::draw before.Sebastian Geerken
2015-01-23Simplified interrupted drawing. (Mouse events will follow.)Sebastian Geerken
2015-01-08Merge with main repo.Sebastian Geerken
2015-01-05Extremes::adjustmentWidth may now (again) be used for extremes correction.Sebastian Geerken
2015-01-03Merge with main repo.Sebastian Geerken
2015-01-02Some more work on 'adjust_min_width' correction.Sebastian Geerken
2014-10-25Applied interruption (as used for drawing) also to Widget::getWidgetAtPoint. ↵Sebastian Geerken
(Still bugs\!)
2014-10-23Changed signature of Widget::draw and friends.Sebastian Geerken
2014-10-23Removed old Widget::draw (backward compatibility is not possible anyway).Sebastian Geerken
2014-10-23More work on drawing: interruptions work now halfway.Sebastian Geerken
2014-10-19Changes in drawing process: is now interruptable. (Some errors left.)Sebastian Geerken
2014-10-14Widget::stackingContextWidget; as well as some cleanup and debug messages.Sebastian Geerken
2014-09-25Some work on mouse events (getWidgetAtPoint).Sebastian Geerken
2014-09-23OOFAwareWidget::correctRequisitionByOOF: use splitHeightFun.Sebastian Geerken
2014-09-23More work on Widget::extraSpace.Sebastian Geerken
2014-09-22Cleaned up: Style::box*() -> Widget::box*().Sebastian Geerken
2014-09-15Z-Index and stacking contexts: start.Sebastian Geerken
2014-08-24First (since GROWS) work on absolute positions.Sebastian Geerken
2014-08-17Some corrections on recent work.Sebastian Geerken
2014-08-16Some cleanup.Sebastian Geerken
2014-08-10trim spacescorvid
...now that floats and grows are in the repo and I won't be making Sebastian's life difficult with a bunch of whitespace changes.
2014-08-02Implemented 'min-height' and 'max-height'.Sebastian Geerken
2014-08-02Implemented 'min-width' and 'max-width'.Sebastian Geerken
2014-07-24More work on tables; some reorganization.Sebastian Geerken
2014-07-21New dillorc option adjust_table_min_width.Sebastian Geerken
2014-07-20Fixed segfault with adjust_min_width set to YES.Sebastian Geerken
2014-07-18New dillorc option 'adjust_min_width'. Also fixed bug in textblock extremes ↵Sebastian Geerken
calculation.
2014-07-17Handling nested layouts (e. g. <button>), part 1.Sebastian Geerken
2014-07-07Removed widget flag HAS_CONTENTS.Sebastian Geerken
2014-07-07Removed widget flag USES_HINTS.Sebastian Geerken
2014-07-07Implemented Table::correctRequisitionOfChild.Sebastian Geerken