Dillo v3.1.1-46-g8a360e32
|
The base class of all dillo widgets. More...
#include <widget.hh>
Classes | |
class | WidgetImgRenderer |
Implementation which represents the whole widget. More... | |
Public Member Functions | |
void | setDeleteCallback (DW_Callback_t func, void *data) |
Widget () | |
~Widget () | |
bool | resizeQueued () |
bool | extremesQueued () |
bool | needsResize () |
bool | needsAllocate () |
bool | allocateQueued () |
bool | extremesChanged () |
bool | wasAllocated () |
void | setParent (Widget *parent) |
void | setQuasiParent (Widget *quasiParent) |
void | setGenerator (Widget *generator) |
style::Style * | getStyle () |
Allocation * | getAllocation () |
bool | inAllocation (int x, int y) |
int | boxOffsetX () |
int | boxRestWidth () |
int | boxDiffWidth () |
int | boxOffsetY () |
int | boxRestHeight () |
int | boxDiffHeight () |
virtual int | numSizeRequestReferences () |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). | |
virtual Widget * | sizeRequestReference (int index) |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). | |
virtual int | numGetExtremesReferences () |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). | |
virtual Widget * | getExtremesReference (int index) |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). | |
void | sizeRequest (Requisition *requisition, int numPos=0, Widget **references=NULL, int *x=NULL, int *y=NULL) |
This method is a wrapper for Widget::sizeRequestImpl(); it calls the latter only when needed. | |
void | getExtremes (Extremes *extremes, int numPos=0, Widget **references=NULL, int *x=NULL, int *y=NULL) |
Wrapper for Widget::getExtremesImpl(). | |
void | sizeAllocate (Allocation *allocation) |
Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed. | |
void | calcExtraSpace (int numPos, Widget **references, int *x, int *y) |
Calculates dw::core::Widget::extraSpace. | |
int | getAvailWidth (bool forceValue) |
Return available width including margin/border/padding (extraSpace?), not only the content width. | |
int | getAvailHeight (bool forceValue) |
Return available height including margin/border/padding (extraSpace?), not only the content height. | |
virtual bool | getAdjustMinWidth () |
void | correctRequisition (Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight) |
void | correctExtremes (Extremes *extremes, bool useAdjustmentWidth) |
int | calcWidth (style::Length cssValue, int refWidth, Widget *refWidget, int limitMinWidth, bool forceValue) |
Computes a width value in pixels from cssValue. | |
void | calcFinalWidth (style::Style *style, int refWidth, Widget *refWidget, int limitMinWidth, bool forceValue, int *finalWidth) |
int | calcHeight (style::Length cssValue, bool usePercentage, int refHeight, Widget *refWidget, bool forceValue) |
virtual int | applyPerWidth (int containerWidth, style::Length perWidth) |
virtual int | applyPerHeight (int containerHeight, style::Length perHeight) |
int | getMinWidth (Extremes *extremes, bool forceValue) |
Used to evaluate Widget::adjustMinWidth. | |
virtual bool | isBlockLevel () |
virtual bool | isPossibleContainer () |
void | containerSizeChanged () |
bool | intersects (Widget *refWidget, Rectangle *area, Rectangle *intersection) |
Calculates the intersection of the visible allocation (i. | |
virtual void | draw (View *view, Rectangle *area, DrawingContext *context)=0 |
Area is given in widget coordinates. | |
void | drawInterruption (View *view, Rectangle *area, DrawingContext *context) |
See Interrupted drawing for details. | |
virtual Widget * | getWidgetAtPoint (int x, int y, GettingWidgetAtPointContext *context) |
Widget * | getWidgetAtPointInterrupted (int x, int y, GettingWidgetAtPointContext *context) |
bool | buttonPress (EventButton *event) |
bool | buttonRelease (EventButton *event) |
bool | motionNotify (EventMotion *event) |
void | enterNotify (EventCrossing *event) |
void | leaveNotify (EventCrossing *event) |
virtual void | setStyle (style::Style *style) |
Change the style of a widget. | |
void | setBgColor (style::Color *bgColor) |
Set the background "behind" the widget, if it is not the background of the parent widget, e.g. | |
style::Color * | getBgColor () |
Get the actual background of a widget. | |
style::Color * | getFgColor () |
Get the actual foreground color of a widget. | |
void | drawBox (View *view, style::Style *style, Rectangle *area, int x, int y, int width, int height, bool inverse) |
Draw borders and background of a widget part, which allocation is given by (x, y, width, height) (widget coordinates). | |
void | drawWidgetBox (View *view, Rectangle *area, bool inverse) |
Draw borders and background of a widget. | |
void | drawSelected (View *view, Rectangle *area) |
void | setButtonSensitive (bool buttonSensitive) |
bool | isButtonSensitive () |
Widget * | getParent () |
Widget * | getContainer () |
Widget * | getTopLevel () |
Get the widget at the root of the tree, this widget is part from. | |
int | getLevel () |
Get the level of the widget within the tree. | |
int | getGeneratorLevel () |
Get the level of the widget within the tree, regarting the generators, not the parents. | |
Widget * | getNearestCommonAncestor (Widget *otherWidget) |
Get the widget with the highest level, which is a direct ancestor of widget1 and widget2. | |
WidgetReference * | getWidgetReference () |
void | setWidgetReference (WidgetReference *widgetReference) |
Widget * | getGenerator () |
Layout * | getLayout () |
void | scrollTo (HPosition hpos, VPosition vpos, int x, int y, int width, int height) |
void | getMarginArea (int *xMar, int *yMar, int *widthMar, int *heightMar) |
void | getBorderArea (int *xBor, int *yBor, int *widthBor, int *heightBor) |
void | getPaddingArea (int *xPad, int *yPad, int *widthPad, int *heightPad) |
Return the padding area (content plus padding). | |
virtual Iterator * | iterator (Content::Type mask, bool atEnd)=0 |
Return an iterator for this widget. | |
virtual void | removeChild (Widget *child) |
Public Member Functions inherited from lout::identity::IdentifiableObject | |
IdentifiableObject () | |
void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
int | getClassId () |
Returns the class identifier. | |
const char * | getClassName () |
Return the name, under which the class of this object was registered. | |
bool | instanceOf (int otherClassId) |
Returns, whether this class is an instance of the class, given by otherClassId, or of a sub class of this class. | |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
Static Public Member Functions | |
static void | setAdjustMinWidth (bool adjustMinWidth) |
static void | adjustHeight (int *height, bool allowDecreaseHeight, int ascent, int descent) |
Public Attributes | |
int | parentRef |
This value is defined by the parent widget, and used for incremential resizing. | |
Static Public Attributes | |
static int | CLASS_ID = -1 |
Protected Types | |
enum | Flags { RESIZE_QUEUED = 1 << 0 , EXTREMES_QUEUED = 1 << 1 , NEEDS_RESIZE = 1 << 2 , NEEDS_ALLOCATE = 1 << 3 , ALLOCATE_QUEUED = 1 << 4 , EXTREMES_CHANGED = 1 << 5 , WAS_ALLOCATED = 1 << 6 } |
Protected Member Functions | |
int | getHeight () |
int | getContentWidth () |
int | getContentHeight () |
StackingContextMgr * | getNextStackingContextMgr () |
void | printFlag (Flags f) |
void | setFlags (Flags f) |
void | unsetFlags (Flags f) |
void | queueDraw () |
void | queueDrawArea (int x, int y, int width, int height) |
void | queueResize (int ref, bool extremesChanged) |
virtual void | sizeRequestImpl (Requisition *requisition, int numPos, Widget **references, int *x, int *y) |
See Sizes of Dillo Widgets. | |
virtual void | sizeRequestSimpl (Requisition *requisition) |
Simple variant, to be implemented by widgets with sizes not depending on positions. | |
virtual void | getExtremesImpl (Extremes *extremes, int numPos, Widget **references, int *x, int *y) |
See Sizes of Dillo Widgets. | |
virtual void | getExtremesSimpl (Extremes *extremes) |
Simple variant, to be implemented by widgets with extremes not depending on positions. | |
virtual void | calcExtraSpaceImpl (int numPos, Widget **references, int *x, int *y) |
The actual implementation for calculating dw::core::Widget::extraSpace. | |
virtual void | sizeAllocateImpl (Allocation *allocation) |
See Sizes of Dillo Widgets. | |
virtual void | resizeDrawImpl () |
Called after sizeAllocateImpl() to redraw necessary areas. | |
virtual void | markSizeChange (int ref) |
See Sizes of Dillo Widgets. | |
virtual void | markExtremesChange (int ref) |
See Sizes of Dillo Widgets. | |
virtual int | getAvailWidthOfChild (Widget *child, bool forceValue) |
Computes the content width available of a child widget. | |
virtual int | getAvailHeightOfChild (Widget *child, bool forceValue) |
virtual void | correctRequisitionOfChild (Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight) |
void | correctReqWidthOfChild (Widget *child, Requisition *requisition, bool allowDecreaseWidth) |
void | correctReqHeightOfChild (Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseHeight) |
virtual void | correctExtremesOfChild (Widget *child, Extremes *extremes, bool useAdjustmentWidth) |
virtual void | containerSizeChangedForChildren () |
virtual bool | affectedByContainerSizeChange () |
virtual bool | affectsSizeChangeContainerChild (Widget *child) |
virtual bool | usesAvailWidth () |
Must be implemengted by a method returning true, when getAvailWidth() is called. | |
virtual bool | usesAvailHeight () |
Must be implemengted by a method returning true, when getAvailHeight() is called. | |
virtual void | notifySetAsTopLevel () |
This method is called after a widget has been set as the top of a widget tree. | |
virtual void | notifySetParent () |
This method is called after a widget has been added to a parent. | |
virtual bool | buttonPressImpl (EventButton *event) |
virtual bool | buttonReleaseImpl (EventButton *event) |
virtual bool | motionNotifyImpl (EventMotion *event) |
virtual void | enterNotifyImpl (EventCrossing *event) |
virtual void | leaveNotifyImpl (EventCrossing *event) |
char * | addAnchor (const char *name) |
char * | addAnchor (const char *name, int y) |
void | changeAnchor (char *name, int y) |
void | removeAnchor (char *name) |
void | setCursor (style::Cursor cursor) |
bool | selectionHandleEvent (SelectionState::EventType eventType, Iterator *it, int charPos, int linkNo, MousePositionEvent *event) |
Protected Member Functions inherited from lout::identity::IdentifiableObject | |
void | registerName (const char *className, int *classId) |
This method must be called in the constructor for the sub class. | |
Protected Attributes | |
WidgetImgRenderer * | widgetImgRenderer |
Allocation | allocation |
The current allocation: size and position, always relative to the canvas. | |
Layout * | layout |
style::Box | extraSpace |
Space around the margin box. | |
StackingContextMgr * | stackingContextMgr |
Set iff this widget constitutes a stacking context, as defined by CSS. | |
Widget * | stackingContextWidget |
The bottom-most ancestor (or this) for which stackingContextMgr is set. | |
Private Member Functions | |
void | queueResize (int ref, bool extremesChanged, bool fast) |
This method should be called, when a widget changes its size. | |
void | queueResizeFast (int ref, bool extremesChanged) |
bool | resizeIdleEntered () |
void | enterQueueResize () |
void | leaveQueueResize () |
bool | queueResizeEntered () |
void | enterSizeAllocate () |
void | leaveSizeAllocate () |
bool | sizeAllocateEntered () |
void | enterSizeRequest () |
void | leaveSizeRequest () |
bool | sizeRequestEntered () |
void | enterGetExtremes () |
void | leaveGetExtremes () |
bool | getExtremesEntered () |
Private Attributes | |
Widget * | parent |
The parent widget, NULL for top-level widgets. | |
Widget * | quasiParent |
... | |
Widget * | generator |
The generating widget, NULL for top-level widgets, or if not set; in the latter case, the effective generator (see getGenerator) is the parent. | |
Widget * | container |
The containing widget, equivalent to the "containing
block" defined by CSS. | |
WidgetReference * | widgetReference |
style::Style * | style |
Flags | flags |
Requisition | requisition |
Size_request() stores the result of the last call of size_request_impl(). | |
SizeParams | requisitionParams |
Extremes | extremes |
Analogue to dw::core::Widget::requisition. | |
SizeParams | extremesParams |
style::Color * | bgColor |
See dw::core::Widget::setBgColor(). | |
bool | buttonSensitive |
See dw::core::Widget::setButtonSensitive(). | |
bool | buttonSensitiveSet |
See dw::core::Widget::setButtonSensitive(). | |
void * | deleteCallbackData |
DW_Callback_t | deleteCallbackFunc |
Static Private Attributes | |
static bool | adjustMinWidth = true |
Friends | |
class | Layout |
The base class of all dillo widgets.
|
protected |
Enumerator | |
---|---|
RESIZE_QUEUED |
|
EXTREMES_QUEUED |
|
NEEDS_RESIZE | Set, when dw::core::Widget::requisition is not up to date anymore.
|
NEEDS_ALLOCATE | Only used internally, set to enforce size allocation. In some cases, the size of a widget remains the same, but the children are allocated at different positions and in different sizes, so that a simple comparison of old and new allocation is insufficient. Therefore, this flag is set (indirectly, as ALLOCATE_QUEUED) in queueResize. |
ALLOCATE_QUEUED |
|
EXTREMES_CHANGED | Set, when dw::core::Widget::extremes is not up to date anymore.
|
WAS_ALLOCATED | Set, when a widget was already once allocated,. The dw::Image widget uses this flag, see dw::Image::setBuffer. |
dw::core::Widget::Widget | ( | ) |
Definition at line 68 of file widget.cc.
References allocation, dw::core::Allocation::ascent, bgColor, dw::core::style::Box::bottom, buttonSensitive, buttonSensitiveSet, CLASS_ID, container, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_CREATE, DBG_OBJ_SET_PTR, deleteCallbackData, deleteCallbackFunc, dw::core::Allocation::descent, extraSpace, EXTREMES_CHANGED, extremesParams, flags, generator, layout, dw::core::style::Box::left, NEEDS_RESIZE, parent, quasiParent, lout::identity::IdentifiableObject::registerName(), requisitionParams, dw::core::style::Box::right, setWidgetReference(), stackingContextMgr, style, dw::core::style::Box::top, widgetImgRenderer, dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::Textblock::addLine(), dw::Textblock::addParbreak(), dw::Table::calcAvailWidthForDescendant(), dw::Table::drawLevel(), dw::Table::forceCalcCellSizes(), dw::Table::getWidgetAtPointLevel(), dw::Textblock::getWidgetAtPointLevel(), dw::Textblock::getWidgetRegardingBorderForLine(), dw::Textblock::handOverBreak(), dw::Textblock::wrapWordInFlow(), and dw::Textblock::wrapWordOofRef().
dw::core::Widget::~Widget | ( | ) |
Definition at line 104 of file widget.cc.
References dw::core::style::StyleAttrs::backgroundImage, DBG_OBJ_DELETE, deleteCallbackData, deleteCallbackFunc, layout, parent, removeChild(), dw::core::style::StyleImage::removeExternalImgRenderer(), dw::core::Layout::removeWidget(), stackingContextMgr, style, dw::core::style::Style::unref(), and widgetImgRenderer.
|
inlineprotected |
Definition at line 383 of file widget.hh.
References dw::core::Layout::addAnchor(), and layout.
|
inlineprotected |
Definition at line 386 of file widget.hh.
References dw::core::Layout::addAnchor(), and layout.
|
static |
Definition at line 1004 of file widget.cc.
Referenced by correctReqHeightOfChild(), and correctRequisition().
|
protectedvirtual |
Definition at line 433 of file widget.cc.
References affectsSizeChangeContainerChild(), lout::misc::boolToStr(), container, DBG_OBJ_ENTER0, DBG_OBJ_LEAVE_VAL, getStyle(), dw::core::style::StyleAttrs::height, dw::core::style::isAbsLength(), dw::core::style::isPerLength(), dw::core::style::LENGTH_AUTO, usesAvailHeight(), usesAvailWidth(), and dw::core::style::StyleAttrs::width.
Referenced by containerSizeChanged().
|
protectedvirtual |
Definition at line 467 of file widget.cc.
References lout::misc::boolToStr(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, getStyle(), dw::core::style::StyleAttrs::height, dw::core::style::isAbsLength(), dw::core::style::isPerLength(), dw::core::style::LENGTH_AUTO, usesAvailHeight(), usesAvailWidth(), and dw::core::style::StyleAttrs::width.
Referenced by affectedByContainerSizeChange().
|
inline |
Definition at line 459 of file widget.hh.
References ALLOCATE_QUEUED, and flags.
Referenced by dw::core::Layout::resizeIdle().
|
virtual |
Reimplemented in dw::AlignedTableCell, dw::SimpleTableCell, and dw::Table.
Definition at line 1680 of file widget.cc.
References boxDiffHeight(), and dw::core::style::multiplyWithPerLength().
Referenced by calcHeight(), getAvailHeight(), and getAvailHeightOfChild().
|
virtual |
Reimplemented in dw::AlignedTableCell, dw::SimpleTableCell, and dw::Table.
Definition at line 1674 of file widget.cc.
References boxDiffWidth(), and dw::core::style::multiplyWithPerLength().
Referenced by calcWidth(), dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), and dw::core::ui::ComplexButtonResource::correctRequisitionOfChild().
|
inline |
Definition at line 486 of file widget.hh.
References boxOffsetY(), and boxRestHeight().
Referenced by applyPerHeight(), calcHeight(), dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), getAvailHeight(), getAvailHeightOfChild(), getContentHeight(), and dw::Table::sizeRequestSimpl().
|
inline |
Definition at line 481 of file widget.hh.
References boxOffsetX(), and boxRestWidth().
Referenced by dw::Table::actuallyCalcCellSizes(), applyPerWidth(), dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), dw::Textblock::calcLineBreakWidth(), calcWidth(), dw::tablecell::correctAvailWidthOfChild(), dw::tablecell::correctCorrectedRequisitionOfChild(), dw::Textblock::getAvailWidthOfChild(), getAvailWidthOfChild(), getContentWidth(), dw::Ruler::getExtremesSimpl(), dw::Table::getExtremesSimpl(), dw::Textblock::getExtremesSimpl(), dw::SimpleContainer::getExtremesSimpl(), dw::Textblock::getGeneratorWidth(), dw::SimpleContainer::sizeAllocateImpl(), dw::Textblock::sizeRequestImpl(), dw::Ruler::sizeRequestSimpl(), dw::Table::sizeRequestSimpl(), and dw::SimpleContainer::sizeRequestSimpl().
|
inline |
Definition at line 477 of file widget.hh.
References dw::core::style::StyleAttrs::boxOffsetX(), extraSpace, getStyle(), and dw::core::style::Box::left.
Referenced by dw::Textblock::addLine(), boxDiffWidth(), dw::Textblock::calcLineBreakWidth(), dw::Textblock::calcSizeOfWidgetInFlow(), dw::oof::OOFPosAbsMgr::containerBoxOffsetX(), dw::Textblock::TextblockIterator::getAllocation(), dw::Table::sizeAllocateImpl(), dw::SimpleContainer::sizeAllocateImpl(), dw::Textblock::wrapWordInFlow(), and dw::Textblock::wrapWordOofRef().
|
inline |
Definition at line 482 of file widget.hh.
References dw::core::style::StyleAttrs::boxOffsetY(), extraSpace, getStyle(), and dw::core::style::Box::top.
Referenced by boxDiffHeight(), dw::oof::OOFPosAbsMgr::containerBoxOffsetY(), dw::Table::sizeAllocateImpl(), dw::SimpleContainer::sizeAllocateImpl(), dw::Textblock::sizeRequestImpl(), dw::Ruler::sizeRequestSimpl(), and dw::SimpleContainer::sizeRequestSimpl().
|
inline |
Definition at line 484 of file widget.hh.
References dw::core::style::Box::bottom, dw::core::style::StyleAttrs::boxRestHeight(), extraSpace, and getStyle().
Referenced by boxDiffHeight(), dw::oof::OOFPosAbsMgr::containerBoxRestHeight(), dw::oof::OOFFloatsMgr::getSize(), dw::SimpleContainer::sizeAllocateImpl(), dw::Textblock::sizeRequestImpl(), dw::Ruler::sizeRequestSimpl(), and dw::SimpleContainer::sizeRequestSimpl().
|
inline |
Definition at line 479 of file widget.hh.
References dw::core::style::StyleAttrs::boxRestWidth(), extraSpace, getStyle(), and dw::core::style::Box::right.
Referenced by dw::Textblock::addLine(), boxDiffWidth(), dw::Textblock::calcLineBreakWidth(), dw::Textblock::calcSizeOfWidgetInFlow(), dw::oof::OOFPosAbsMgr::containerBoxRestWidth(), and dw::oof::OOFFloatsMgr::getSize().
bool dw::core::Widget::buttonPress | ( | EventButton * | event | ) |
Definition at line 1201 of file widget.cc.
References buttonPressImpl().
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Image, dw::Textblock, and dw::core::ui::Embed.
Definition at line 1987 of file widget.cc.
Referenced by buttonPress().
bool dw::core::Widget::buttonRelease | ( | EventButton * | event | ) |
Definition at line 1206 of file widget.cc.
References buttonReleaseImpl().
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Image, and dw::Textblock.
Definition at line 1992 of file widget.cc.
Referenced by buttonRelease().
void dw::core::Widget::calcExtraSpace | ( | int | numPos, |
Widget ** | references, | ||
int * | x, | ||
int * | y | ||
) |
Calculates dw::core::Widget::extraSpace.
Delegated to dw::core::Widget::calcExtraSpaceImpl. Called both from dw::core::Widget::sizeRequest and dw::core::Widget::getExtremes.
Definition at line 1085 of file widget.cc.
References dw::core::style::Box::bottom, calcExtraSpaceImpl(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM, extraSpace, dw::core::style::Box::left, dw::core::style::Box::right, and dw::core::style::Box::top.
Referenced by sizeRequest().
|
protectedvirtual |
The actual implementation for calculating dw::core::Widget::extraSpace.
The implementation gets a clean value of dw::core::Widget::extraSpace, which is only corrected. To make sure all possible influences are considered, the implementation of the base class should be called, too.
Definition at line 1661 of file widget.cc.
Referenced by calcExtraSpace().
void dw::core::Widget::calcFinalWidth | ( | style::Style * | style, |
int | refWidth, | ||
Widget * | refWidget, | ||
int | limitMinWidth, | ||
bool | forceValue, | ||
int * | finalWidth | ||
) |
Definition at line 927 of file widget.cc.
References calcWidth(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSGF, dw::core::style::StyleAttrs::maxWidth, dw::core::style::StyleAttrs::minWidth, style, and dw::core::style::StyleAttrs::width.
Referenced by correctRequisition(), correctReqWidthOfChild(), getAvailWidth(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), and getAvailWidthOfChild().
int dw::core::Widget::calcHeight | ( | style::Length | cssValue, |
bool | usePercentage, | ||
int | refHeight, | ||
Widget * | refWidget, | ||
bool | forceValue | ||
) |
Definition at line 958 of file widget.cc.
References dw::core::style::absLengthVal(), applyPerHeight(), boxDiffHeight(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSGF, getAvailHeight(), dw::core::style::isAbsLength(), dw::core::style::isPerLength(), lout::misc::max(), and dw::core::style::perLengthVal_useThisOnlyForDebugging().
Referenced by correctReqHeightOfChild(), correctRequisition(), and dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild().
int dw::core::Widget::calcWidth | ( | style::Length | cssValue, |
int | refWidth, | ||
Widget * | refWidget, | ||
int | limitMinWidth, | ||
bool | forceValue | ||
) |
Computes a width value in pixels from cssValue.
If cssValue is absolute, the absolute value is used. If cssValue is relative, then it is applied to refWidth. Otherwise, -1 is used.
In any case, the returned value is clamped so that is not smaller than limitMinWidth.
Definition at line 883 of file widget.cc.
References dw::core::style::absLengthVal(), applyPerWidth(), boxDiffWidth(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSGF, getAvailWidth(), dw::core::style::isAbsLength(), dw::core::style::isPerLength(), lout::misc::max(), and dw::core::style::perLengthVal_useThisOnlyForDebugging().
Referenced by calcFinalWidth(), correctExtremes(), correctExtremesOfChild(), and getAvailWidthOfChild().
|
inlineprotected |
Definition at line 389 of file widget.hh.
References dw::core::Layout::changeAnchor(), and layout.
Referenced by dw::Textblock::sizeAllocateImpl().
void dw::core::Widget::containerSizeChanged | ( | ) |
Definition at line 408 of file widget.cc.
References affectedByContainerSizeChange(), container, containerSizeChangedForChildren(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, extremesChanged(), extremesQueued(), needsResize(), queueResizeFast(), and resizeQueued().
Referenced by dw::core::Layout::containerSizeChanged(), dw::oof::OOFFloatsMgr::containerSizeChangedForChildren(), dw::Textblock::containerSizeChangedForChildren(), containerSizeChangedForChildren(), dw::oof::OOFAwareWidget::oofSizeChanged(), and dw::Textblock::oofSizeChanged().
|
protectedvirtual |
Reimplemented in dw::Bullet, dw::Image, dw::Ruler, dw::Table, dw::Textblock, and dw::core::ui::Embed.
Definition at line 497 of file widget.cc.
References containerSizeChanged(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, dw::core::Iterator::getContent(), iterator(), dw::core::Iterator::next(), dw::core::Iterator::unref(), dw::core::Content::widget, dw::core::Content::WIDGET_IN_FLOW, and dw::core::Content::WIDGET_OOF_CONT.
Referenced by containerSizeChanged().
void dw::core::Widget::correctExtremes | ( | Extremes * | extremes, |
bool | useAdjustmentWidth | ||
) |
Definition at line 821 of file widget.cc.
References calcWidth(), dw::core::Layout::canvasHeightGreater, container, correctExtremesOfChild(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, extremes, getMinWidth(), getStyle(), layout, dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, dw::core::Extremes::minWidthIntrinsic, parent, quasiParent, dw::core::Layout::viewportWidth, and dw::core::Layout::vScrollbarThickness.
Referenced by dw::Ruler::getExtremesSimpl(), dw::Table::getExtremesSimpl(), dw::Textblock::getExtremesSimpl(), dw::SimpleContainer::getExtremesSimpl(), and dw::core::ui::Embed::getExtremesSimpl().
|
protectedvirtual |
Reimplemented in dw::core::ui::Embed.
Definition at line 1911 of file widget.cc.
References calcWidth(), container, correctExtremesOfChild(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, extremes, getMinWidth(), getStyle(), dw::core::style::StyleAttrs::maxWidth, dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::style::StyleAttrs::minWidth, dw::core::Extremes::minWidth, dw::core::Extremes::minWidthIntrinsic, parent, quasiParent, and dw::core::style::StyleAttrs::width.
Referenced by correctExtremes(), dw::AlignedTableCell::correctExtremesOfChild(), dw::SimpleTableCell::correctExtremesOfChild(), correctExtremesOfChild(), and dw::core::ui::Embed::correctExtremesOfChildNoRec().
|
protected |
Definition at line 1867 of file widget.cc.
References adjustHeight(), dw::core::Requisition::ascent, lout::misc::boolToStr(), calcHeight(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, dw::core::Requisition::descent, getStyle(), dw::core::style::StyleAttrs::height, dw::core::style::StyleAttrs::maxHeight, dw::core::style::StyleAttrs::minHeight, quasiParent, requisition, and dw::core::Requisition::width.
Referenced by dw::core::ui::Embed::correctReqHeightOfChildNoRec(), and correctRequisitionOfChild().
void dw::core::Widget::correctRequisition | ( | Requisition * | requisition, |
void(*)(int, int *, int *) | splitHeightFun, | ||
bool | allowDecreaseWidth, | ||
bool | allowDecreaseHeight | ||
) |
Definition at line 744 of file widget.cc.
References adjustHeight(), dw::core::Requisition::ascent, lout::misc::boolToStr(), calcFinalWidth(), calcHeight(), dw::core::Layout::canvasHeightGreater, correctRequisitionOfChild(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, dw::core::Requisition::descent, getMinWidth(), getStyle(), layout, parent, quasiParent, requisition, dw::core::Layout::viewportHeight, dw::core::Layout::viewportWidth, dw::core::Layout::vScrollbarThickness, and dw::core::Requisition::width.
Referenced by dw::Table::actuallyCalcCellSizes(), dw::Textblock::sizeRequestImpl(), dw::Table::sizeRequestSimpl(), dw::SimpleContainer::sizeRequestSimpl(), and dw::core::ui::Embed::sizeRequestSimpl().
|
protectedvirtual |
Reimplemented in dw::core::ui::Embed.
Definition at line 1810 of file widget.cc.
References dw::core::Requisition::ascent, lout::misc::boolToStr(), container, correctReqHeightOfChild(), correctRequisitionOfChild(), correctReqWidthOfChild(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, dw::core::Requisition::descent, parent, quasiParent, requisition, and dw::core::Requisition::width.
Referenced by correctRequisition(), dw::AlignedTableCell::correctRequisitionOfChild(), dw::SimpleTableCell::correctRequisitionOfChild(), and correctRequisitionOfChild().
|
protected |
Definition at line 1846 of file widget.cc.
References dw::core::Requisition::ascent, lout::misc::boolToStr(), calcFinalWidth(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, dw::core::Requisition::descent, getMinWidth(), getStyle(), quasiParent, requisition, and dw::core::Requisition::width.
Referenced by correctRequisitionOfChild(), and dw::core::ui::Embed::correctReqWidthOfChildNoRec().
|
pure virtual |
Area is given in widget coordinates.
Implemented in dw::Bullet, dw::Image, dw::oof::OOFAwareWidget, dw::Ruler, dw::SimpleContainer, and dw::core::ui::Embed.
Referenced by dw::oof::OOFPositionedMgr::draw(), dw::SimpleContainer::draw(), dw::core::Layout::draw(), dw::core::StackingContextMgr::draw(), dw::oof::OOFFloatsMgr::drawFloats(), drawInterruption(), and dw::Textblock::drawLine().
void dw::core::Widget::drawBox | ( | View * | view, |
style::Style * | style, | ||
Rectangle * | area, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
bool | inverse | ||
) |
Draw borders and background of a widget part, which allocation is given by (x, y, width, height) (widget coordinates).
area is given in widget coordinates.
Definition at line 1388 of file widget.cc.
References allocation, dw::core::style::StyleAttrs::backgroundColor, dw::core::style::StyleAttrs::borderWidth, dw::core::style::Box::bottom, dw::core::style::drawBackground(), dw::core::style::drawBorder(), getPaddingArea(), dw::core::Rectangle::height, layout, dw::core::style::Box::left, dw::core::style::StyleAttrs::margin, dw::core::style::Box::right, style, dw::core::style::Box::top, dw::core::Rectangle::width, dw::core::Rectangle::x, dw::core::Allocation::x, dw::core::Rectangle::y, and dw::core::Allocation::y.
Referenced by dw::Table::drawLevel(), dw::Textblock::drawLine(), and dw::Textblock::drawWord().
void dw::core::Widget::drawInterruption | ( | View * | view, |
Rectangle * | area, | ||
DrawingContext * | context | ||
) |
See Interrupted drawing for details.
Definition at line 201 of file widget.cc.
References dw::core::StackingProcessingContext::addWidgetProcessedAsInterruption(), draw(), dw::core::DrawingContext::getToplevelArea(), intersects(), layout, and dw::core::Layout::topLevel.
Referenced by dw::Textblock::drawLevel().
Draw borders and background of a widget.
area is given in widget coordinates.
Definition at line 1429 of file widget.cc.
References allocation, dw::core::style::StyleAttrs::backgroundColor, bgColor, dw::core::style::drawBackground(), dw::core::style::drawBorder(), dw::core::Layout::getBgColor(), getMarginArea(), getPaddingArea(), dw::core::Rectangle::height, layout, parent, style, dw::core::Rectangle::width, dw::core::Rectangle::x, dw::core::Allocation::x, dw::core::Rectangle::y, and dw::core::Allocation::y.
Referenced by dw::Ruler::draw(), dw::SimpleContainer::draw(), dw::core::ui::Embed::draw(), and dw::oof::OOFAwareWidget::drawLevel().
|
inlineprivate |
Definition at line 441 of file widget.hh.
References dw::core::Layout::getExtremesCounter, and layout.
Referenced by getExtremes().
void dw::core::Widget::enterNotify | ( | EventCrossing * | event | ) |
Definition at line 1216 of file widget.cc.
References enterNotifyImpl().
Referenced by dw::core::Layout::enterNotify(), and dw::core::Layout::moveToWidget().
|
protectedvirtual |
Reimplemented in dw::Image, dw::Textblock, and dw::core::ui::Embed.
Definition at line 2002 of file widget.cc.
References getStyle(), dw::core::style::Tooltip::onEnter(), and dw::core::style::StyleAttrs::x_tooltip.
Referenced by enterNotify(), and dw::core::ui::Embed::enterNotifyImpl().
|
inlineprivate |
Definition at line 429 of file widget.hh.
References layout, and dw::core::Layout::queueResizeCounter.
Referenced by queueResize().
|
inlineprivate |
Definition at line 433 of file widget.hh.
References layout, and dw::core::Layout::sizeAllocateCounter.
Referenced by sizeAllocate().
|
inlineprivate |
Definition at line 437 of file widget.hh.
References layout, and dw::core::Layout::sizeRequestCounter.
Referenced by sizeRequest().
|
inline |
Definition at line 460 of file widget.hh.
References EXTREMES_CHANGED, and flags.
Referenced by dw::Textblock::affectsSizeChangeContainerChild(), dw::Table::calcCellSizes(), containerSizeChanged(), getExtremes(), dw::oof::OOFAwareWidget::oofSizeChanged(), dw::Textblock::oofSizeChanged(), queueResize(), queueResize(), and queueResizeFast().
|
inline |
Definition at line 456 of file widget.hh.
References EXTREMES_QUEUED, and flags.
Referenced by dw::Textblock::affectsSizeChangeContainerChild(), dw::Table::calcCellSizes(), containerSizeChanged(), getExtremes(), queueResize(), and dw::core::Layout::resizeIdle().
|
inlinevirtual |
Reimplemented in dw::AlignedTableCell, dw::Image, dw::SimpleTableCell, and dw::Table.
Definition at line 518 of file widget.hh.
References adjustMinWidth.
Referenced by getMinWidth().
|
inline |
Definition at line 470 of file widget.hh.
References allocation.
Referenced by dw::oof::OOFPositionedMgr::doChildrenExceedContainer(), dw::oof::OOFPositionedMgr::generatorPosX(), dw::oof::OOFPositionedMgr::generatorPosY(), dw::core::TextIterator::getAllocation(), dw::oof::OOFAwareWidget::OOFAwareWidgetIterator::getAllocationOOF(), dw::oof::OOFFloatsMgr::OOFFloatsMgr(), dw::oof::OOFPositionedMgr::OOFPositionedMgr(), dw::core::Layout::processMouseEvent(), and dw::Textblock::sizeAllocateImpl().
int dw::core::Widget::getAvailHeight | ( | bool | forceValue | ) |
Return available height including margin/border/padding (extraSpace?), not only the content height.
Definition at line 691 of file widget.cc.
References dw::core::style::absLengthVal(), applyPerHeight(), boxDiffHeight(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, getAvailHeightOfChild(), getStyle(), dw::core::style::isAbsLength(), dw::core::style::isPerLength(), layout, parent, dw::core::style::perLengthVal_useThisOnlyForDebugging(), quasiParent, and dw::core::Layout::viewportHeight.
Referenced by calcHeight(), dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), dw::core::ui::ComplexButtonResource::correctRequisitionOfChild(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), dw::core::ui::ComplexButtonResource::getAvailHeightOfChild(), getAvailHeightOfChild(), dw::oof::OOFPosRelMgr::getChildPosY(), dw::oof::OOFPosAbsLikeMgr::getSize(), and dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren().
|
protectedvirtual |
Reimplemented in dw::Textblock, and dw::core::ui::Embed.
Definition at line 1753 of file widget.cc.
References dw::core::style::absLengthVal(), applyPerHeight(), boxDiffHeight(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, getAvailHeight(), getAvailHeightOfChild(), getStyle(), dw::core::style::StyleAttrs::height, dw::core::style::isAbsLength(), dw::core::style::isPerLength(), dw::core::style::LENGTH_AUTO, lout::misc::max(), parent, dw::core::style::perLengthVal_useThisOnlyForDebugging(), and quasiParent.
Referenced by getAvailHeight(), and getAvailHeightOfChild().
int dw::core::Widget::getAvailWidth | ( | bool | forceValue | ) |
Return available width including margin/border/padding (extraSpace?), not only the content width.
If the widget has a parent or a quasiParent, the width computation is delegated to the parent first, or the quasiParent later.
Definition at line 649 of file widget.cc.
References calcFinalWidth(), dw::core::Layout::canvasHeightGreater, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, getAvailWidthOfChild(), getStyle(), layout, parent, quasiParent, dw::core::Layout::viewportWidth, and dw::core::Layout::vScrollbarThickness.
Referenced by dw::Table::actuallyCalcCellSizes(), dw::Textblock::addWord(), calcWidth(), dw::tablecell::correctAvailWidthOfChild(), dw::tablecell::correctCorrectedRequisitionOfChild(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), dw::Textblock::getAvailWidthOfChild(), dw::core::ui::ComplexButtonResource::getAvailWidthOfChild(), getAvailWidthOfChild(), dw::oof::OOFPosRelMgr::getChildPosX(), dw::oof::OOFPosAbsLikeMgr::getSize(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), dw::Textblock::sizeRequestImpl(), and dw::Ruler::sizeRequestSimpl().
|
protectedvirtual |
Computes the content width available of a child widget.
child | The child widget of which the available width will be computed. |
forceValue | If true, computes the width of the child with value "auto". Otherwise, it wont. |
Reimplemented in dw::Textblock, and dw::core::ui::Embed.
Definition at line 1696 of file widget.cc.
References boxDiffWidth(), calcFinalWidth(), calcWidth(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, getAvailWidth(), getAvailWidthOfChild(), getStyle(), dw::core::style::LENGTH_AUTO, lout::misc::max(), dw::core::style::StyleAttrs::maxWidth, dw::core::style::StyleAttrs::minWidth, parent, quasiParent, and dw::core::style::StyleAttrs::width.
Referenced by getAvailWidth(), and getAvailWidthOfChild().
style::Color * dw::core::Widget::getBgColor | ( | ) |
Get the actual background of a widget.
Definition at line 1348 of file widget.cc.
References dw::core::style::StyleAttrs::backgroundColor, bgColor, dw::core::Layout::getBgColor(), layout, parent, and style.
Referenced by a_Html_image_new(), dw::Textblock::drawSpace(), and dw::Textblock::drawWord0().
void dw::core::Widget::getBorderArea | ( | int * | xBor, |
int * | yBor, | ||
int * | widthBor, | ||
int * | heightBor | ||
) |
Definition at line 1591 of file widget.cc.
References dw::core::style::Box::bottom, getMarginArea(), dw::core::style::Box::left, dw::core::style::StyleAttrs::margin, dw::core::style::Box::right, style, and dw::core::style::Box::top.
Referenced by getPaddingArea().
|
inline |
|
inlineprotected |
Definition at line 207 of file widget.hh.
References boxDiffHeight(), and getHeight().
|
inlineprotected |
Definition at line 206 of file widget.hh.
References allocation, boxDiffWidth(), and dw::core::Allocation::width.
Referenced by dw::Table::drawLevel().
void dw::core::Widget::getExtremes | ( | Extremes * | extremes, |
int | numPos = 0 , |
||
Widget ** | references = NULL , |
||
int * | x = NULL , |
||
int * | y = NULL |
||
) |
Wrapper for Widget::getExtremesImpl().
Definition at line 1014 of file widget.cc.
References dw::core::Extremes::adjustmentWidth, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM, enterGetExtremes(), extremes, EXTREMES_CHANGED, EXTREMES_QUEUED, extremesChanged(), extremesParams, extremesQueued(), getExtremesImpl(), dw::core::SizeParams::isEquivalent(), leaveGetExtremes(), dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, dw::core::Extremes::minWidthIntrinsic, queueResizeEntered(), setFlags(), and unsetFlags().
Referenced by dw::Table::actuallyCalcCellSizes(), dw::Textblock::getAvailWidthOfChild(), dw::oof::OOFPosAbsLikeMgr::getExtremes(), dw::oof::OOFPosRelMgr::getExtremes(), dw::SimpleContainer::getExtremesSimpl(), dw::oof::OOFFloatsMgr::getFloatsExtremes(), getMinWidth(), and dw::Textblock::getWordExtremes().
|
inlineprivate |
Definition at line 443 of file widget.hh.
References dw::core::Layout::getExtremesCounter, and layout.
Referenced by sizeAllocate().
|
protectedvirtual |
Definition at line 1633 of file widget.cc.
References DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, extremes, and getExtremesSimpl().
Referenced by getExtremes().
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
Definition at line 1116 of file widget.cc.
References lout::misc::notImplemented().
|
protectedvirtual |
Simple variant, to be implemented by widgets with extremes not depending on positions.
Reimplemented in dw::Bullet, dw::Image, dw::Ruler, dw::Table, dw::Textblock, dw::SimpleContainer, and dw::core::ui::Embed.
Definition at line 1642 of file widget.cc.
References lout::misc::notImplemented().
Referenced by getExtremesImpl().
style::Color * dw::core::Widget::getFgColor | ( | ) |
Get the actual foreground color of a widget.
Definition at line 1367 of file widget.cc.
References dw::core::style::StyleAttrs::color, parent, and style.
Referenced by a_Html_image_new().
|
inline |
Definition at line 586 of file widget.hh.
References generator, and parent.
Referenced by getGeneratorLevel(), and dw::core::DeepIterator::getRespectiveParent().
int dw::core::Widget::getGeneratorLevel | ( | ) |
Get the level of the widget within the tree, regarting the generators, not the parents.
The root widget has the level 0.
Definition at line 1529 of file widget.cc.
References getGenerator().
Referenced by dw::core::DeepIterator::getRespectiveLevel().
|
inlineprotected |
Definition at line 205 of file widget.hh.
References allocation, dw::core::Allocation::ascent, and dw::core::Allocation::descent.
Referenced by dw::core::Layout::draw(), getContentHeight(), getMarginArea(), inAllocation(), queueDraw(), dw::Table::resizeDrawImpl(), and dw::Textblock::resizeDrawImpl().
|
inline |
Definition at line 588 of file widget.hh.
References layout.
Referenced by a_Html_image_new(), and dw::core::Iterator::scrollTo().
int dw::core::Widget::getLevel | ( | ) |
Get the level of the widget within the tree.
The root widget has the level 0.
Definition at line 1510 of file widget.cc.
References parent.
Referenced by dw::oof::OOFAwareWidget::doesWidgetOOFInterruptDrawing(), getNearestCommonAncestor(), and dw::core::DeepIterator::getRespectiveLevel().
void dw::core::Widget::getMarginArea | ( | int * | xMar, |
int * | yMar, | ||
int * | widthMar, | ||
int * | heightMar | ||
) |
Definition at line 1583 of file widget.cc.
References allocation, dw::core::style::Box::bottom, extraSpace, getHeight(), dw::core::style::Box::left, dw::core::style::Box::right, dw::core::style::Box::top, dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by drawWidgetBox(), and getBorderArea().
int dw::core::Widget::getMinWidth | ( | Extremes * | extremes, |
bool | forceValue | ||
) |
Used to evaluate Widget::adjustMinWidth.
If extremes == NULL, getExtremes is called. ForceValue is the same value passed to getAvailWidth etc.; if false, getExtremes is not called. A value of "false" is passed for "useCorrected" in the context of correctExtemes etc., to avoid cyclic dependencies.
Definition at line 604 of file widget.cc.
References dw::core::Extremes::adjustmentWidth, DBG_IF_RTFL, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, extremes, getAdjustMinWidth(), getExtremes(), dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, and dw::core::Extremes::minWidthIntrinsic.
Referenced by correctExtremes(), correctExtremesOfChild(), correctRequisition(), correctReqWidthOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild().
Get the widget with the highest level, which is a direct ancestor of widget1 and widget2.
Definition at line 1546 of file widget.cc.
References getLevel(), MSG_WARN, and parent.
Referenced by dw::core::Layout::moveToWidget().
|
inlineprotected |
Definition at line 233 of file widget.hh.
References stackingContextMgr, and stackingContextWidget.
void dw::core::Widget::getPaddingArea | ( | int * | xPad, |
int * | yPad, | ||
int * | widthPad, | ||
int * | heightPad | ||
) |
Return the padding area (content plus padding).
Used as "reference area" (ee comment of "style::drawBackground") for backgrounds.
Definition at line 1607 of file widget.cc.
References dw::core::style::StyleAttrs::borderWidth, dw::core::style::Box::bottom, getBorderArea(), dw::core::style::Box::left, dw::core::style::Box::right, style, and dw::core::style::Box::top.
Referenced by drawBox(), and drawWidgetBox().
|
inline |
Definition at line 573 of file widget.hh.
References parent.
Referenced by dw::Textblock::addParbreak(), DilloHtml::HtmlLinkReceiver::click(), dw::oof::OOFPosAbsMgr::containerBoxOffsetX(), dw::oof::OOFPosAbsMgr::containerBoxOffsetY(), dw::oof::OOFPosAbsMgr::containerBoxRestHeight(), dw::oof::OOFPosAbsMgr::containerBoxRestWidth(), dw::core::DeepIterator::getRespectiveParent(), dw::core::StackingContextMgr::handledByStackingContextMgr(), dw::Textblock::handOverBreak(), dw::oof::OOFAwareWidget::isOOFContainer(), dw::core::Layout::moveToWidget(), dw::oof::OOFAwareWidget::notifySetParent(), dw::core::Layout::processMouseEvent(), setParent(), and dw::Textblock::usesMaxGeneratorWidth().
|
inline |
Definition at line 468 of file widget.hh.
References style.
Referenced by dw::Textblock::accumulateWordForLine(), dw::Table::actuallyCalcCellSizes(), dw::core::StackingContextMgr::addChildSCWidget(), dw::Textblock::addLine(), dw::oof::OOFFloatsMgr::addWidgetOOF(), affectedByContainerSizeChange(), dw::oof::OOFFloatsMgr::affectsLeftBorder(), dw::oof::OOFFloatsMgr::affectsRightBorder(), affectsSizeChangeContainerChild(), dw::Table::apportionRowSpan(), boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), dw::Table::calcAvailWidthForDescendant(), dw::oof::OOFFloatsMgr::calcFloatX(), dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), dw::Textblock::changeLinkColor(), dw::oof::OOFFloatsMgr::collidesH(), dw::oof::OOFPosAbsMgr::containerBoxOffsetX(), dw::oof::OOFPosAbsMgr::containerBoxOffsetY(), dw::oof::OOFPosAbsMgr::containerBoxRestHeight(), dw::oof::OOFPosAbsMgr::containerBoxRestWidth(), correctExtremes(), dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), correctExtremesOfChild(), correctReqHeightOfChild(), correctRequisition(), dw::core::ui::ComplexButtonResource::correctRequisitionOfChild(), correctReqWidthOfChild(), dw::Bullet::draw(), dw::core::StackingContextMgr::draw(), dw::Table::drawLevel(), enterNotifyImpl(), dw::Textblock::findLineIndexWhenNotAllocated(), dw::Textblock::TextblockIterator::getAllocation(), getAvailHeight(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), getAvailHeightOfChild(), getAvailWidth(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), getAvailWidthOfChild(), dw::oof::OOFFloatsMgr::getBorder(), dw::oof::OOFPosRelMgr::getChildPosX(), dw::oof::OOFPosRelMgr::getChildPosY(), dw::oof::OOFFloatsMgr::getClearPosition(), dw::Bullet::getExtremesSimpl(), dw::Table::getExtremesSimpl(), dw::oof::OOFFloatsMgr::getFloatsExtremes(), dw::oof::OOFFloatsMgr::getFloatsListsAndSide(), dw::oof::OOFAwareWidget::getOOFMIndex(), dw::oof::OOFPositionedMgr::getPosBottom(), dw::oof::OOFPositionedMgr::getPosLeft(), dw::oof::OOFPositionedMgr::getPosRight(), dw::oof::OOFPositionedMgr::getPosTop(), dw::core::StackingContextMgr::getWidgetAtPoint(), dw::Textblock::handOverBreak(), dw::Textblock::initLine1Offset(), dw::core::StackingContextMgr::isEstablishingStackingContext(), dw::oof::OOFAwareWidget::isOOFContainer(), leaveNotifyImpl(), dw::Textblock::motionNotifyImpl(), dw::oof::OOFPosAbsLikeMgr::posXAbsolute(), dw::oof::OOFPosAbsLikeMgr::posYAbsolute(), dw::Textblock::showMissingLines(), dw::Table::sizeAllocateImpl(), dw::Textblock::sizeRequestImpl(), dw::Bullet::sizeRequestSimpl(), dw::Table::sizeRequestSimpl(), dw::Textblock::updateReference(), dw::Textblock::usesMaxGeneratorWidth(), dw::Textblock::yOffsetOfLineCreated(), and dw::Textblock::yOffsetOfLineToBeCreated().
Widget * dw::core::Widget::getTopLevel | ( | ) |
Get the widget at the root of the tree, this widget is part from.
Definition at line 1495 of file widget.cc.
References parent.
Referenced by dw::core::Layout::moveToWidget().
|
virtual |
Reimplemented in dw::oof::OOFAwareWidget, and dw::Ruler.
Definition at line 211 of file widget.cc.
References inAllocation().
Referenced by dw::oof::OOFFloatsMgr::getFloatWidgetAtPoint(), dw::core::Layout::getWidgetAtPoint(), dw::oof::OOFPositionedMgr::getWidgetAtPoint(), dw::core::StackingContextMgr::getWidgetAtPoint(), getWidgetAtPointInterrupted(), and dw::Textblock::getWidgetAtPointLevel().
Widget * dw::core::Widget::getWidgetAtPointInterrupted | ( | int | x, |
int | y, | ||
GettingWidgetAtPointContext * | context | ||
) |
Definition at line 222 of file widget.cc.
References dw::core::StackingProcessingContext::addWidgetProcessedAsInterruption(), and getWidgetAtPoint().
Referenced by dw::Textblock::getWidgetAtPointLevel().
|
inline |
Definition at line 580 of file widget.hh.
References widgetReference.
Referenced by dw::oof::OOFFloatsMgr::updateGenerators().
|
inline |
Definition at line 471 of file widget.hh.
References allocation, getHeight(), wasAllocated(), dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::oof::OOFAwareWidget::getWidgetAtPoint(), dw::Ruler::getWidgetAtPoint(), getWidgetAtPoint(), and dw::oof::OOFAwareWidget::getWidgetAtPointLevel().
bool dw::core::Widget::intersects | ( | Widget * | refWidget, |
Rectangle * | area, | ||
Rectangle * | intersection | ||
) |
Calculates the intersection of the visible allocation (i.
e. the intersection with the visible parent allocation) and "area" (in widget coordinates referring to "refWidget"), returned in intersection (in widget coordinates).
Typically used by containers when drawing their children (passing "this" as "refWidget"). Returns whether intersection is not empty.
Definition at line 139 of file widget.cc.
References allocation, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_LEAVE_VAL0, DBG_OBJ_MSG, DBG_OBJ_MSGF, dw::core::Rectangle::height, dw::core::Rectangle::intersectsWith(), parent, wasAllocated(), dw::core::Rectangle::width, dw::core::Rectangle::x, dw::core::Allocation::x, dw::core::Rectangle::y, and dw::core::Allocation::y.
Referenced by dw::oof::OOFPositionedMgr::draw(), dw::SimpleContainer::draw(), dw::core::StackingContextMgr::draw(), dw::oof::OOFFloatsMgr::drawFloats(), drawInterruption(), and dw::Textblock::drawLine().
|
virtual |
Reimplemented in dw::AlignedTableCell, dw::Ruler, dw::SimpleTableCell, dw::Table, and dw::Textblock.
Definition at line 1975 of file widget.cc.
Referenced by dw::Textblock::initLine1Offset(), and isPossibleContainer().
|
inline |
Definition at line 571 of file widget.hh.
References buttonSensitive.
Referenced by dw::core::Layout::processMouseEvent().
|
virtual |
Definition at line 1981 of file widget.cc.
References isBlockLevel().
|
pure virtual |
Return an iterator for this widget.
mask can narrow the types returned by the iterator, this can enhance performance quite much, e.g. when only searching for child widgets.
With atEnd == false, the iterator starts before the beginning, i.e. the first call of dw::core::Iterator::next will let the iterator point on the first piece of contents. Likewise, With atEnd == true, the iterator starts after the last piece of contents, call dw::core::Iterator::prev in this case.
Implemented in dw::core::ui::Embed, dw::Bullet, dw::Image, dw::Ruler, dw::Table, dw::Textblock, and dw::SimpleContainer.
Referenced by dw::core::CharIterator::CharIterator(), containerSizeChangedForChildren(), dw::core::DeepIterator::DeepIterator(), dw::core::Layout::detachWidget(), dw::core::DeepIterator::next(), dw::core::DeepIterator::prev(), dw::core::DeepIterator::searchDownward(), and dw::core::DeepIterator::searchSideward().
|
inlineprivate |
Definition at line 442 of file widget.hh.
References dw::core::Layout::getExtremesCounter, and layout.
Referenced by getExtremes().
void dw::core::Widget::leaveNotify | ( | EventCrossing * | event | ) |
Definition at line 1221 of file widget.cc.
References leaveNotifyImpl().
Referenced by dw::core::Layout::leaveNotify(), and dw::core::Layout::moveToWidget().
|
protectedvirtual |
Reimplemented in dw::Image, dw::Textblock, and dw::core::ui::Embed.
Definition at line 2010 of file widget.cc.
References getStyle(), dw::core::style::Tooltip::onLeave(), and dw::core::style::StyleAttrs::x_tooltip.
Referenced by leaveNotify(), and dw::core::ui::Embed::leaveNotifyImpl().
|
inlineprivate |
Definition at line 430 of file widget.hh.
References layout, and dw::core::Layout::queueResizeCounter.
Referenced by queueResize().
|
inlineprivate |
Definition at line 434 of file widget.hh.
References layout, and dw::core::Layout::sizeAllocateCounter.
Referenced by sizeAllocate().
|
inlineprivate |
Definition at line 438 of file widget.hh.
References layout, and dw::core::Layout::sizeRequestCounter.
Referenced by sizeRequest().
|
protectedvirtual |
Reimplemented in dw::Textblock.
Definition at line 1670 of file widget.cc.
Referenced by queueResize().
|
protectedvirtual |
Reimplemented in dw::Textblock.
Definition at line 1666 of file widget.cc.
Referenced by queueResize().
bool dw::core::Widget::motionNotify | ( | EventMotion * | event | ) |
Definition at line 1211 of file widget.cc.
References motionNotifyImpl().
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Image, and dw::Textblock.
Definition at line 1997 of file widget.cc.
Referenced by motionNotify().
|
inline |
Definition at line 458 of file widget.hh.
References flags, and NEEDS_ALLOCATE.
Referenced by dw::core::Layout::resizeIdle(), and sizeAllocate().
|
inline |
Definition at line 457 of file widget.hh.
References flags, and NEEDS_RESIZE.
Referenced by dw::Table::calcCellSizes(), containerSizeChanged(), queueResize(), dw::core::Layout::resizeIdle(), and sizeRequest().
|
protectedvirtual |
This method is called after a widget has been set as the top of a widget tree.
A widget may override this method when it is necessary to be notified.
Reimplemented in dw::oof::OOFAwareWidget, and dw::Textblock.
Definition at line 1962 of file widget.cc.
Referenced by dw::core::Layout::addWidget().
|
protectedvirtual |
This method is called after a widget has been added to a parent.
A widget may override this method when it is necessary to be notified.
Reimplemented in dw::oof::OOFAwareWidget, and dw::Textblock.
Definition at line 1971 of file widget.cc.
Referenced by setParent().
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
Definition at line 1100 of file widget.cc.
Referenced by dw::core::SizeParams::forChild().
|
inlineprotected |
Definition at line 251 of file widget.hh.
References ALLOCATE_QUEUED, DBG_IF_RTFL, DBG_OBJ_SET_SYM, EXTREMES_CHANGED, EXTREMES_QUEUED, flags, NEEDS_ALLOCATE, NEEDS_RESIZE, RESIZE_QUEUED, and WAS_ALLOCATED.
Referenced by setFlags(), and unsetFlags().
|
inlineprotected |
Definition at line 297 of file widget.hh.
References allocation, getHeight(), queueDrawArea(), and dw::core::Allocation::width.
Referenced by dw::Image::forceMapRedraw(), resizeDrawImpl(), and setStyle().
|
protected |
Definition at line 285 of file widget.cc.
References _MSG, allocation, dw::core::Allocation::ascent, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, dw::core::Allocation::descent, layout, dw::core::Layout::queueDraw(), dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::Textblock::changeLinkColor(), queueDraw(), dw::Textblock::queueDrawRange(), dw::Table::resizeDrawImpl(), and dw::Textblock::resizeDrawImpl().
|
inlineprotected |
Definition at line 300 of file widget.hh.
References extremesChanged(), and queueResize().
|
private |
This method should be called, when a widget changes its size.
A "fast" queueResize will ignore the ancestors, and furthermore not trigger the idle function. Used only within viewportSizeChanged, and not available outside Layout and Widget.
Definition at line 309 of file widget.cc.
References ALLOCATE_QUEUED, DBG_IF_RTFL, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, enterQueueResize(), EXTREMES_CHANGED, EXTREMES_QUEUED, extremesChanged(), extremesQueued(), layout, leaveQueueResize(), markExtremesChange(), markSizeChange(), NEEDS_RESIZE, needsResize(), parent, parentRef, dw::core::Layout::queueResize(), dw::core::Layout::queueResizeList, RESIZE_QUEUED, resizeQueued(), and setFlags().
Referenced by dw::Table::addCell(), dw::Textblock::addParbreak(), dw::core::Layout::addWidget(), dw::Textblock::flush(), dw::oof::OOFAwareWidget::oofSizeChanged(), dw::Textblock::oofSizeChanged(), dw::core::ui::Resource::queueResize(), queueResize(), queueResizeFast(), dw::SimpleContainer::removeChild(), dw::SimpleContainer::setChild(), dw::AlignedTableCell::setMaxValue(), dw::ListItem::setMaxValue(), setStyle(), dw::Textblock::updateReference(), and dw::Textblock::widgetRefSizeChanged().
|
inlineprivate |
Definition at line 431 of file widget.hh.
References layout, and dw::core::Layout::queueResizeCounter.
Referenced by getExtremes(), sizeAllocate(), and sizeRequest().
|
inlineprivate |
Definition at line 185 of file widget.hh.
References extremesChanged(), and queueResize().
Referenced by containerSizeChanged().
|
inlineprotected |
Definition at line 392 of file widget.hh.
References layout, and dw::core::Layout::removeAnchor().
Referenced by dw::Textblock::~Textblock().
|
virtual |
Definition at line 2019 of file widget.cc.
References lout::misc::notImplemented().
Referenced by ~Widget().
|
inlineprotectedvirtual |
Called after sizeAllocateImpl() to redraw necessary areas.
By default the whole widget is redrawn.
Reimplemented in dw::Table, and dw::Textblock.
Definition at line 339 of file widget.hh.
References queueDraw().
Referenced by sizeAllocate().
|
inlineprivate |
Definition at line 427 of file widget.hh.
References layout, and dw::core::Layout::resizeIdleCounter.
Referenced by sizeAllocate().
|
inline |
Definition at line 455 of file widget.hh.
References flags, and RESIZE_QUEUED.
Referenced by dw::Table::calcCellSizes(), containerSizeChanged(), queueResize(), dw::core::Layout::resizeIdle(), and sizeRequest().
void dw::core::Widget::scrollTo | ( | HPosition | hpos, |
VPosition | vpos, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Definition at line 1576 of file widget.cc.
References allocation, layout, dw::core::Layout::scrollTo(), dw::core::Allocation::x, and dw::core::Allocation::y.
|
inlineprotected |
Definition at line 412 of file widget.hh.
References dw::core::SelectionState::handleEvent(), layout, and dw::core::Layout::selectionState.
Referenced by dw::Textblock::sendSelectionEvent().
|
inlinestatic |
void dw::core::Widget::setBgColor | ( | style::Color * | bgColor | ) |
void dw::core::Widget::setButtonSensitive | ( | bool | buttonSensitive | ) |
Definition at line 1485 of file widget.cc.
References buttonSensitive, and buttonSensitiveSet.
Referenced by dw::AlignedTableCell::AlignedTableCell(), dw::Table::Table(), and dw::Textblock::Textblock().
|
inlineprotected |
Definition at line 397 of file widget.hh.
References layout, and dw::core::Layout::setCursor().
Referenced by dw::Textblock::motionNotifyImpl().
|
inline |
Definition at line 423 of file widget.hh.
References deleteCallbackData, and deleteCallbackFunc.
|
inlineprotected |
Definition at line 292 of file widget.hh.
References flags, and printFlag().
Referenced by getExtremes(), queueResize(), dw::core::Layout::resizeIdle(), sizeAllocate(), and sizeRequest().
|
inline |
Definition at line 466 of file widget.hh.
References generator.
Referenced by dw::Textblock::addWidget().
void dw::core::Widget::setParent | ( | Widget * | parent | ) |
Definition at line 231 of file widget.cc.
References dw::core::StackingContextMgr::addChildSCWidget(), buttonSensitive, buttonSensitiveSet, container, DBG_OBJ_ASSOC_PARENT, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_PTR, getParent(), layout, notifySetParent(), parent, stackingContextMgr, and stackingContextWidget.
Referenced by dw::Textblock::addWidget(), and dw::SimpleContainer::setChild().
void dw::core::Widget::setQuasiParent | ( | Widget * | quasiParent | ) |
Definition at line 276 of file widget.cc.
References DBG_OBJ_SET_PTR, and quasiParent.
|
virtual |
Change the style of a widget.
The old style is automatically unreferred, the new is referred. If this call causes the widget to change its size, dw::core::Widget::queueResize is called.
Reimplemented in dw::core::ui::Embed.
Definition at line 1233 of file widget.cc.
References dw::core::style::StyleAttrs::backgroundColor, dw::core::style::StyleAttrs::backgroundImage, dw::core::style::StyleAttrs::borderWidth, dw::core::style::Box::bottom, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_SET_COL, DBG_OBJ_SET_NUM, DBG_OBJ_SET_SYM, dw::core::style::StyleAttrs::display, dw::core::style::DISPLAY_BLOCK, dw::core::style::DISPLAY_INLINE, dw::core::style::DISPLAY_INLINE_BLOCK, dw::core::style::DISPLAY_LIST_ITEM, dw::core::style::DISPLAY_NONE, dw::core::style::DISPLAY_TABLE, dw::core::style::DISPLAY_TABLE_CELL, dw::core::style::DISPLAY_TABLE_FOOTER_GROUP, dw::core::style::DISPLAY_TABLE_HEADER_GROUP, dw::core::style::DISPLAY_TABLE_ROW, dw::core::style::DISPLAY_TABLE_ROW_GROUP, dw::core::style::ColorAttrs::getColor(), dw::core::style::StyleAttrs::hBorderSpacing, dw::core::style::StyleAttrs::height, dw::core::StackingContextMgr::isEstablishingStackingContext(), layout, dw::core::style::Box::left, dw::core::style::StyleAttrs::margin, dw::core::style::StyleAttrs::maxHeight, dw::core::style::StyleAttrs::maxWidth, dw::core::style::StyleAttrs::minHeight, dw::core::style::StyleAttrs::minWidth, dw::core::style::StyleAttrs::padding, dw::core::style::StyleImage::putExternalImgRenderer(), queueDraw(), queueResize(), dw::core::style::Style::ref(), dw::core::style::StyleImage::removeExternalImgRenderer(), dw::core::style::Box::right, dw::core::style::StyleAttrs::sizeDiffs(), stackingContextMgr, stackingContextWidget, style, dw::core::style::Box::top, dw::core::style::Style::unref(), dw::core::Layout::updateCursor(), dw::core::style::StyleAttrs::vBorderSpacing, widgetImgRenderer, and dw::core::style::StyleAttrs::width.
Referenced by dw::Textblock::addWidget(), dw::Textblock::changeLinkColor(), Html_input_image(), Html_set_collapsing_border_model(), Html_set_separate_border_model(), Html_tag_content_hr(), Html_tag_open_body(), Html_tag_open_button(), main(), dw::core::ui::Embed::setStyle(), and textTimeout().
|
inline |
Definition at line 581 of file widget.hh.
References DBG_OBJ_SET_PTR, and widgetReference.
Referenced by dw::Textblock::addWidget(), and Widget().
void dw::core::Widget::sizeAllocate | ( | Allocation * | allocation | ) |
Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed.
Definition at line 1126 of file widget.cc.
References allocation, dw::core::Allocation::ascent, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, DBG_OBJ_SET_NUM, dw::core::Allocation::descent, enterSizeAllocate(), getExtremesEntered(), layout, leaveSizeAllocate(), NEEDS_ALLOCATE, needsAllocate(), dw::core::Layout::queueDrawExcept(), queueResizeEntered(), resizeDrawImpl(), resizeIdleEntered(), setFlags(), sizeAllocateImpl(), sizeRequestEntered(), unsetFlags(), WAS_ALLOCATED, wasAllocated(), dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::core::Layout::resizeIdle(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), dw::oof::OOFPosRelMgr::sizeAllocateChildren(), dw::oof::OOFFloatsMgr::sizeAllocateFloats(), dw::Textblock::sizeAllocateImpl(), and dw::SimpleContainer::sizeAllocateImpl().
|
inlineprivate |
Definition at line 435 of file widget.hh.
References layout, and dw::core::Layout::sizeAllocateCounter.
|
protectedvirtual |
Reimplemented in dw::core::ui::Embed, dw::Image, dw::Table, dw::Textblock, and dw::SimpleContainer.
Definition at line 1648 of file widget.cc.
Referenced by sizeAllocate().
void dw::core::Widget::sizeRequest | ( | Requisition * | requisition, |
int | numPos = 0 , |
||
Widget ** | references = NULL , |
||
int * | x = NULL , |
||
int * | y = NULL |
||
) |
This method is a wrapper for Widget::sizeRequestImpl(); it calls the latter only when needed.
Definition at line 534 of file widget.cc.
References dw::core::Requisition::ascent, lout::misc::boolToStr(), calcExtraSpace(), DBG_IF_RTFL, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, DBG_OBJ_SET_NUM, dw::core::Requisition::descent, enterSizeRequest(), dw::core::SizeParams::isEquivalent(), leaveSizeRequest(), NEEDS_RESIZE, needsResize(), queueResizeEntered(), requisition, requisitionParams, RESIZE_QUEUED, resizeQueued(), setFlags(), sizeRequestImpl(), unsetFlags(), and dw::core::Requisition::width.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcPosAndSizeChildOfChild(), dw::oof::OOFPosRelMgr::calcWidgetRefSize(), dw::oof::OOFPositionedMgr::doChildrenExceedContainer(), dw::oof::OOFFloatsMgr::ensureFloatSize(), dw::oof::OOFPosRelMgr::getSize(), dw::core::Layout::resizeIdle(), dw::oof::OOFPosRelMgr::sizeAllocateChildren(), and dw::SimpleContainer::sizeRequestSimpl().
|
inlineprivate |
Definition at line 439 of file widget.hh.
References layout, and dw::core::Layout::sizeRequestCounter.
Referenced by sizeAllocate().
|
protectedvirtual |
Definition at line 1618 of file widget.cc.
References DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, requisition, and sizeRequestSimpl().
Referenced by sizeRequest().
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
Definition at line 1105 of file widget.cc.
References lout::misc::notImplemented().
Referenced by dw::core::SizeParams::forChild().
|
protectedvirtual |
Simple variant, to be implemented by widgets with sizes not depending on positions.
Reimplemented in dw::Bullet, dw::Image, dw::Ruler, dw::Table, dw::SimpleContainer, and dw::core::ui::Embed.
Definition at line 1627 of file widget.cc.
References lout::misc::notImplemented().
Referenced by sizeRequestImpl().
|
inlineprotected |
Definition at line 294 of file widget.hh.
References flags, and printFlag().
Referenced by getExtremes(), dw::core::Layout::resizeIdle(), sizeAllocate(), and sizeRequest().
|
protectedvirtual |
Must be implemengted by a method returning true, when getAvailHeight() is called.
Definition at line 525 of file widget.cc.
Referenced by affectedByContainerSizeChange(), and affectsSizeChangeContainerChild().
|
protectedvirtual |
Must be implemengted by a method returning true, when getAvailWidth() is called.
Reimplemented in dw::Ruler, dw::Table, and dw::Textblock.
Definition at line 516 of file widget.cc.
Referenced by affectedByContainerSizeChange(), and affectsSizeChangeContainerChild().
|
inline |
Definition at line 461 of file widget.hh.
References flags, and WAS_ALLOCATED.
Referenced by dw::Textblock::addAnchor(), dw::Textblock::findLineIndex(), dw::Textblock::findLineIndexWhenAllocated(), dw::oof::OOFPositionedMgr::generatorPosDefined(), dw::core::Layout::getWidgetAtPoint(), inAllocation(), intersects(), dw::oof::OOFPositionedMgr::OOFPositionedMgr(), dw::Textblock::WordImgRenderer::readyToDraw(), dw::core::Widget::WidgetImgRenderer::readyToDraw(), sizeAllocate(), and dw::Textblock::sizeAllocateImpl().
|
staticprivate |
Definition at line 122 of file widget.hh.
Referenced by getAdjustMinWidth(), and setAdjustMinWidth().
|
protected |
The current allocation: size and position, always relative to the canvas.
Definition at line 203 of file widget.hh.
Referenced by dw::Textblock::addAnchor(), dw::Textblock::changeLinkColor(), dw::Bullet::draw(), dw::core::Layout::draw(), drawBox(), dw::Textblock::drawSpace(), drawWidgetBox(), dw::Textblock::drawWord0(), dw::Textblock::findLineIndexWhenAllocated(), getAllocation(), dw::Table::TableIterator::getAllocation(), dw::Textblock::TextblockIterator::getAllocation(), dw::oof::OOFAwareWidget::OOFAwareWidgetIterator::getAllocationOOF(), getContentWidth(), getHeight(), getMarginArea(), dw::Textblock::getWidgetAtPointLevel(), inAllocation(), intersects(), dw::Textblock::lineYOffsetCanvas(), dw::Textblock::lineYOffsetCanvas(), dw::Textblock::lineYOffsetWidget(), dw::Textblock::lineYOffsetWidget(), dw::Textblock::lineYOffsetWidget(), queueDraw(), queueDrawArea(), dw::Textblock::queueDrawRange(), dw::Table::resizeDrawImpl(), dw::Textblock::resizeDrawImpl(), scrollTo(), sizeAllocate(), dw::core::ui::Embed::sizeAllocateImpl(), dw::Table::sizeAllocateImpl(), dw::Textblock::sizeAllocateImpl(), dw::SimpleContainer::sizeAllocateImpl(), dw::oof::OOFAwareWidget::sizeAllocateStart(), and Widget().
|
private |
See dw::core::Widget::setBgColor().
Definition at line 172 of file widget.hh.
Referenced by drawWidgetBox(), getBgColor(), setBgColor(), and Widget().
|
private |
See dw::core::Widget::setButtonSensitive().
Definition at line 177 of file widget.hh.
Referenced by isButtonSensitive(), setButtonSensitive(), setParent(), and Widget().
|
private |
See dw::core::Widget::setButtonSensitive().
Definition at line 182 of file widget.hh.
Referenced by setButtonSensitive(), setParent(), and Widget().
|
static |
|
private |
The containing widget, equivalent to the "containing block" defined by CSS.
May be NULL, in this case the viewport is used.
Definition at line 146 of file widget.hh.
Referenced by dw::core::Layout::addWidget(), affectedByContainerSizeChange(), containerSizeChanged(), correctExtremes(), correctExtremesOfChild(), correctReqHeightOfChild(), correctRequisitionOfChild(), correctReqWidthOfChild(), getAvailHeightOfChild(), getAvailWidthOfChild(), getContainer(), dw::Textblock::getGeneratorRest(), setParent(), and Widget().
|
private |
Definition at line 419 of file widget.hh.
Referenced by setDeleteCallback(), Widget(), and ~Widget().
|
private |
Definition at line 420 of file widget.hh.
Referenced by setDeleteCallback(), Widget(), and ~Widget().
|
protected |
Space around the margin box.
Allocation is extraSpace + margin + border + padding + contents.
See also dw::core::Widget::calcExtraSpace and dw::core::Widget::calcExtraSpaceImpl. Also, it is feasible to correct this value within dw::core::Widget::sizeRequestImpl.
Definition at line 219 of file widget.hh.
Referenced by boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), calcExtraSpace(), dw::Textblock::calcExtraSpaceImpl(), dw::oof::OOFAwareWidget::correctRequisitionByOOF(), dw::Textblock::findLineIndexWhenNotAllocated(), getMarginArea(), dw::Textblock::sizeRequestImpl(), Widget(), dw::Textblock::yOffsetOfLineCreated(), and dw::Textblock::yOffsetOfLineToBeCreated().
|
private |
Analogue to dw::core::Widget::requisition.
Definition at line 166 of file widget.hh.
Referenced by dw::Table::actuallyCalcCellSizes(), correctExtremes(), dw::oof::OOFAwareWidget::correctExtremesByOOF(), dw::AlignedTableCell::correctExtremesOfChild(), dw::SimpleTableCell::correctExtremesOfChild(), dw::core::ui::Embed::correctExtremesOfChild(), correctExtremesOfChild(), dw::core::ui::Embed::correctExtremesOfChildNoRec(), dw::Textblock::getAvailWidthOfChild(), dw::Table::getExtreme(), getExtremes(), getExtremesImpl(), dw::Bullet::getExtremesSimpl(), dw::Ruler::getExtremesSimpl(), dw::Table::getExtremesSimpl(), dw::Textblock::getExtremesSimpl(), dw::SimpleContainer::getExtremesSimpl(), dw::core::ui::Embed::getExtremesSimpl(), getMinWidth(), dw::Textblock::getWordExtremes(), and dw::Table::setExtreme().
|
private |
Definition at line 167 of file widget.hh.
Referenced by getExtremes(), and Widget().
|
private |
Definition at line 152 of file widget.hh.
Referenced by dw::Textblock::addText(), dw::Textblock::addText0(), dw::Textblock::addWidget(), dw::Textblock::addWord(), allocateQueued(), extremesChanged(), extremesQueued(), dw::Textblock::fillWord(), needsAllocate(), needsResize(), printFlag(), resizeQueued(), setFlags(), unsetFlags(), wasAllocated(), and Widget().
|
private |
The generating widget, NULL for top-level widgets, or if not set; in the latter case, the effective generator (see getGenerator) is the parent.
Definition at line 139 of file widget.hh.
Referenced by dw::oof::OOFFloatsMgr::Float::CompareGBAndExtIndex::compare(), getGenerator(), setGenerator(), and Widget().
|
protected |
Definition at line 209 of file widget.hh.
Referenced by a_Image_new(), addAnchor(), addAnchor(), dw::Textblock::addText(), dw::Textblock::addText0(), dw::core::Layout::addWidget(), dw::Textblock::calcLineBreakWidth(), changeAnchor(), dw::Textblock::changeLinkColor(), correctExtremes(), correctRequisition(), dw::core::Layout::detachWidget(), drawBox(), drawInterruption(), dw::Textblock::drawText(), drawWidgetBox(), enterGetExtremes(), enterQueueResize(), enterSizeAllocate(), enterSizeRequest(), getAvailHeight(), getAvailWidth(), getBgColor(), getExtremesEntered(), getLayout(), dw::Textblock::hyphenateWord(), leaveGetExtremes(), dw::Textblock::leaveNotifyImpl(), leaveQueueResize(), leaveSizeAllocate(), leaveSizeRequest(), dw::Textblock::motionNotifyImpl(), queueDrawArea(), queueResize(), queueResizeEntered(), removeAnchor(), resizeIdleEntered(), scrollTo(), selectionHandleEvent(), dw::Textblock::sendSelectionEvent(), setCursor(), setParent(), setStyle(), sizeAllocate(), sizeAllocateEntered(), sizeRequestEntered(), dw::Textblock::textWidth(), Widget(), and ~Widget().
|
private |
The parent widget, NULL for top-level widgets.
Definition at line 127 of file widget.hh.
Referenced by correctExtremes(), correctExtremesOfChild(), correctRequisition(), correctRequisitionOfChild(), drawWidgetBox(), getAvailHeight(), getAvailHeightOfChild(), getAvailWidth(), getAvailWidthOfChild(), getBgColor(), getFgColor(), getGenerator(), getLevel(), getNearestCommonAncestor(), getParent(), getTopLevel(), dw::Textblock::handOverBreak(), intersects(), queueResize(), setParent(), Widget(), and ~Widget().
int dw::core::Widget::parentRef |
This value is defined by the parent widget, and used for incremential resizing.
See documentation for an explanation.
Definition at line 195 of file widget.hh.
Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addWidget(), dw::oof::OOFAwareWidget::getParentRefInFlowSubRef(), dw::oof::OOFAwareWidget::getParentRefOOFIndex(), dw::oof::OOFAwareWidget::getParentRefOOFSubRef(), dw::oof::OOFAwareWidget::getParentRefOutOfFlowMgr(), dw::oof::OOFAwareWidget::isParentRefOOF(), queueResize(), and dw::Table::reallocChildren().
|
private |
...
Definition at line 132 of file widget.hh.
Referenced by correctExtremes(), correctExtremesOfChild(), correctReqHeightOfChild(), correctRequisition(), correctRequisitionOfChild(), correctReqWidthOfChild(), getAvailHeight(), getAvailHeightOfChild(), getAvailWidth(), getAvailWidthOfChild(), setQuasiParent(), and Widget().
|
private |
Size_request() stores the result of the last call of size_request_impl().
Do not read this directly, but call size_request().
Definition at line 160 of file widget.hh.
Referenced by correctReqHeightOfChild(), dw::core::ui::Embed::correctReqHeightOfChildNoRec(), correctRequisition(), dw::oof::OOFAwareWidget::correctRequisitionByOOF(), dw::AlignedTableCell::correctRequisitionOfChild(), dw::SimpleTableCell::correctRequisitionOfChild(), dw::core::ui::Embed::correctRequisitionOfChild(), correctRequisitionOfChild(), correctReqWidthOfChild(), dw::core::ui::Embed::correctReqWidthOfChildNoRec(), sizeRequest(), dw::Textblock::sizeRequestImpl(), sizeRequestImpl(), dw::Bullet::sizeRequestSimpl(), dw::Ruler::sizeRequestSimpl(), dw::Table::sizeRequestSimpl(), dw::SimpleContainer::sizeRequestSimpl(), and dw::core::ui::Embed::sizeRequestSimpl().
|
private |
Definition at line 161 of file widget.hh.
Referenced by sizeRequest(), and Widget().
|
protected |
Set iff this widget constitutes a stacking context, as defined by CSS.
Definition at line 225 of file widget.hh.
Referenced by dw::core::Layout::addWidget(), dw::oof::OOFAwareWidget::drawLevel(), getNextStackingContextMgr(), dw::oof::OOFAwareWidget::getWidgetAtPointLevel(), setParent(), setStyle(), Widget(), and ~Widget().
|
protected |
The bottom-most ancestor (or this) for which stackingContextMgr is set.
Definition at line 231 of file widget.hh.
Referenced by dw::core::Layout::addWidget(), dw::oof::OOFAwareWidget::doesWidgetOOFInterruptDrawing(), getNextStackingContextMgr(), setParent(), and setStyle().
|
private |
Definition at line 150 of file widget.hh.
Referenced by dw::Textblock::addAnchor(), dw::Textblock::addBreakOption(), dw::Textblock::addLinebreak(), dw::Textblock::addParbreak(), dw::Table::addRow(), dw::Textblock::addSpace(), dw::Textblock::addText(), dw::Textblock::addText(), dw::Textblock::addText0(), dw::Textblock::addWidget(), dw::Textblock::addWord(), calcFinalWidth(), dw::Textblock::calcTextSize(), dw::Textblock::calcTextSizes(), dw::Textblock::decorateText(), drawBox(), dw::Textblock::drawSpace(), dw::Textblock::drawText(), drawWidgetBox(), dw::Textblock::drawWord(), dw::Textblock::drawWord0(), dw::Textblock::fillSpace(), dw::Textblock::fillWord(), getBgColor(), getBorderArea(), getFgColor(), getPaddingArea(), getStyle(), dw::Textblock::handOverBreak(), dw::ListItem::initWithText(), dw::ListItem::initWithWidget(), dw::Textblock::isBreakAllowed(), dw::Textblock::motionNotifyImpl(), dw::Textblock::mustAddBreaks(), dw::Textblock::setBreakOption(), dw::core::ui::Embed::setStyle(), setStyle(), dw::oof::OOFAwareWidget::testStyleAbsolutelyPositioned(), dw::oof::OOFAwareWidget::testStyleFixedlyPositioned(), dw::oof::OOFAwareWidget::testStyleFloat(), dw::oof::OOFAwareWidget::testStyleOutOfFlow(), dw::oof::OOFAwareWidget::testStylePositioned(), dw::oof::OOFAwareWidget::testStyleRelativelyPositioned(), dw::Textblock::textWidth(), dw::core::Layout::updateCursor(), Widget(), and ~Widget().
|
protected |
Definition at line 119 of file widget.hh.
Referenced by setStyle(), Widget(), and ~Widget().
|
private |
Definition at line 148 of file widget.hh.
Referenced by getWidgetReference(), and setWidgetReference().