Dillo
|
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). More... | |
virtual Widget * | sizeRequestReference (int index) |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). More... | |
virtual int | numGetExtremesReferences () |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). More... | |
virtual Widget * | getExtremesReference (int index) |
See Sizes of Dillo Widgets (or Size requisitions depending on positions). More... | |
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. More... | |
void | getExtremes (Extremes *extremes, int numPos=0, Widget **references=NULL, int *x=NULL, int *y=NULL) |
Wrapper for Widget::getExtremesImpl(). More... | |
void | sizeAllocate (Allocation *allocation) |
Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed. More... | |
void | calcExtraSpace (int numPos, Widget **references, int *x, int *y) |
Calculates dw::core::Widget::extraSpace. More... | |
int | getAvailWidth (bool forceValue) |
int | getAvailHeight (bool forceValue) |
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) |
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. More... | |
virtual bool | isBlockLevel () |
virtual bool | isPossibleContainer () |
void | containerSizeChanged () |
bool | 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). More... | |
virtual void | draw (View *view, Rectangle *area, DrawingContext *context)=0 |
void | drawInterruption (View *view, Rectangle *area, DrawingContext *context) |
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. More... | |
void | setBgColor (style::Color *bgColor) |
Set the background "behind" the widget, if it is not the background of the parent widget, e.g. the background of a table row. More... | |
style::Color * | getBgColor () |
Get the actual background of a widget. More... | |
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). More... | |
void | drawWidgetBox (View *view, Rectangle *area, bool inverse) |
Draw borders and background of a widget. More... | |
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. More... | |
int | getLevel () |
Get the level of the widget within the tree. More... | |
int | getGeneratorLevel () |
Get the level of the widget within the tree, regarting the generators, not the parents. More... | |
Widget * | getNearestCommonAncestor (Widget *otherWidget) |
Get the widget with the highest level, which is a direct ancestor of widget1 and widget2. More... | |
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). More... | |
virtual Iterator * | iterator (Content::Type mask, bool atEnd)=0 |
Return an iterator for this widget. More... | |
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. More... | |
int | getClassId () |
Returns the class identifier. More... | |
const char * | getClassName () |
Return the name, under which the class of this object was registered. More... | |
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. More... | |
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. More... | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. More... | |
virtual int | hashValue () |
Return a hash value for the object. More... | |
virtual Object * | clone () |
Return an exact copy of the object. More... | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. More... | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. More... | |
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. More... | |
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. More... | |
virtual void | sizeRequestSimpl (Requisition *requisition) |
Simple variant, to be implemented by widgets with sizes not depending on positions. More... | |
virtual void | getExtremesImpl (Extremes *extremes, int numPos, Widget **references, int *x, int *y) |
See Sizes of Dillo Widgets. More... | |
virtual void | getExtremesSimpl (Extremes *extremes) |
Simple variant, to be implemented by widgets with extremes not depending on positions. More... | |
virtual void | calcExtraSpaceImpl (int numPos, Widget **references, int *x, int *y) |
The actual implementation for calculating dw::core::Widget::extraSpace. More... | |
virtual void | sizeAllocateImpl (Allocation *allocation) |
See Sizes of Dillo Widgets. More... | |
virtual void | resizeDrawImpl () |
Called after sizeAllocateImpl() to redraw necessary areas. By default the whole widget is redrawn. More... | |
virtual void | markSizeChange (int ref) |
See Sizes of Dillo Widgets. More... | |
virtual void | markExtremesChange (int ref) |
See Sizes of Dillo Widgets. More... | |
virtual int | getAvailWidthOfChild (Widget *child, bool forceValue) |
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. More... | |
virtual bool | usesAvailHeight () |
Must be implemengted by a method returning true, when getAvailHeight() is called. More... | |
virtual void | notifySetAsTopLevel () |
This method is called after a widget has been set as the top of a widget tree. More... | |
virtual void | notifySetParent () |
This method is called after a widget has been added to a parent. More... | |
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. See class comment for details. More... | |
Protected Attributes | |
WidgetImgRenderer * | widgetImgRenderer |
Allocation | allocation |
The current allocation: size and position, always relative to the canvas. More... | |
Layout * | layout |
style::Box | extraSpace |
Space around the margin box. Allocation is extraSpace + margin + border + padding + contents. More... | |
StackingContextMgr * | stackingContextMgr |
Set iff this widget constitutes a stacking context, as defined by CSS. More... | |
Widget * | stackingContextWidget |
The bottom-most ancestor (or this) for which stackingContextMgr is set. More... | |
Private Member Functions | |
void | queueResize (int ref, bool extremesChanged, bool fast) |
This method should be called, when a widget changes its size. More... | |
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. More... | |
Widget * | quasiParent |
... More... | |
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. More... | |
Widget * | container |
The containing widget, equivalent to the "containing
block" defined by CSS. May be NULL, in this case the viewport is used. More... | |
WidgetReference * | widgetReference |
style::Style * | style |
Flags | flags |
Requisition | requisition |
Size_request() stores the result of the last call of size_request_impl(). More... | |
SizeParams | requisitionParams |
Extremes | extremes |
Analogue to dw::core::Widget::requisition. More... | |
SizeParams | extremesParams |
style::Color * | bgColor |
See dw::core::Widget::setBgColor(). More... | |
bool | buttonSensitive |
See dw::core::Widget::setButtonSensitive(). More... | |
bool | buttonSensitiveSet |
See dw::core::Widget::setButtonSensitive(). More... | |
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 | ( | ) |
References DBG_OBJ_ASSOC_CHILD, DBG_OBJ_CREATE, DBG_OBJ_SET_PTR, and layout.
dw::core::Widget::~Widget | ( | ) |
References DBG_OBJ_DELETE, and layout.
|
inlineprotected |
References dw::core::Layout::addAnchor().
|
inlineprotected |
References dw::core::Layout::addAnchor().
|
static |
|
protectedvirtual |
|
protectedvirtual |
|
inline |
References ALLOCATE_QUEUED.
Referenced by dw::core::Layout::resizeIdle().
|
virtual |
Reimplemented in dw::Table, dw::AlignedTableCell, and dw::SimpleTableCell.
References dw::core::style::multiplyWithPerLength().
Referenced by getAvailHeightOfChild().
|
virtual |
Reimplemented in dw::Table, dw::AlignedTableCell, and dw::SimpleTableCell.
References dw::core::style::multiplyWithPerLength().
Referenced by dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), and dw::core::ui::ComplexButtonResource::correctRequisitionOfChild().
|
inline |
References boxOffsetY(), and boxRestHeight().
Referenced by calcHeight(), dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), getAvailHeightOfChild(), and getContentHeight().
|
inline |
References boxOffsetX(), and boxRestWidth().
Referenced by dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), calcWidth(), dw::oof::OOFFloatsMgr::collidesH(), dw::tablecell::correctAvailWidthOfChild(), dw::tablecell::correctCorrectedRequisitionOfChild(), getContentWidth(), dw::Ruler::getExtremesSimpl(), and dw::Ruler::sizeRequestSimpl().
|
inline |
|
inline |
References dw::core::style::StyleAttrs::boxOffsetY(), getStyle(), and dw::core::style::Box::top.
Referenced by boxDiffHeight(), dw::oof::OOFPosAbsMgr::containerBoxOffsetY(), and dw::Ruler::sizeRequestSimpl().
|
inline |
|
inline |
References dw::core::style::StyleAttrs::boxRestWidth(), getStyle(), and dw::core::style::Box::right.
Referenced by boxDiffWidth(), dw::oof::OOFPosAbsMgr::containerBoxRestWidth(), and dw::oof::OOFFloatsMgr::getSize().
bool dw::core::Widget::buttonPress | ( | EventButton * | event | ) |
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.
bool dw::core::Widget::buttonRelease | ( | EventButton * | event | ) |
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Textblock, and dw::Image.
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.
References DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, and DBG_OBJ_SET_NUM.
|
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.
void dw::core::Widget::calcFinalWidth | ( | style::Style * | style, |
int | refWidth, | ||
Widget * | refWidget, | ||
int | limitMinWidth, | ||
bool | forceValue, | ||
int * | finalWidth | ||
) |
int dw::core::Widget::calcHeight | ( | style::Length | cssValue, |
bool | usePercentage, | ||
int | refHeight, | ||
Widget * | refWidget, | ||
bool | forceValue | ||
) |
References dw::core::style::absLengthVal(), dw::tablecell::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(), and dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild().
int dw::core::Widget::calcWidth | ( | style::Length | cssValue, |
int | refWidth, | ||
Widget * | refWidget, | ||
int | limitMinWidth, | ||
bool | forceValue | ||
) |
References dw::core::style::absLengthVal(), dw::tablecell::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 correctExtremesOfChild().
|
inlineprotected |
References dw::core::Layout::changeAnchor().
void dw::core::Widget::containerSizeChanged | ( | ) |
References DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.
Referenced by dw::oof::OOFFloatsMgr::containerSizeChangedForChildren(), containerSizeChangedForChildren(), and dw::Textblock::containerSizeChangedForChildren().
|
protectedvirtual |
Reimplemented in dw::Textblock, dw::Table, dw::core::ui::Embed, dw::Image, dw::Ruler, and dw::Bullet.
References containerSizeChanged(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, dw::core::Iterator::getContent(), dw::core::Iterator::next(), dw::core::Iterator::unref(), and dw::core::Content::widget.
void dw::core::Widget::correctExtremes | ( | Extremes * | extremes, |
bool | useAdjustmentWidth | ||
) |
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, layout, dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, and dw::core::Extremes::minWidthIntrinsic.
Referenced by dw::Ruler::getExtremesSimpl().
|
protectedvirtual |
Reimplemented in dw::core::ui::Embed.
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, getMinWidth(), getStyle(), dw::core::Extremes::maxWidth, dw::core::style::StyleAttrs::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, dw::core::style::StyleAttrs::minWidth, dw::core::Extremes::minWidthIntrinsic, parent, quasiParent, and dw::core::style::StyleAttrs::width.
Referenced by dw::SimpleTableCell::correctExtremesOfChild(), dw::AlignedTableCell::correctExtremesOfChild(), correctExtremesOfChild(), and dw::core::ui::Embed::correctExtremesOfChildNoRec().
|
protected |
References 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, and dw::core::Requisition::width.
Referenced by dw::core::ui::Embed::correctReqHeightOfChildNoRec().
void dw::core::Widget::correctRequisition | ( | Requisition * | requisition, |
void(*)(int, int *, int *) | splitHeightFun, | ||
bool | allowDecreaseWidth, | ||
bool | allowDecreaseHeight | ||
) |
|
protectedvirtual |
Reimplemented in dw::core::ui::Embed.
References dw::core::Requisition::ascent, lout::misc::boolToStr(), container, correctRequisitionOfChild(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, dw::core::Requisition::descent, parent, quasiParent, and dw::core::Requisition::width.
Referenced by dw::SimpleTableCell::correctRequisitionOfChild(), dw::AlignedTableCell::correctRequisitionOfChild(), and correctRequisitionOfChild().
|
protected |
References dw::core::Requisition::ascent, lout::misc::boolToStr(), calcFinalWidth(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, dw::core::Requisition::descent, getMinWidth(), getStyle(), quasiParent, and dw::core::Requisition::width.
Referenced by dw::core::ui::Embed::correctReqWidthOfChildNoRec().
|
pure virtual |
Area is given in widget coordinates.
Implemented in dw::core::ui::Embed, dw::oof::OOFAwareWidget, dw::Image, dw::SimpleContainer, dw::Ruler, and dw::Bullet.
Referenced by dw::core::StackingContextMgr::draw(), dw::oof::OOFPositionedMgr::draw(), dw::oof::OOFFloatsMgr::drawFloats(), 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.
References dw::core::style::StyleAttrs::backgroundColor, dw::core::style::StyleAttrs::borderWidth, dw::core::style::Box::bottom, dw::core::style::drawBackground(), dw::core::style::drawBorder(), dw::core::Rectangle::height, layout, dw::core::style::Box::left, dw::core::style::StyleAttrs::margin, dw::core::style::Box::right, dw::core::style::Box::top, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.
void dw::core::Widget::drawInterruption | ( | View * | view, |
Rectangle * | area, | ||
DrawingContext * | context | ||
) |
See Interrupted drawing for details.
References dw::core::StackingProcessingContext::addWidgetProcessedAsInterruption(), dw::core::DrawingContext::getToplevelArea(), and layout.
Referenced by dw::Textblock::drawLevel().
Draw borders and background of a widget.
area is given in widget coordinates.
References dw::core::style::StyleAttrs::backgroundColor, dw::core::style::drawBackground(), dw::core::style::drawBorder(), dw::core::Rectangle::height, layout, parent, style, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.
Referenced by dw::Ruler::draw().
|
inlineprivate |
References dw::core::Layout::getExtremesCounter.
void dw::core::Widget::enterNotify | ( | EventCrossing * | event | ) |
Referenced by dw::core::Layout::enterNotify(), and dw::core::Layout::moveToWidget().
|
protectedvirtual |
Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.
References dw::core::style::Tooltip::onEnter().
Referenced by dw::core::ui::Embed::enterNotifyImpl().
|
inlineprivate |
References dw::core::Layout::queueResizeCounter.
|
inlineprivate |
References dw::core::Layout::sizeAllocateCounter.
|
inlineprivate |
References dw::core::Layout::sizeRequestCounter.
|
inline |
References EXTREMES_CHANGED.
|
inline |
References EXTREMES_QUEUED.
Referenced by dw::core::Layout::resizeIdle().
|
inlinevirtual |
Reimplemented in dw::Table, dw::Image, dw::AlignedTableCell, and dw::SimpleTableCell.
References adjustMinWidth.
|
inline |
References allocation.
Referenced by dw::oof::OOFFloatsMgr::collidesH(), 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.
References dw::core::style::absLengthVal(), dw::tablecell::applyPerHeight(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, dw::core::style::isAbsLength(), dw::core::style::isPerLength(), layout, and dw::core::style::perLengthVal_useThisOnlyForDebugging().
Referenced by calcHeight(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), dw::oof::OOFPosRelMgr::getChildPosY(), dw::oof::OOFPosAbsLikeMgr::getSize(), and dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren().
|
protectedvirtual |
Reimplemented in dw::Textblock, and dw::core::ui::Embed.
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, 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 getAvailHeightOfChild().
int dw::core::Widget::getAvailWidth | ( | bool | forceValue | ) |
Return available width including margin/border/padding (extraSpace?), not only the content width.
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, and layout.
Referenced by calcWidth(), dw::tablecell::correctAvailWidthOfChild(), dw::tablecell::correctCorrectedRequisitionOfChild(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), dw::oof::OOFPosRelMgr::getChildPosX(), dw::oof::OOFPosAbsLikeMgr::getSize(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), and dw::Ruler::sizeRequestSimpl().
|
protectedvirtual |
Reimplemented in dw::Textblock, and dw::core::ui::Embed.
References calcFinalWidth(), container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, getAvailWidthOfChild(), getStyle(), dw::core::style::LENGTH_AUTO, lout::misc::max(), parent, quasiParent, and dw::core::style::StyleAttrs::width.
Referenced by getAvailWidthOfChild().
style::Color * dw::core::Widget::getBgColor | ( | ) |
Get the actual background of a widget.
References dw::core::style::StyleAttrs::backgroundColor, bgColor, layout, parent, and style.
void dw::core::Widget::getBorderArea | ( | int * | xBor, |
int * | yBor, | ||
int * | widthBor, | ||
int * | heightBor | ||
) |
|
inlineprotected |
References boxDiffHeight(), and getHeight().
|
inlineprotected |
References boxDiffWidth(), and dw::core::Allocation::width.
void dw::core::Widget::getExtremes | ( | Extremes * | extremes, |
int | numPos = 0 , |
||
Widget ** | references = NULL , |
||
int * | x = NULL , |
||
int * | y = NULL |
||
) |
Wrapper for Widget::getExtremesImpl().
References dw::core::Extremes::adjustmentWidth, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM, dw::core::SizeParams::isEquivalent(), dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, and dw::core::Extremes::minWidthIntrinsic.
Referenced by dw::oof::OOFPosRelMgr::getExtremes(), dw::oof::OOFPosAbsLikeMgr::getExtremes(), dw::oof::OOFFloatsMgr::getFloatsExtremes(), and dw::Textblock::getWordExtremes().
|
inlineprivate |
References dw::core::Layout::getExtremesCounter.
|
protectedvirtual |
References DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
References lout::misc::notImplemented().
|
protectedvirtual |
Simple variant, to be implemented by widgets with extremes not depending on positions.
Reimplemented in dw::Textblock, dw::Table, dw::core::ui::Embed, dw::Image, dw::SimpleContainer, dw::Ruler, and dw::Bullet.
References lout::misc::notImplemented().
|
inline |
References 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.
References getGenerator().
Referenced by dw::core::DeepIterator::getRespectiveLevel().
|
inlineprotected |
References dw::core::Allocation::ascent, and dw::core::Allocation::descent.
Referenced by getContentHeight(), inAllocation(), and queueDraw().
|
inline |
References layout.
Referenced by 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.
References parent.
Referenced by getNearestCommonAncestor(), and dw::core::DeepIterator::getRespectiveLevel().
void dw::core::Widget::getMarginArea | ( | int * | xMar, |
int * | yMar, | ||
int * | widthMar, | ||
int * | heightMar | ||
) |
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.
References dw::core::Extremes::adjustmentWidth, DBG_IF_RTFL, DBG_OBJ_ENTER, DBG_OBJ_LEAVE_VAL, dw::tablecell::getAdjustMinWidth(), dw::core::Extremes::maxWidth, dw::core::Extremes::maxWidthIntrinsic, dw::core::Extremes::minWidth, and dw::core::Extremes::minWidthIntrinsic.
Referenced by correctExtremesOfChild(), correctReqWidthOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild().
Get the widget with the highest level, which is a direct ancestor of widget1 and widget2.
References getLevel(), and parent.
Referenced by dw::core::Layout::moveToWidget().
|
inlineprotected |
References stackingContextMgr.
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.
|
inline |
References parent.
Referenced by dw::Textblock::addParbreak(), 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::core::Layout::moveToWidget(), dw::oof::OOFAwareWidget::notifySetParent(), dw::core::Layout::processMouseEvent(), and setParent().
|
inline |
References style.
Referenced by dw::Textblock::accumulateWordForLine(), dw::core::StackingContextMgr::addChildSCWidget(), dw::oof::OOFFloatsMgr::addWidgetOOF(), dw::oof::OOFFloatsMgr::affectsLeftBorder(), dw::oof::OOFFloatsMgr::affectsRightBorder(), affectsSizeChangeContainerChild(), boxOffsetX(), boxOffsetY(), boxRestHeight(), boxRestWidth(), 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(), correctExtremesOfChild(), dw::core::ui::ComplexButtonResource::correctExtremesOfChild(), correctReqHeightOfChild(), dw::core::ui::ComplexButtonResource::correctRequisitionOfChild(), correctReqWidthOfChild(), dw::Bullet::draw(), dw::core::StackingContextMgr::draw(), dw::Textblock::TextblockIterator::getAllocation(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), getAvailHeightOfChild(), 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::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::core::StackingContextMgr::isEstablishingStackingContext(), dw::oof::OOFPosAbsLikeMgr::posXAbsolute(), dw::oof::OOFPosAbsLikeMgr::posYAbsolute(), and dw::Bullet::sizeRequestSimpl().
Widget * dw::core::Widget::getTopLevel | ( | ) |
Get the widget at the root of the tree, this widget is part from.
References parent.
Referenced by dw::core::Layout::moveToWidget().
|
virtual |
Reimplemented in dw::oof::OOFAwareWidget, and dw::Ruler.
Referenced by dw::oof::OOFFloatsMgr::getFloatWidgetAtPoint(), dw::core::StackingContextMgr::getWidgetAtPoint(), dw::oof::OOFPositionedMgr::getWidgetAtPoint(), dw::core::Layout::getWidgetAtPoint(), dw::Textblock::getWidgetAtPointLevel(), and dw::oof::OOFAwareWidget::getWidgetOOFAtPoint().
Widget * dw::core::Widget::getWidgetAtPointInterrupted | ( | int | x, |
int | y, | ||
GettingWidgetAtPointContext * | context | ||
) |
References dw::core::StackingProcessingContext::addWidgetProcessedAsInterruption().
Referenced by dw::Textblock::getWidgetAtPointLevel().
|
inline |
References widgetReference.
Referenced by dw::oof::OOFFloatsMgr::markSizeChange().
|
inline |
References getHeight(), wasAllocated(), dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::Ruler::getWidgetAtPoint().
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.
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, dw::core::Rectangle::width, dw::core::Rectangle::x, dw::core::Allocation::x, dw::core::Rectangle::y, and dw::core::Allocation::y.
Referenced by dw::core::StackingContextMgr::draw(), dw::oof::OOFPositionedMgr::draw(), dw::oof::OOFFloatsMgr::drawFloats(), and dw::Textblock::drawLine().
|
virtual |
Reimplemented in dw::Textblock, dw::Table, dw::AlignedTableCell, dw::Ruler, and dw::SimpleTableCell.
Referenced by dw::Textblock::initLine1Offset().
|
inline |
References buttonSensitive.
Referenced by dw::core::Layout::processMouseEvent().
|
virtual |
References dw::tablecell::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::Textblock, dw::Table, dw::core::ui::Embed, dw::Image, dw::SimpleContainer, dw::Ruler, and dw::Bullet.
Referenced by dw::core::CharIterator::CharIterator(), 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 |
References dw::core::Layout::getExtremesCounter.
void dw::core::Widget::leaveNotify | ( | EventCrossing * | event | ) |
Referenced by dw::core::Layout::leaveNotify(), and dw::core::Layout::moveToWidget().
|
protectedvirtual |
Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.
References dw::core::style::Tooltip::onLeave().
Referenced by dw::core::ui::Embed::leaveNotifyImpl().
|
inlineprivate |
References dw::core::Layout::queueResizeCounter.
|
inlineprivate |
References dw::core::Layout::sizeAllocateCounter.
|
inlineprivate |
References dw::core::Layout::sizeRequestCounter.
|
protectedvirtual |
Reimplemented in dw::Textblock.
|
protectedvirtual |
Reimplemented in dw::Textblock.
bool dw::core::Widget::motionNotify | ( | EventMotion * | event | ) |
Referenced by dw::core::Layout::processMouseEvent().
|
protectedvirtual |
Reimplemented in dw::Textblock, and dw::Image.
|
inline |
References NEEDS_ALLOCATE.
|
inline |
References NEEDS_RESIZE.
|
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::Textblock, and dw::oof::OOFAwareWidget.
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::Textblock, and dw::oof::OOFAwareWidget.
|
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.
Referenced by dw::core::SizeParams::forChild().
|
inlineprotected |
References ALLOCATE_QUEUED, DBG_IF_RTFL, DBG_OBJ_SET_SYM, EXTREMES_CHANGED, EXTREMES_QUEUED, NEEDS_ALLOCATE, NEEDS_RESIZE, RESIZE_QUEUED, and WAS_ALLOCATED.
Referenced by setFlags(), and unsetFlags().
|
inlineprotected |
References getHeight(), queueDrawArea(), and dw::core::Allocation::width.
Referenced by dw::Image::forceMapRedraw(), and resizeDrawImpl().
|
protected |
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE, and layout.
Referenced by queueDraw().
|
private |
This method should be called, when a widget changes its size.
A "fast" queueResize will ignore the anchestors, and furthermore not trigger the idle function. Used only within viewportSizeChanged, and not available outside Layout and Widget.
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, layout, parent, and parentRef.
Referenced by queueResize(), queueResizeFast(), dw::ListItem::setMaxValue(), and dw::AlignedTableCell::setMaxValue().
|
inlineprotected |
References queueResize().
Referenced by dw::Textblock::addParbreak(), and dw::core::ui::Resource::queueResize().
|
inlineprivate |
References dw::core::Layout::queueResizeCounter.
|
inlineprivate |
References queueResize().
|
inlineprotected |
References dw::core::Layout::removeAnchor().
|
virtual |
References lout::misc::notImplemented().
|
inlineprotectedvirtual |
Called after sizeAllocateImpl() to redraw necessary areas. By default the whole widget is redrawn.
Reimplemented in dw::Textblock, and dw::Table.
References queueDraw().
|
inlineprivate |
References dw::core::Layout::resizeIdleCounter.
|
inline |
References RESIZE_QUEUED.
Referenced by dw::core::Layout::resizeIdle().
void dw::core::Widget::scrollTo | ( | HPosition | hpos, |
VPosition | vpos, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
References layout.
|
inlineprotected |
References dw::core::SelectionState::handleEvent(), and dw::core::Layout::selectionState.
|
inlinestatic |
References adjustMinWidth.
void dw::core::Widget::setBgColor | ( | style::Color * | bgColor | ) |
Set the background "behind" the widget, if it is not the background of the parent widget, e.g. the background of a table row.
void dw::core::Widget::setButtonSensitive | ( | bool | buttonSensitive | ) |
Referenced by dw::AlignedTableCell::AlignedTableCell().
|
inlineprotected |
References dw::core::Layout::setCursor().
|
inline |
|
inlineprotected |
References printFlag().
Referenced by dw::core::Layout::resizeIdle().
|
inline |
References generator.
Referenced by dw::Textblock::addWidget().
void dw::core::Widget::setParent | ( | Widget * | parent | ) |
References dw::core::StackingContextMgr::addChildSCWidget(), buttonSensitive, DBG_OBJ_ASSOC_PARENT, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_PTR, getParent(), layout, layout, parent, stackingContextMgr, and stackingContextWidget.
Referenced by dw::Textblock::addWidget(), and dw::SimpleContainer::setChild().
void dw::core::Widget::setQuasiParent | ( | Widget * | quasiParent | ) |
References DBG_OBJ_SET_PTR.
|
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.
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, 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(), dw::core::style::Style::ref(), dw::core::style::StyleImage::removeExternalImgRenderer(), dw::core::style::Box::right, dw::core::style::StyleAttrs::sizeDiffs(), dw::core::style::Box::top, dw::core::style::Style::unref(), dw::core::style::StyleAttrs::vBorderSpacing, and dw::core::style::StyleAttrs::width.
Referenced by dw::Textblock::addWidget(), dw::Textblock::changeLinkColor(), main(), dw::core::ui::Embed::setStyle(), and textTimeout().
|
inline |
References DBG_OBJ_SET_PTR, and widgetReference.
Referenced by dw::Textblock::addWidget().
void dw::core::Widget::sizeAllocate | ( | Allocation * | allocation | ) |
Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed.
References dw::core::Allocation::ascent, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, DBG_OBJ_SET_NUM, dw::core::Allocation::descent, layout, dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by dw::oof::OOFPosRelMgr::sizeAllocateChildren(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), dw::oof::OOFFloatsMgr::sizeAllocateFloats(), and dw::Textblock::sizeAllocateImpl().
|
inlineprivate |
References dw::core::Layout::sizeAllocateCounter.
|
protectedvirtual |
Reimplemented in dw::Textblock, dw::Table, dw::core::ui::Embed, dw::Image, and dw::SimpleContainer.
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.
References dw::core::Requisition::ascent, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM, dw::core::Requisition::descent, dw::core::SizeParams::isEquivalent(), and dw::core::Requisition::width.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcPosAndSizeChildOfChild(), dw::oof::OOFPosRelMgr::calcWidgetRefSize(), dw::oof::OOFFloatsMgr::ensureFloatSize(), dw::oof::OOFPosRelMgr::getSize(), and dw::oof::OOFPosRelMgr::sizeAllocateChildren().
|
inlineprivate |
References dw::core::Layout::sizeRequestCounter.
|
protectedvirtual |
References DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.
|
virtual |
See Sizes of Dillo Widgets (or Size requisitions depending on positions).
Reimplemented in dw::Textblock.
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::Table, dw::core::ui::Embed, dw::Image, dw::SimpleContainer, dw::Ruler, and dw::Bullet.
References lout::misc::notImplemented().
|
inlineprotected |
References printFlag().
Referenced by dw::core::Layout::resizeIdle().
|
protectedvirtual |
Must be implemengted by a method returning true, when getAvailHeight() is called.
Referenced by affectsSizeChangeContainerChild().
|
protectedvirtual |
Must be implemengted by a method returning true, when getAvailWidth() is called.
Reimplemented in dw::Textblock, dw::Table, and dw::Ruler.
Referenced by affectsSizeChangeContainerChild().
|
inline |
|
friend |
|
staticprivate |
Referenced by getAdjustMinWidth(), and setAdjustMinWidth().
|
protected |
The current allocation: size and position, always relative to the canvas.
Referenced by dw::Bullet::draw(), getAllocation(), dw::Textblock::TextblockIterator::getAllocation(), intersects(), dw::Textblock::lineYOffsetCanvas(), and dw::Textblock::lineYOffsetWidget().
|
private |
See dw::core::Widget::setBgColor().
Referenced by getBgColor().
|
private |
See dw::core::Widget::setButtonSensitive().
Referenced by isButtonSensitive(), and setParent().
|
private |
|
static |
|
private |
The containing widget, equivalent to the "containing block" defined by CSS. May be NULL, in this case the viewport is used.
Referenced by dw::core::Layout::addWidget(), correctExtremesOfChild(), correctReqHeightOfChild(), correctRequisitionOfChild(), correctReqWidthOfChild(), getAvailHeightOfChild(), getAvailWidthOfChild(), and getContainer().
|
private |
|
private |
|
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.
|
private |
Analogue to dw::core::Widget::requisition.
|
private |
|
private |
|
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.
Referenced by setGenerator().
|
protected |
|
private |
The parent widget, NULL for top-level widgets.
Referenced by correctExtremesOfChild(), correctRequisitionOfChild(), drawWidgetBox(), getAvailHeightOfChild(), getAvailWidthOfChild(), getBgColor(), getGenerator(), getLevel(), getNearestCommonAncestor(), getParent(), getTopLevel(), intersects(), queueResize(), and setParent().
int dw::core::Widget::parentRef |
This value is defined by the parent widget, and used for incremential resizing.
See documentation for an explanation.
Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addWidget(), queueResize(), and dw::Textblock::wrapWordInFlow().
|
private |
|
private |
Size_request() stores the result of the last call of size_request_impl().
Do not read this directly, but call size_request().
|
private |
|
protected |
Set iff this widget constitutes a stacking context, as defined by CSS.
Referenced by dw::core::Layout::addWidget(), getNextStackingContextMgr(), and setParent().
|
protected |
The bottom-most ancestor (or this) for which stackingContextMgr is set.
Referenced by dw::core::Layout::addWidget(), and setParent().
|
private |
Referenced by drawWidgetBox(), getBgColor(), and getStyle().
|
protected |
|
private |
Referenced by getWidgetReference(), and setWidgetReference().