Developer

API Reference

WidgetProp

Brew Release
Brew MP 1.0.2
See Also
- IPropContainer_SetProp()
- IPropContainer_GetProp()
Description
This data type defines special attributes for any widget that is to be managed by a prop container. These attributes identify whether or not the widget should be factored into the container's layout calculations and -- if it should -- how the widget will be proportioned when laid out in the container.
Members
  • prop:      Specifies how the widget should be laid out in the container, relative either
                  to its own extent, or relative to the extent of other objects being managed by
                  the prop container.
              
                  When specifying the widget's proportion in relationship to other objects, 'prop'
                  contains the numerator of the fraction of this widget's extent to the combined
                  extents of all other proportional objects managed by the container.  So, for
                  example, if a prop container contains three widgets with proportional values of
                  1, 2 and 2, the widget with 'prop' of 1 would be granted an extent that is
                  one-fifth (1 of 1 + 2 + 2) of the total variable extent, whereas each of the
                  widgets with a 'prop' value of 2 would be granted an extent that is two-fifths
                  (2 of 1 + 2 + 2) of the total variable extent.
    
                  When expressing the widget's proportion in relation to its own extent, 'prop'
                  is set to one of the following defined constants.
                                  
                      WIDGET_SIZE_TO_FIT  - The prop container will grant an extent to this
                                            object which is sized to fit the widget's preferred
                                            extent.  For example, if the prop container is being
                                            laid out horizontally, an object with 'prop' equal to
                                            WIDGET_SIZE_TO_FIT will be granted a horizontal extent
                                            equal to the preferred horizontal extent of the widget.
                      WIDGET_KEEP_EXTENT  - The prop container will grant an extent to this
                                            object which is exactly the same size as the widget's
                                            extent.  For example, if the prop container is being
                                            laid out vertically, an object with 'prop' equal to
                                            WIDGET_KEEP_EXTENT will be granted a vertical extent
                                            equal to the existing vertical extent of the widget.
  • bVisible:  Boolean value specifying whether or not this widget should be displayed.
                  If the widget is not displayed, it is also not factored into layout
                  calculations for the container.
    
Definition
   typedef struct {
      uint16  prop;
      boolean bVisible;
   } WidgetProp;
Comment
None
  • Follow