24#include "../lout/debug.hh"
84 void (*splitHeightFun) (
int,
int*,
int*),
85 bool allowDecreaseWidth,
86 bool allowDecreaseHeight)
94 bool useAdjustmentWidth)
188 emitVoid (0, 1, argv);
195 emitVoid (1, 1, argv);
202 emitVoid (2, 1, argv);
253 void (*splitHeightFun) (
int,
int*,
255 bool allowDecreaseWidth,
256 bool allowDecreaseHeight)
263 bool useAdjustmentWidth)
297 int signalNo,
int argc,
311 Object *argv[2] = { &p1, &p2 };
312 emitVoid (0, 2, argv);
329 DBG_OBJ_ENTER (
"resize", 0,
"LayoutReceiver::resizeQueued",
"%s",
330 extremesChanged ?
"true" :
"false");
331 resource->queueResize (extremesChanged);
339 layoutReceiver.resource =
this;
340 click_x = click_y = -1;
345 childWidget = widget;
351 layout->setWidget (widget);
352 layout->connect (&layoutReceiver);
355 childWidget->setQuasiParent (
getEmbed ());
363 childWidget->setQuasiParent (
getEmbed ());
377 childWidget->sizeRequest (&widgetRequisition);
378 requisition->
width = widgetRequisition.
width + 2 * reliefXThickness ();
379 requisition->
ascent = widgetRequisition.
ascent + reliefYThickness ();
380 requisition->
descent = widgetRequisition.
descent + reliefYThickness ();
392 childWidget->getExtremes (&widgetExtremes);
410 if (embedWidth == -1)
413 return misc::max (embedWidth - 2 * reliefXThickness (), 0);
420 if (embedHeight == -1)
423 return misc::max (embedHeight - 2 * reliefYThickness (), 0);
428 void (*splitHeightFun)
430 bool allowDecreaseWidth,
431 bool allowDecreaseHeight)
439 if (availWidth != -1) {
442 - 2 * reliefXThickness (),
446 requisition->
width = allowDecreaseWidth ?
455 splitHeightFun, allowDecreaseWidth);
461 bool useAdjustmentWidth)
468 if (availWidth != -1) {
471 - 2 * reliefXThickness (),
483 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.