Developer

API Reference

IDecorator_GetPreferredExtent()

Brew Release
Brew MP 1.0.2
See Also
- WidgetExtent
- IDecorator
- IWidget_SetPreferredExtent()
- IDecorator_GetExtent()
- IDecorator_SetExtent()
Description
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.
Parameters
  • 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.
Interface
Prototype
   void IDecorator_GetPreferredExtent(IDecorator *p, WidgetExtent *x);
   
Return
The preferred extent for the decorator is returned in 'x'.
Side Effect
None
Comment
A decorator that is not wrapped around a widget (i.e. one without any child widgets) will return an extent of (0, 0).
  • Follow