1 #ifndef __DW_WIDGET_HH__
2 #define __DW_WIDGET_HH__
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
8 #include "../lout/identity.hh"
93 void getBgArea (
int *x,
int *y,
int *width,
int *height);
94 void getRefArea (
int *xRef,
int *yRef,
int *widthRef,
int *heightRef);
96 void draw (
int x,
int y,
int width,
int height);
287 Widget **references,
int *x,
int *y);
299 Widget **references,
int *x,
int *y);
335 void (*splitHeightFun) (
int,
int*,
337 bool allowDecreaseWidth,
338 bool allowDecreaseHeight);
340 bool allowDecreaseWidth);
342 void (*splitHeightFun) (
int,
int*,
int*),
343 bool allowDecreaseHeight);
345 bool useAdjustmentWidth);
364 {
return layout->
addAnchor (
this, name); }
367 {
return layout->
addAnchor (
this, name, y); }
380 inline bool selectionButtonPress (
Iterator *it,
int charPos,
int linkNo,
384 inline bool selectionButtonRelease (Iterator *it,
int charPos,
int linkNo,
385 EventButton *event,
bool withinContent)
388 inline bool selectionButtonMotion (Iterator *it,
int charPos,
int linkNo,
389 EventMotion *event,
bool withinContent)
393 Iterator *it,
int charPos,
int linkNo,
404 { deleteCallbackFunc = func; deleteCallbackData = data; }
452 return wasAllocated () && x >= allocation.
x && y >= allocation.
y &&
453 x <= allocation.
x + allocation.
width &&
489 Widget **references = NULL,
int *x = NULL,
int *y = NULL);
491 Widget **references = NULL,
int *x = NULL,
int *y = NULL);
500 void (*splitHeightFun) (
int,
int*,
int*),
501 bool allowDecreaseWidth,
bool allowDecreaseHeight);
504 int limitMinWidth,
bool forceValue);
506 int limitMinWidth,
bool forceValue,
int *finalWidth);
508 Widget *refWidget,
bool forceValue);
509 static void adjustHeight (
int *height,
bool allowDecreaseHeight,
int ascent,
545 int x,
int y,
int width,
int height,
bool inverse);
570 int x,
int y,
int width,
int height);
572 void getMarginArea (
int *xMar,
int *yMar,
int *widthMar,
int *heightMar);
573 void getBorderArea (
int *xBor,
int *yBor,
int *widthBor,
int *heightBor);
574 void getPaddingArea (
int *xPad,
int *yPad,
int *widthPad,
int *heightPad);
600 #endif // __DW_WIDGET_HH__
Cursor
Definition: style.hh:200
void splitHeightPreserveAscent(int height, int *ascent, int *descent)
Definition: widget.cc:1944
int x
Definition: types.hh:165
int boxOffsetX()
Definition: style.hh:591
int bottom
Definition: style.hh:507
Set at the top when getting the widget at the point.
Definition: types.hh:312
void removeAnchor(Widget *widget, char *name)
Definition: layout.cc:775
SelectionState selectionState
Definition: layout.hh:187
Represents a dimension box according to the CSS box model.
Definition: style.hh:503
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
Instances of classes, which are sub classes of this class, may be identified at run-time.
Definition: identity.hh:98
Type
Definition: types.hh:199
int right
Definition: style.hh:507
int queueResizeCounter
Definition: layout.hh:248
int top
Definition: style.hh:507
The central class for managing and drawing a widget tree.
Definition: layout.hh:16
int getExtremesCounter
Definition: layout.hh:248
int sizeRequestCounter
Definition: layout.hh:248
#define DBG_IF_RTFL
Definition: debug.hh:73
Represents a enter or leave notify event.
Definition: events.hh:74
bool handleEvent(EventType eventType, Iterator *it, int charPos, int linkNo, MousePositionEvent *event)
General form of dw::core::SelectionState::buttonPress, dw::core::SelectionState::buttonRelease and dw...
Definition: selection.cc:233
See Handling stacking contexts.
Definition: stackingcontextmgr.hh:19
void changeAnchor(Widget *widget, char *name, int y)
Definition: layout.cc:765
void setCursor(style::Cursor cursor)
Definition: layout.cc:801
Hold arguments passed to dw::core::Widget::sizeRequest and dw::core::Widget::getExtremes, as described in Size requisitions depending on positions.
Definition: tools.hh:18
int sizeAllocateCounter
Definition: layout.hh:248
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
#define DBG_OBJ_SET_SYM(var, val)
Definition: debug_rtfl.hh:422
bool buttonPress(Iterator *it, int charPos, int linkNo, EventButton *event)
Definition: selection.cc:93
int boxRestHeight()
Definition: style.hh:598
int width
Definition: types.hh:167
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
HPosition
Definition: types.hh:15
bool buttonMotion(Iterator *it, int charPos, int linkNo, EventMotion *event)
Definition: selection.cc:210
VPosition
Definition: types.hh:25
Base class for all mouse events related to a specific position.
Definition: events.hh:48
Set at the top when drawing.
Definition: types.hh:294
int boxRestWidth()
Definition: style.hh:593
int ascent
Definition: types.hh:168
void splitHeightPreserveDescent(int height, int *ascent, int *descent)
Definition: widget.cc:1958
EventType
Definition: selection.hh:220
char * addAnchor(Widget *widget, const char *name)
Definition: layout.cc:742
int resizeIdleCounter
Definition: layout.hh:248
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
int boxOffsetY()
Definition: style.hh:596
Represents a mouse motion event.
Definition: events.hh:67
int descent
Definition: types.hh:169
#define DBG_OBJ_SET_PTR(var, val)
Definition: debug_rtfl.hh:428
int Length
Type for representing all lengths within dw::core::style.
Definition: style.hh:428
int left
Definition: style.hh:507
bool buttonRelease(Iterator *it, int charPos, int linkNo, EventButton *event)
Definition: selection.cc:159
int y
Definition: types.hh:166