dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dw::core::Widget Class Referenceabstract

The base class of all dillo widgets. More...

#include <widget.hh>

Inheritance diagram for dw::core::Widget:
[legend]
Collaboration diagram for dw::core::Widget:
[legend]

Classes

class  WidgetImgRenderer
 Implementation which represents the whole widget. More...
 

Public Member Functions

void setDeleteCallback (DW_Callback_t func, void *data)
 
 Widget ()
 
 ~Widget ()
 
bool needsResize ()
 
bool needsAllocate ()
 
bool extremesChanged ()
 
bool wasAllocated ()
 
bool usesHints ()
 
bool hasContents ()
 
bool blockLevel ()
 
void setParent (Widget *parent)
 
style::StylegetStyle ()
 
AllocationgetAllocation ()
 
void sizeRequest (Requisition *requisition)
 This method is a wrapper for Widget::sizeRequestImpl(); it calls the latter only when needed. More...
 
void getExtremes (Extremes *extremes)
 Wrapper for Widget::getExtremesImpl(). More...
 
void sizeAllocate (Allocation *allocation)
 Wrapper for Widget::sizeAllocateImpl, calls the latter only when needed. More...
 
virtual void setWidth (int width)
 
virtual void setAscent (int ascent)
 
virtual void setDescent (int descent)
 
bool intersects (Rectangle *area, Rectangle *intersection)
 Calculates the intersection of widget->allocation and area, returned in intersection (in widget coordinates!). More...
 
virtual void draw (View *view, Rectangle *area)=0
 
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::ColorgetBgColor ()
 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 ()
 
WidgetgetParent ()
 
WidgetgetTopLevel ()
 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...
 
WidgetgetNearestCommonAncestor (Widget *otherWidget)
 Get the widget with the highest level, which is a direct ancestor of widget1 and widget2. More...
 
LayoutgetLayout ()
 
virtual WidgetgetWidgetAtPoint (int x, int y, int level)
 Search recursively through widget. More...
 
void scrollTo (HPosition hpos, VPosition vpos, int x, int y, int width, int height)
 
void getPaddingArea (int *xPad, int *yPad, int *widthPad, int *heightPad)
 Return the padding area (content plus padding). More...
 
virtual Iteratoriterator (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 ()
 
virtual 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 Objectclone ()
 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...
 

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 {
  NEEDS_RESIZE = 1 << 0, NEEDS_ALLOCATE = 1 << 1, EXTREMES_CHANGED = 1 << 2, USES_HINTS = 1 << 3,
  HAS_CONTENTS = 1 << 4, WAS_ALLOCATED = 1 << 5, BLOCK_LEVEL = 1 << 6
}
 

Protected Member Functions

int getHeight ()
 
int getContentWidth ()
 
int getContentHeight ()
 
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)
 This method should be called, when a widget changes its size. More...
 
virtual void sizeRequestImpl (Requisition *requisition)=0
 See Sizes of Dillo Widgets. More...
 
virtual void getExtremesImpl (Extremes *extremes)
 See Sizes of Dillo Widgets. 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 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

WidgetImgRendererwidgetImgRenderer
 
Allocation allocation
 The current allocation: size and position, always relative to the canvas. More...
 
Layoutlayout
 

Private Attributes

Widgetparent
 The parent widget, NULL for top-level widgets. More...
 
style::Stylestyle
 
Flags flags
 
Requisition requisition
 Size_request() stores the result of the last call of size_request_impl(). More...
 
Extremes extremes
 Analogue to dw::core::Widget::requisition. More...
 
style::ColorbgColor
 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
 

Friends

class Layout
 

Detailed Description

The base class of all dillo widgets.

See also
Dillo Widget Overview, Layout and Widgets

Definition at line 23 of file widget.hh.

Member Enumeration Documentation

◆ Flags

enum dw::core::Widget::Flags
protected
Enumerator
NEEDS_RESIZE 

Set, when dw::core::Widget::requisition is not up to date anymore.

NEEDS_ALLOCATE 

Only used internally, set to enforce size allocation.

