GEOS SDK TechDocs
|
|
4.1 FlashingNote Instance Data
|
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:
notDetachable
.
FlashingNoteClass
object.
duration
instance field to the number of ticks (1/60ths of a second) you wish to have the dialog box on-screen. By default, this is 180 ticks (3 seconds).
ATTR_FLASHING_NOTE_MINIMUM_DURATION
and set it to the number of ticks (1/60ths of a second) to remain on-screen. By default, this is 60 ticks (one second).
HINT_FLASHING_NOTE_DESTROY_SELF_AFTER_DISMISS
if you don't want to manually destroy it.
HINT_WINDOW_NOT_TITLE_BAR
and
HINT_DRAW_IN_BOX
.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;
GEOS SDK TechDocs
|
|
4.1 FlashingNote Instance Data
|
4.3 Initiating and Destroying the Flashing Note