Class Reference

DK_Message

DK_Message.h is a header file that lets you display a variety of dialogue boxes. Each different type of dialogue box is a separate subclass of the base class DK_MessageBase. DK_MessageBase should not be instantiated directly.

Constructors

DK_ErrorMsg( const char *msg, 
             const char *title = NULL);
DK_WarningMsg( const char *msg, 
               const char *title = NULL);
DK_InfoMsg( const char *msg, 
            const char *title = NULL);
DK_QuestionMsg( const char *msg, 
                const char *title = NULL );
DK_InputMsg( const char *msg, 
             const char *title,
             const char *suggestedInput, 
             Boolval allowEmpty);
Creates a dialogue box object of the corresponding type, with the message msg. If you do not supply a title for the dialogue box, it is NULL.

In the case of a DK_InputMsg object, suggestedInput appears as the default value and allowEmpty specifies whether users can click OK in the dialogue box without entering information in the text input area.

show

void show()
Boolval show(char **result);
Displays a dialogue box object.

In the case of a DK_InputMsg object, use the second form. The function returns TRUE if the user entered information, and the user's input is returned in the passed pointer result. Make sure to call free on result when you are finished; for example:

DK_InputMsg msg("prompt", "title",
                       "default_value", FALSE);
char *result;
if(msg.show(&result)) {
   /* got a response */
   .... do some stuff...
   free(result);
}
Constructors
show

SOFTIMAGE Eddie 3.5 - 10 JAN 1997