(I've forgotten the case, for which this is necessary.)

EXTREMES_CHANGED 

Set, when dw::core::Widget::extremes is not up to date anymore.

USES_HINTS 

Set by the widget itself (in the constructor), when set... methods are implemented.

Will hopefully be removed, after redesigning the size model.

HAS_CONTENTS 

Set by the widget itself (in the constructor), when it contains some contents, e.g. an image, as opposed to a horizontal ruler.

Will hopefully be removed, after redesigning the size model.

WAS_ALLOCATED 

Set, when a widget was already once allocated,.

The dw::Image widget uses this flag, see dw::Image::setBuffer.

BLOCK_LEVEL 

Set for block-level widgets (as opposed to inline widgets)

Definition at line 28 of file widget.hh.

Constructor & Destructor Documentation

◆ Widget()

dw::core::Widget::Widget ( )

Definition at line 67 of file widget.cc.

References DBG_OBJ_CREATE.

◆ ~Widget()

dw::core::Widget::~Widget ( )

Definition at line 93 of file widget.cc.

References DBG_OBJ_DELETE.

Member Function Documentation

◆ addAnchor() [1/2]

char* dw::core::Widget::addAnchor ( const char *  name)
inlineprotected

Definition at line 209 of file widget.hh.

References dw::core::Layout::addAnchor(), and layout.

◆ addAnchor() [2/2]

char* dw::core::Widget::addAnchor ( const char *  name,
int  y 
)
inlineprotected

Definition at line 212 of file widget.hh.

References dw::core::Layout::addAnchor(), and layout.

◆ blockLevel()

bool dw::core::Widget::blockLevel ( )
inline

Definition at line 264 of file widget.hh.

References BLOCK_LEVEL, and flags.

Referenced by dw::Textblock::accumulateWordForLine(), and dw::Textblock::initLine1Offset().

◆ buttonPress()

bool dw::core::Widget::buttonPress ( EventButton event)

Definition at line 293 of file widget.cc.

Referenced by dw::core::Layout::processMouseEvent().

◆ buttonPressImpl()

bool dw::core::Widget::buttonPressImpl ( EventButton event)
protectedvirtual

Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.

Definition at line 645 of file widget.cc.

◆ buttonRelease()

bool dw::core::Widget::buttonRelease ( EventButton event)

Definition at line 298 of file widget.cc.

Referenced by dw::core::Layout::processMouseEvent().

◆ buttonReleaseImpl()

bool dw::core::Widget::buttonReleaseImpl ( EventButton event)
protectedvirtual

Reimplemented in dw::Textblock, and dw::Image.

Definition at line 650 of file widget.cc.

◆ changeAnchor()

void dw::core::Widget::changeAnchor ( char *  name,
int  y 
)
inlineprotected

Definition at line 215 of file widget.hh.

References dw::core::Layout::changeAnchor(), and layout.

◆ draw()

virtual void dw::core::Widget::draw ( View view,
Rectangle area 
)
pure virtual

Area is given in widget coordinates.

Implemented in dw::core::ui::Embed, dw::Textblock, dw::Table, dw::Image, dw::Ruler, and dw::Bullet.

Referenced by dw::Textblock::drawLine().

◆ drawBox()

void dw::core::Widget::drawBox ( View view,
style::Style style,
Rectangle area,
int  x,
int  y,
int  width,
int  height,
bool  inverse 
)

◆ drawSelected()

void dw::core::Widget::drawSelected ( View view,
Rectangle area 
)

Definition at line 469 of file widget.cc.

◆ drawWidgetBox()

void dw::core::Widget::drawWidgetBox ( View view,
Rectangle area,
bool  inverse 
)

Draw borders and background of a widget.

area is given in widget coordinates.

Definition at line 436 of file widget.cc.

References dw::core::style::drawBackground(), dw::core::style::drawBorder(), dw::core::Rectangle::height, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.

Referenced by dw::Ruler::draw().

◆ enterNotify()

void dw::core::Widget::enterNotify ( EventCrossing event)

Definition at line 308 of file widget.cc.

Referenced by dw::core::Layout::enterNotify(), and dw::core::Layout::moveToWidget().

◆ enterNotifyImpl()

void dw::core::Widget::enterNotifyImpl ( EventCrossing event)
protectedvirtual

Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.

Definition at line 660 of file widget.cc.

References dw::core::style::Tooltip::onEnter().

Referenced by dw::core::ui::Embed::enterNotifyImpl().

◆ extremesChanged()

bool dw::core::Widget::extremesChanged ( )
inline

Definition at line 260 of file widget.hh.

References EXTREMES_CHANGED, and flags.

◆ getAllocation()

Allocation* dw::core::Widget::getAllocation ( )
inline

◆ getBgColor()

style::Color * dw::core::Widget::getBgColor ( )

Get the actual background of a widget.

Definition at line 377 of file widget.cc.

References dw::core::style::StyleAttrs::backgroundColor, bgColor, getBgColor(), parent, and style.

Referenced by getBgColor().

◆ getContentHeight()

int dw::core::Widget::getContentHeight ( )
inlineprotected

Definition at line 156 of file widget.hh.

References dw::core::style::StyleAttrs::boxDiffHeight(), getHeight(), and style.

◆ getContentWidth()

int dw::core::Widget::getContentWidth ( )
inlineprotected

◆ getExtremes()

void dw::core::Widget::getExtremes ( Extremes extremes)

◆ getExtremesImpl()

void dw::core::Widget::getExtremesImpl ( Extremes extremes)
protectedvirtual

◆ getHeight()

int dw::core::Widget::getHeight ( )
inlineprotected

Definition at line 153 of file widget.hh.

References allocation, dw::core::Allocation::ascent, and dw::core::Allocation::descent.

Referenced by getContentHeight(), and queueDraw().

◆ getLayout()

Layout* dw::core::Widget::getLayout ( )
inline

Definition at line 307 of file widget.hh.

References layout.

Referenced by a_Html_image_new(), and dw::core::Iterator::scrollTo().

◆ getLevel()

int dw::core::Widget::getLevel ( )

Get the level of the widget within the tree.

The root widget has the level 0.

Definition at line 499 of file widget.cc.

References parent.

Referenced by dw::core::DeepIterator::DeepIterator(), and getNearestCommonAncestor().

◆ getNearestCommonAncestor()

Widget * dw::core::Widget::getNearestCommonAncestor ( Widget otherWidget)

Get the widget with the highest level, which is a direct ancestor of widget1 and widget2.

Definition at line 516 of file widget.cc.

References getLevel(), MSG_WARN, and parent.

Referenced by dw::core::Layout::moveToWidget().

◆ getPaddingArea()

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 602 of file widget.cc.

◆ getParent()

◆ getStyle()

◆ getTopLevel()

Widget * dw::core::Widget::getTopLevel ( )

Get the widget at the root of the tree, this widget is part from.

Definition at line 484 of file widget.cc.

References parent.

Referenced by dw::core::Layout::moveToWidget().

◆ getWidgetAtPoint()

Widget * dw::core::Widget::getWidgetAtPoint ( int  x,
int  y,
int  level 
)
virtual

Search recursively through widget.

Used by dw::core::Layout:getWidgetAtPoint.

Reimplemented in dw::Textblock.

Definition at line 552 of file widget.cc.

References dw::core::Iterator::getContent(), getWidgetAtPoint(), dw::core::Iterator::next(), dw::core::Iterator::unref(), and dw::core::Content::widget.

Referenced by getWidgetAtPoint(), and dw::Textblock::getWidgetAtPoint().

◆ hasContents()

bool dw::core::Widget::hasContents ( )
inline

Definition at line 263 of file widget.hh.

References flags, and HAS_CONTENTS.

Referenced by dw::Textblock::getWordExtremes().

◆ intersects()

bool dw::core::Widget::intersects ( Rectangle area,
Rectangle intersection 
)

Calculates the intersection of widget->allocation and area, returned in intersection (in widget coordinates!).

Typically used by containers when drawing their children. Returns whether intersection is not empty.

Definition at line 123 of file widget.cc.

References dw::core::Rectangle::height, dw::core::Rectangle::intersectsWith(), dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.

Referenced by dw::Textblock::drawLine().

◆ isButtonSensitive()

bool dw::core::Widget::isButtonSensitive ( )
inline

Definition at line 300 of file widget.hh.

References buttonSensitive.

Referenced by dw::core::Layout::processMouseEvent().

◆ iterator()

virtual Iterator* dw::core::Widget::iterator ( Content::Type  mask,
bool  atEnd 
)
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::Image, dw::Ruler, dw::Bullet, and dw::core::ui::Embed.

Referenced by dw::core::CharIterator::CharIterator(), dw::core::DeepIterator::DeepIterator(), dw::core::DeepIterator::next(), dw::core::DeepIterator::prev(), dw::core::DeepIterator::searchDownward(), and dw::core::DeepIterator::searchSideward().

◆ leaveNotify()

void dw::core::Widget::leaveNotify ( EventCrossing event)

Definition at line 313 of file widget.cc.

Referenced by dw::core::Layout::leaveNotify(), and dw::core::Layout::moveToWidget().

◆ leaveNotifyImpl()

void dw::core::Widget::leaveNotifyImpl ( EventCrossing event)
protectedvirtual

Reimplemented in dw::Textblock, dw::core::ui::Embed, and dw::Image.

Definition at line 668 of file widget.cc.

References dw::core::style::Tooltip::onLeave().

Referenced by dw::core::ui::Embed::leaveNotifyImpl().

◆ markExtremesChange()

void dw::core::Widget::markExtremesChange ( int  ref)
protectedvirtual

See Sizes of Dillo Widgets.

Reimplemented in dw::Textblock.

Definition at line 629 of file widget.cc.

◆ markSizeChange()

void dw::core::Widget::markSizeChange ( int  ref)
protectedvirtual

See Sizes of Dillo Widgets.

Reimplemented in dw::Textblock.

Definition at line 625 of file widget.cc.

◆ motionNotify()

bool dw::core::Widget::motionNotify ( EventMotion event)

Definition at line 303 of file widget.cc.

Referenced by dw::core::Layout::processMouseEvent().

◆ motionNotifyImpl()

bool dw::core::Widget::motionNotifyImpl ( EventMotion event)
protectedvirtual

Reimplemented in dw::Textblock, and dw::Image.

Definition at line 655 of file widget.cc.

◆ needsAllocate()

bool dw::core::Widget::needsAllocate ( )
inline

Definition at line 259 of file widget.hh.

References flags, and NEEDS_ALLOCATE.

◆ needsResize()

bool dw::core::Widget::needsResize ( )
inline

Definition at line 258 of file widget.hh.

References flags, and NEEDS_RESIZE.

◆ queueDraw()

void dw::core::Widget::queueDraw ( )
inlineprotected

◆ queueDrawArea()

void dw::core::Widget::queueDrawArea ( int  x,
int  y,
int  width,
int  height 
)
protected
Todo:
Maybe only the intersection?

Definition at line 158 of file widget.cc.

References _MSG.

Referenced by queueDraw().

◆ queueResize()

void dw::core::Widget::queueResize ( int  ref,
bool  extremesChanged 
)
protected

This method should be called, when a widget changes its size.

Definition at line 171 of file widget.cc.

References parent, and parentRef.

Referenced by dw::Textblock::addParbreak(), dw::core::ui::Resource::queueResize(), dw::ListItem::setMaxValue(), and dw::TableCell::setMaxValue().

◆ removeAnchor()

void dw::core::Widget::removeAnchor ( char *  name)
inlineprotected

Definition at line 218 of file widget.hh.

References layout, and dw::core::Layout::removeAnchor().

◆ removeChild()

void dw::core::Widget::removeChild ( Widget child)
virtual

Definition at line 676 of file widget.cc.

References lout::misc::assertNotReached().

◆ resizeDrawImpl()

virtual void dw::core::Widget::resizeDrawImpl ( )
inlineprotectedvirtual

Called after sizeAllocateImpl() to redraw necessary areas. By default the whole widget is redrawn.

Reimplemented in dw::Textblock, and dw::Table.

Definition at line 191 of file widget.hh.

References queueDraw().

◆ scrollTo()

void dw::core::Widget::scrollTo ( HPosition  hpos,
VPosition  vpos,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 589 of file widget.cc.

References scrollTo().

Referenced by scrollTo().

◆ selectionHandleEvent()

bool dw::core::Widget::selectionHandleEvent ( SelectionState::EventType  eventType,
Iterator it,
int  charPos,
int  linkNo,
MousePositionEvent event 
)
inlineprotected

◆ setAscent()

void dw::core::Widget::setAscent ( int  ascent)
virtual

Reimplemented in dw::Textblock, dw::Table, and dw::core::ui::Embed.

Definition at line 637 of file widget.cc.

Referenced by dw::Textblock::calcWidgetSize().

◆ setBgColor()

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.

Definition at line 369 of file widget.cc.

◆ setButtonSensitive()

void dw::core::Widget::setButtonSensitive ( bool  buttonSensitive)

Definition at line 474 of file widget.cc.

Referenced by dw::TableCell::TableCell().

◆ setCursor()

void dw::core::Widget::setCursor ( style::Cursor  cursor)
inlineprotected

Definition at line 223 of file widget.hh.

References layout, and dw::core::Layout::setCursor().

◆ setDeleteCallback()

void dw::core::Widget::setDeleteCallback ( DW_Callback_t  func,
void *  data 
)
inline

Definition at line 249 of file widget.hh.

References deleteCallbackData, and deleteCallbackFunc.

◆ setDescent()

void dw::core::Widget::setDescent ( int  descent)
virtual

Reimplemented in dw::Textblock, dw::Table, and dw::core::ui::Embed.

Definition at line 641 of file widget.cc.

Referenced by dw::Textblock::calcWidgetSize().

◆ setFlags()

void dw::core::Widget::setFlags ( Flags  f)
inlineprotected

Definition at line 161 of file widget.hh.

References flags.

Referenced by dw::Ruler::Ruler(), and dw::core::ui::Embed::setUsesHints().

◆ setParent()

void dw::core::Widget::setParent ( Widget parent)

Definition at line 144 of file widget.cc.

References buttonSensitive, DBG_OBJ_ASSOC_PARENT, and layout.

Referenced by dw::Textblock::addWidget().

◆ setStyle()

◆ setWidth()

void dw::core::Widget::setWidth ( int  width)
virtual

Reimplemented in dw::Textblock, dw::Table, and dw::core::ui::Embed.

Definition at line 633 of file widget.cc.

Referenced by dw::Textblock::calcWidgetSize().

◆ sizeAllocate()

void dw::core::Widget::sizeAllocate ( Allocation allocation)

◆ sizeAllocateImpl()

void dw::core::Widget::sizeAllocateImpl ( Allocation allocation)
protectedvirtual

See Sizes of Dillo Widgets.

Reimplemented in dw::Textblock, dw::Table, dw::Image, and dw::core::ui::Embed.

Definition at line 621 of file widget.cc.

◆ sizeRequest()

void dw::core::Widget::sizeRequest ( Requisition requisition)

This method is a wrapper for Widget::sizeRequestImpl(); it calls the latter only when needed.

Todo:
Check requisition == &(this->requisition) and do what?

Definition at line 214 of file widget.cc.

References dw::core::Requisition::ascent, DBG_OBJ_SET_NUM, dw::core::Requisition::descent, and dw::core::Requisition::width.

Referenced by dw::Textblock::calcWidgetSize().

◆ sizeRequestImpl()

virtual void dw::core::Widget::sizeRequestImpl ( Requisition requisition)
protectedpure virtual

◆ unsetFlags()

void dw::core::Widget::unsetFlags ( Flags  f)
inlineprotected

Definition at line 162 of file widget.hh.

References flags.

Referenced by dw::Ruler::Ruler().

◆ usesHints()

bool dw::core::Widget::usesHints ( )
inline

Definition at line 262 of file widget.hh.

References flags, and USES_HINTS.

Referenced by dw::Textblock::calcWidgetSize(), and dw::Textblock::getWordExtremes().

◆ wasAllocated()

bool dw::core::Widget::wasAllocated ( )
inline

Definition at line 261 of file widget.hh.

References flags, and WAS_ALLOCATED.

Referenced by dw::Textblock::WordImgRenderer::readyToDraw(), and dw::Textblock::sizeAllocateImpl().

Friends And Related Function Documentation

◆ Layout

friend class Layout
friend

Definition at line 25 of file widget.hh.

Member Data Documentation

◆ allocation

◆ bgColor

style::Color* dw::core::Widget::bgColor
private

See dw::core::Widget::setBgColor().

Definition at line 124 of file widget.hh.

Referenced by getBgColor().

◆ buttonSensitive

bool dw::core::Widget::buttonSensitive
private

See dw::core::Widget::setButtonSensitive().

Definition at line 129 of file widget.hh.

Referenced by isButtonSensitive(), and setParent().

◆ buttonSensitiveSet

bool dw::core::Widget::buttonSensitiveSet
private

See dw::core::Widget::setButtonSensitive().

Definition at line 134 of file widget.hh.

◆ CLASS_ID

int dw::core::Widget::CLASS_ID = -1
static

Definition at line 253 of file widget.hh.

◆ deleteCallbackData

void* dw::core::Widget::deleteCallbackData
private

Definition at line 245 of file widget.hh.

Referenced by setDeleteCallback().

◆ deleteCallbackFunc

DW_Callback_t dw::core::Widget::deleteCallbackFunc
private

Definition at line 246 of file widget.hh.

Referenced by setDeleteCallback().

◆ extremes

Extremes dw::core::Widget::extremes
private

Analogue to dw::core::Widget::requisition.

Definition at line 119 of file widget.hh.

◆ flags

◆ layout

◆ parent

Widget* dw::core::Widget::parent
private

The parent widget, NULL for top-level widgets.

Definition at line 103 of file widget.hh.

Referenced by getBgColor(), getLevel(), getNearestCommonAncestor(), getParent(), getTopLevel(), and queueResize().

◆ parentRef

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 143 of file widget.hh.

Referenced by dw::Textblock::accumulateWordForLine(), dw::Textblock::addWidget(), queueResize(), and dw::Textblock::wordWrap().

◆ requisition

Requisition dw::core::Widget::requisition
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 114 of file widget.hh.

Referenced by dw::Bullet::sizeRequestImpl(), and dw::Ruler::sizeRequestImpl().

◆ style

◆ widgetImgRenderer

WidgetImgRenderer* dw::core::Widget::widgetImgRenderer
protected

Definition at line 97 of file widget.hh.


The documentation for this class was generated from the following files: