Communicator UI: 4.2 FlashingNoteClass: Setting Up the Template

Up: GEOS SDK TechDocs | Up | Prev: 4.1 FlashingNote Instance Data | Next: 4.3 Initiating and Destroying the Flashing Note

Usually, a FlashingNoteClass object (and its children) should be contained within their own resource. The resource should remain unattached to the application tree. The routine PutUpDialogViaUIThread() will take care of copying and attaching the group of objects.

To set up your template, perform the following steps:

Code Display 2-10 FlashingNote Template

@start FlashingNoteTemplateResource, notDetachable;
@object FlashingNoteClass FlashingNoteTemplate = {
    GI_states = @default & ~GS_USABLE;
    GI_comp = @DialogBoxTemplate;
    FNI_duration = 600;						/* 10 seconds */
    HINT_DRAW_IN_BOX;
    HINT_FLASHING_NOTE_DESTROY_SELF_AFTER_DISMISS;
    HINT_WINDOW_NO_TITLE_BAR;
    ATTR_FLASHING_NOTE_MINIMUM_DURATION = 300;						/* 5 seconds */
}
/* 
 * We want a separator, so we will create a sub-group interaction as a complex
 * moniker.
 */
@chunk TCHAR DialogTemplateText[] = "Flashing Note";
@object ComplexMonikerClass DialogBoxTemplate = {
    ComplexMoniker = GenInteractionClass;
    CMI_topText = @DialogTemplateText;
    CMI_fontSize = FOAM_NORMAL_FONT_SIZE;
    GI_comp = @DialogText;
    HINT_PLACE_MONIKER_ABOVE;
    HINT_COMPLEX_MONIKER_DRAW_SEPARATOR;
    HINT_FIXED_SIZE = { SST_PIXELS | FOAM_DEFAULT_BUBBLE_WIDTH, 0 };
}
@chunk TCHAR DialogTextText[] = "This particular flashing note will stay up a 
				minimum \r
				of 5 seconds, and will dismiss itself if you 
				press any key after that.\r\r\
				It will dismiss itself automatically after 10 
				seconds.\r";
@object GenTextClass DialogText = {
    GTXI_text = @DialogTextText;
    GI_attrs = @default | GA_READ_ONLY;
}
@end FlashingNoteTemplateResource;

Up: GEOS SDK TechDocs | Up | Prev: 4.1 FlashingNote Instance Data | Next: 4.3 Initiating and Destroying the Flashing Note