GenTrigger: 4 Customizations

Up: GEOS SDK TechDocs | Up | Prev: 3 Supplemental GenTrigger Usage

You may customize a GenTrigger using all the basic GenClass attributes as shown in the GenClass chapter. Of special significance are the ways in which you can tailor a moniker to print a graphics string on a button, as in a DOS room icon. The moniker should have as its argument a GString. (See the Graphics Environment chapter).

Code Display 5-5 Code for a "Graphic Button" GenTrigger

@start TriggerGraphicsMonikerResource, notDetachable;
@visMoniker TriggerGraphicsMoniker = {
	size = standard;
	color = color4;
	aspectRatio = normal;
	cachedSize = 95, 70;
	gstring {
		GSBeginString
		GSDrawBitmapAtCP <(EndTriggerGraphicsIcon-
					StartTriggerGraphicsIcon)>
		StartTriggerGraphicsIcon label byte
		<...Bitmap here...>
		EndTriggerGraphicsIcon label byte
		GSEndString
	}
}
@end	TriggerGraphicsMonikerResource;
@object GenTriggerClass GraphicTrigger = {
	GI_visMoniker = list
		{
		TriggerGraphicsMoniker
		}
	GTI_actionMsg = MSG_CUSTOM_MESSAGE;
	GTI_destination = process;
	ATTR_GEN_TRIGGER_ACTION_DATA = {DataToPass};
}

 


Up: GEOS SDK TechDocs | Up | Prev: 3 Supplemental GenTrigger Usage