Developer

API Reference

AEECLSID_InfoDialog

Brew Release
Brew MP 1.0.2
See Also
AEECLSID_DialogForm AEECLSID_ErrorDialog AEECLSID_InfoDialog AEECLSID_ProgressDialog AEECLSID_WarnDialog ISHELL_CreateInstance() IForm IForm_SetHandler()
Description
Information, error and warning dialogs together are examples of a particular type of dialog form -- the static dialog -- which is intended to display a dialog containing a static text message. The three types of static dialogs (info, error and warning) differ from one another only in theme, with each type residing at a different base location within the theme file. (See AEEThemeUtil.h for additional information about themes and theme bases.)
Static dialogs inherit each of the UI elements provided by the base dialog including the dialog title, dialog background and backdrop elements. Additionally, the static dialog provides a static widget that will be used to display the text of the information, error or warning message appearing in the body of the dialog.
The static dialog form inherits all of the default characteristics of the base dialog form, while overriding or adding the following additional default characteristics.
 Preferred vertical Extent:   70% of the height of the root form's client rectangle
 Preferred horizontal Extent: 80% of the width of the root form's client rectangle
 Message text alignment:      SWF_WRAPTEXT
                              IDF_ALIGN_LEFT
                              IDF_ALIGN_MIDDLE
                              SWF_NOSHORTENTEXT
 Text padding:                4 pixels on the left
                              4 pixels on the right
 Text foreground color:       RGB_BLACK
 Text background color:       RGB_WHITE
 Text border width:           0


Supported Events: The static dialog processes events in two passes. In the first pass the static dialog will attempt to process property events itself. Events not handled during the first pass are then passed on to the base dialog event handler.
The static dialog form handles the following events.
Event                 Description
-----                 ------------------------------------------------------------
EVT_WDG_SETPROPERTY:  The static dialog responds to this event by attempting to set the
                      property identified by the 'wParam' parameter.  The static dialog form
                      allows the following properties to be set.
                      
                         FID_ACTIVE   --  Sets the activation state of the dialog.
                         FID_VISIBLE  --  Sets the visible state of the dialog
                         FID_TEXT     --  Sets the text to be displayed in the content area
                                          of the dialog.
                      
                      These properties are discussed below in greater detail.

EVT_WDG_GETPROPERTY:  The static dialog responds to this event by attempting to retrieve the
                      property identified by the 'wParam' parameter, passing the value of
                      the property back to the querying object in a pointer passed in the
                      'dwParam' parameter.  The static dialog form allows the following
                      properties to be retrieved. 
                      
                          WID_STATIC  --  Retrieves a pointer to the widget used to display the
                                          dialog's info, error or warning text.  Retrieving this
                                          property increments the reference count of the static
                                          widget.
                       
                      These properties are discussed below in greater detail.

Properties:
Property     Description
--------     ------------------------------------------------------------
FID_ACTIVE:  This property contains the activation state of the static dialog -- TRUE when
             the dialog is active, FALSE when it is not.  Setting the activation state of
             the static dialog will trigger the dialog to invalidate itself and be redrawn. 
                             
                 Property Value:  boolean

FID_TEXT:    This property is used as a trigger to set the text of the information, error or
             warning message to be displayed within the content area of the dialog, retrieving
             that text from a resource file.  This property does not contain any retrievable
             value and therefore may not be accessed by EVT_WDG_GETPROPERTY.  Rather, the value
             is set by identifying the resource file and resource ID that contains the text to be
             displayed by the dialog's static text object.  This information is passed to the
             event handler in an EVT_WDG_SETPROPERTY event, with 'dwParam' containing a pointer
             to a FormRes data structure.  The FormRes data structure identifies both the resource
             file name and resource ID of the text.  For example, a static dialog may change the
             text of an error message by setting the FID_TEXT property, identifying that the text
             is contained in resource 100 of a file named "error.txt".
                           
                 Property Value:  FormRes *
                                    
WID_STATIC:  This property contains a pointer to the static widget used to display the info,
             error or message text of a static dialog.  It is important to note that the static
             static widget is provided by the static dialog form in _addition_ to the form's
             primary widget accessed by the WID_FORM property.
                             
                 Property Value:  IWidget *
Cleanup
The Static Dialog Widget is reference counted. When you are done with your reference to the static dialog widget, you should Release it. Any specific cleanup will be handled for you when all references are released.
Default Interface Name
Other Interfaces
To create a static dialog, an application would do the following.,
,1. Call ISHELL_CreateInstance() with a class ID identifying the type of dialog to,be created.,AEECLSID_InfoDialog:  To create a dialog that utilizes the info dialog theme,AEECLSID_ErrorDialog: To create a dialog that utilizes the error dialog theme,AEECLSID_WarnDialog:  To create a dialog that utilizes the warning dialog theme,ISHELL_CreateInstance() will retrieve a reference counted instance of the appropriate,dialog form.,2. Set the dialog's FID_TEXT property to initialize the text to be displayed in the content,area of the dialog.,3. Set the dialog's FID_TITLE property to initialize the text to be displayed in the,dialog title widget.,4. If the dialog is to support softkeys, set the dialog's FID_SOFTKEY1 and FID_SOFTKEY2,properties to initialize the softkey text.,5. Call IForm_SetHandler() on the dialog to hook an event handler to process user actions.,
Comment
AEECLSID_ProgressDialog is another implementation of the IForm interface in the same way that AEECLSID_DialogForm is. AEECLSID_ErrorDialog, AEECLSID_InfoDialog, and AEECLSID_WarnDialog are implementations of a Static Dialog Class.
  • Follow