Developer

API Reference

AEECLSID_RotateWidget

Brew Release
Brew MP 1.0.2
See Also
- AEECLSID_RotateWidget
- IWidget_SetExtent()
- IWidget_SetProperty()
- ISHELL_CreateInstance()
Description
A rotate widget is created by calling ISHELL_CreateInstance() and passing AEECLSID_RotateWidget as the class id. If successful, a pointer to the rotate widget object will be returned in the 'ppobj' parameter of ISHELL_CreateInstance.
Applications may control the angle by which the underlying widget will be rotated by setting the PROPEX_ROTATIONANGLE property.
To use a rotate widget, an application would do the following. 1) Call ISHELL_CreateInstance() with a class ID of AEECLSID_RotateWidget to retrieve a reference counted instance of the rotate widget. 2) Create and set the child widget. If the application wants to rotate a container, then QI the container for AEEIID_IWidget and set that widget as the child widget. 3) Set the PROPEX_ROTATIONANGLE property.
Supported Events: The rotate widget handles events to get or set the properties that will control how the rotation will be applied to widget it decorates. Events not identified below will be routed to the base decorator widget from which the rotate widget is derived. For pointer events, if child needs to be queried, rotate widget rotates the co-ordinates based on rotation angle and passes it to the child.
Event                 Description
-----                 ------------------------------------------------------------
EVT_WDG_SETPROPERTY:  The rotate widget responds to this event by attempting to set the
                      property identified by the 'wParam' parameter.  The rotate widget
                      allows the following properties to be set.
                      
                           PROPEX_ROTATIONANGLE -- Sets the angle by which the child should be rotated.
                           PROP_FLAGS  -- Sets the flags of the widget.

                      These properties are discussed below in greater detail.

                      The rotate widget will route the EVT_WDG_SETPROPERTY event to the
                      base decorator widget if 'wParam' identifies a property that does
                      not appear in the list above.

EVT_WDG_GETPROPERTY:  The rotate widget responds to this event by attempting to retrieve
                      the property identified by the 'wParam' parameter.  The rotate widget
                      allows the following properties to be retrieved
                      
                           PROPEX_ROTATIONANGLE -- Gets the angle by which the child is rotated.
                           PROP_FLAGS  -- Gets the flags of the widget.

                           These properties are discussed below in greater detail.

                      The widget will route the EVT_WDG_GETPROPERTY event to the
                      base decorator widget if 'wParam' identifies a property that does
                      not appear in the list above.


Properties:
Property             Description
--------             ------------------------------------------------------------
PROPEX_ROTATIONANGLE: This property controls the angle by which the underlying widget
                      is rotated. This angle must be multiple of 90 degress. The rotation
                      happens in clock-wise direction. Note that setting this propery could
                      change the preferred extent of the rotate widget itself, based on the 
                      angle of rotation.

PROP_FLAGS:           This property controls flags of the Rotate Widget. Rotate widget supports 
                      following flags.


Required Model: None
Instantiaion
Rotate Widget is instantiated by passing AEECLSID_RotateWidget into ISHELL_CreateInstance.
Cleanup
The Rotate Widget is reference counted. When you are done with your reference to the Rotate widget, you should Release that reference. Any Rotate Widget specific cleanup will be handled for you when all references are released.
Default Interface Name
Other Interfaces
Side Effect
None
Comment
None
Srini Mecheri 27 Jan 2011 01:19pm

I think that the child could be any widget or a container, We could be more speicifc here in stead of "If the application wants to rotate a container, then QI the container for AEEIID_IWidget and set that widget as the child widget."

  • Follow