Article # 241, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Details of VisMonikers
A visMoniker is a semi-complex structure which can be either a gstring or simple text. When you use the simple text, like @visMoniker MyMoniker = 'S',"SomeMoniker"; the only information stored is the text string and the offset to the mnemonic. If you use the full power of the visMoniker by associating a gstring to it, you can set any type of text or graphic information you want for that visMoniker. Here is an example that sets the font to FID_LED with a point size of 12.0: @visMoniker MyMoniker = { gstring { GSSaveTransform(), GSSetFont(FID_LED, 12.0), GSDrawText(2,2), "Some Moniker", GSRestoreTransform(), GSEndGString() } }; To help you understand the VisMoniker, here is a brief description of the structure of a VisMoniker: VM_type (byte sized flag) VMT_MONIKER_LIST - if this set, then VM_data will be a list of VisMonikerListEntry structs. VMT_GSTRING - if set, the VM_data is a VisMonikerWithGString struct. if clear, then VM_data is a VisMonikerWithText struct. VM_width cached width of moniker VM_data Either VisMonikerWithText or VisMonikerWithGString depending on VM_type. VisMonikerText VMT_mnemonicOffset - offset to mnemonic, -1 if none VMT_text - start of null-terminated text VisMonikerGString VMGS_height - cached gstring height VMGS_gstring - start of gstring data