Developer

API Reference

IConstraintContainer_GetConstraint()

Brew Release
Brew MP 1.0.2
See Also
- WidgetConstraint
- IConstraintContainer_SetConstraint
- IConstraintContainer
- IWidget
Description
This function retrieves a widget's constraint values, returning a copy of those values in the WidgetConstraint data structure pointed to by 'pwc'. The data returned in 'pwc' will include the widget's constraint layout value, as well as its current visibility attribute.
Parameters
  • p
    []:
    [in] A pointer to an IConstraintContainer object.
  • pw
    []:
    [in] Identifies the widget in the constraint container's widget stack whose constraint values should be retrieved. This widget may be expressed explicitly as a widget pointer, or implicitly as a constant that identifies a relative position within the widget stack, as follows - WIDGET_ZNORMAL - Retrieve the constraint values for the default widget, which BREW interprets to be the widget at the top of the widget stack. WIDGET_ZTOPMOST - Retrieve the constraint values for the widget at the top of the widget stack. WIDGET_ZBOTTOMMOST - Retrieve the constraint values for the widget at the bottom of the widget stack.
  • pwc
    []:
    [out] Pointer to a WidgetConstraint data structure, into which the function will copy the current constraint values of the widget.

Prototype
   int IConstraintContainer_GetConstraint(IConstraintContainer *p, IWidget *pw, WidgetConstraint *pwc);
Return
   
   AEE_SUCCESS   --  The constraint values of the widget were successfully retrieved.
   AEE_EBADPARM  --  The widget pointer passed in 'pw' either does not exist, or refers to a
                 widget that is not in the constraint container's widget stack.

Side Effect
None
Comment
None
  • Follow