23#include "../lout/debug.hh"
83 void (*splitHeightFun) (
int,
int*,
int*),
84 bool allowDecreaseWidth,
85 bool allowDecreaseHeight)
93 bool useAdjustmentWidth)
187 emitVoid (0, 1, argv);
194 emitVoid (1, 1, argv);
201 emitVoid (2, 1, argv);
252 void (*splitHeightFun) (
int,
int*,
254 bool allowDecreaseWidth,
255 bool allowDecreaseHeight)
262 bool useAdjustmentWidth)
296 int signalNo,
int argc,
310 Object *argv[2] = { &p1, &p2 };
311 emitVoid (0, 2, argv);
328 DBG_OBJ_ENTER (
"resize", 0,
"LayoutReceiver::resizeQueued",
"%s",
329 extremesChanged ?
"true" :
"false");
330 resource->queueResize (extremesChanged);
338 layoutReceiver.resource =
this;
339 click_x = click_y = -1;
344 childWidget = widget;
349 layout->setWidget (widget);
350 layout->connect (&layoutReceiver);
353 childWidget->setQuasiParent (
getEmbed ());
361 childWidget->setQuasiParent (
getEmbed ());
375 childWidget->sizeRequest (&widgetRequisition);
376 requisition->
width = widgetRequisition.
width + 2 * reliefXThickness ();
377 requisition->
ascent = widgetRequisition.
ascent + reliefYThickness ();
378 requisition->
descent = widgetRequisition.
descent + reliefYThickness ();
390 childWidget->getExtremes (&widgetExtremes);
408 if (embedWidth == -1)
411 return misc::max (embedWidth - 2 * reliefXThickness (), 0);
418 if (embedHeight == -1)
421 return misc::max (embedHeight - 2 * reliefYThickness (), 0);
426 void (*splitHeightFun)
428 bool allowDecreaseWidth,
429 bool allowDecreaseHeight)
436 if (availWidth != -1) {
439 - 2 * reliefXThickness (),
443 requisition->
width = allowDecreaseWidth ?
452 splitHeightFun, allowDecreaseWidth);
458 bool useAdjustmentWidth)
465 if (availWidth != -1) {
468 - 2 * reliefXThickness (),
480 layout->containerSizeChanged ();
Set at the top when drawing.
This implementation of dw::core::Iterator can be used by widgets with no contents.
Represents a enter or leave notify event.
Iterators are used to iterate through the contents of a widget.
The central class for managing and drawing a widget tree.
dw::core::Shape implemtation for simple rectangles.
An interface to encapsulate platform dependent drawing.
A widget for embedding UI widgets.
void correctRequisitionOfChild(Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight)
void setEnabled(bool enabled)
void correctExtremesOfChild(Widget *child, Extremes *extremes, bool useAdjustmentWidth)
void leaveNotifyImpl(core::EventCrossing *event)
void enterNotifyImpl(core::EventCrossing *event)
void correctReqHeightOfChildNoRec(Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseHeight)
int getAvailHeightOfChild(Widget *child, bool forceValue)
void draw(View *view, Rectangle *area, DrawingContext *context)
Area is given in widget coordinates.
void setDisplayed(bool displayed)
Iterator * iterator(Content::Type mask, bool atEnd)
Return an iterator for this widget.
int getAvailWidthOfChild(Widget *child, bool forceValue)
Computes the content width available of a child widget.
void getExtremesSimpl(Extremes *extremes)
Simple variant, to be implemented by widgets with extremes not depending on positions.
void correctReqWidthOfChildNoRec(Widget *child, Requisition *requisition, bool allowDecreaseWidth)
void sizeAllocateImpl(Allocation *allocation)
See Sizes of Dillo Widgets.
void sizeRequestSimpl(Requisition *requisition)
Simple variant, to be implemented by widgets with sizes not depending on positions.
void containerSizeChangedForChildren()
bool buttonPressImpl(core::EventButton *event)
void setStyle(style::Style *style)
Change the style of a widget.
virtual void correctExtremesOfChildNoRec(Widget *child, Extremes *extremes, bool useAdjustmentWidth)
Embed(Resource *resource)
bool emitToReceiver(lout::signal::Receiver *receiver, int signalNo, int argc, Object **argv)
A sub class must implement this for a call to a single receiver.
void emitEnter(Resource *resource)
void emitActivate(Resource *resource)
void emitLeave(Resource *resource)
Receiver interface for the "activate" signal.
virtual void activate(Resource *resource)=0
virtual void leave(Resource *resource)=0
virtual void enter(Resource *resource)=0
bool emitToReceiver(lout::signal::Receiver *receiver, int signalNo, int argc, Object **argv)
A sub class must implement this for a call to a single receiver.
void emitClicked(Resource *resource, EventButton *event)
Receiver interface for the "clicked" signal.
Basic interface for all resources.
virtual void setEnabled(bool enabled)=0
virtual Iterator * iterator(Content::Type mask, bool atEnd)=0
virtual void containerSizeChangedForChildren()
virtual int getAvailWidthOfChild(Widget *child, bool forceValue)
virtual int getAvailHeightOfChild(Widget *child, bool forceValue)
virtual void sizeAllocate(Allocation *allocation)
virtual void setEmbed(Embed *embed)
virtual void setDisplayed(bool displayed)
virtual void draw(View *view, Rectangle *area, DrawingContext *context)
virtual void correctExtremesOfChild(Widget *child, Extremes *extremes, bool useAdjustmentWidth)
void emitClicked(EventButton *event)
virtual void setStyle(style::Style *style)
virtual void correctRequisitionOfChild(Widget *child, Requisition *requisition, void(*splitHeightFun)(int, int *, int *), bool allowDecreaseWidth, bool allowDecreaseHeight)
virtual void getExtremes(Extremes *extremes)
virtual Embed * getEmbed()
ActivateEmitter activateEmitter
virtual void sizeRequest(Requisition *requisition)=0
Iterator * iterator(Content::Type mask, bool atEnd)
void registerName(const char *className, int *classId)
This method must be called in the constructor for the sub class.
This is the base class for many other classes, which defines very common virtual methods.
An object::Object wrapper for void pointers.
The base class for signal receiver base classes.
#define DBG_OBJ_ENTER0(aspect, prio, funname)
#define DBG_OBJ_CREATE(klass)
#define DBG_OBJ_MSGF(aspect, prio, fmt,...)
#define DBG_OBJ_ENTER(aspect, prio, funname, fmt,...)
#define DBG_OBJ_ASSOC_CHILD(child)
bool isPerLength(Length l)
Returns true if l is a percentage.
void splitHeightPreserveAscent(int height, int *ascent, int *descent)
Dw is in this namespace, or sub namespaces of this one.
void notImplemented(const char *name)
Here, some common classes (or interfaces) are defined, to standardize the access to other classes.
Represents the allocation, i.e.