API Reference


Brew Release
Brew MP 1.0.2
See Also
- WidgetExtent
- IDecorator
- IWidget_SetPreferredExtent()
- IDecorator_GetExtent()
- IDecorator_SetExtent()
Returns the preferred extent of the decorator. The preferred extent is the size that the decorator would choose to be under ideal circumstances. For example, let's say decorator that manages the border for a row of icons wants to be 128 pixels wide. However, the actual size of the decorator could be constrained by any number of factors (the size of the device display, the size of the container object, etc) and may need to render the widget in a limited extent. The widget framework distinguishes between the extent that an object prefers, and the extent that object is actually granted.
  • p
    [in] Pointer to the IDecorator object.
  • x
    [out] Pointer to the WidgetExtent struct that, on output, will contain the preferred extent of the decorator.
   void IDecorator_GetPreferredExtent(IDecorator *p, WidgetExtent *x);
The preferred extent for the decorator is returned in 'x'.
Side Effect
A decorator that is not wrapped around a widget (i.e. one without any child widgets) will return an extent of (0, 0).
  • Follow