WoFontOptionMenu Function
Creates an option menu with the standard list of software (vector-drawn) fonts found in PV‑WAVE.
Usage
widget = WoFontOptionMenu(parent, toolname)
Input Parameters
parent — Specifies the parent widget ID of the option menu (long).
toolname — (string) Specifies the unique name of the VDA Tool to which the option menu is to be attached.
Returned Value
widget — The widget ID of the container (long).
Keywords
Name — Specifies a string containing the name of the option menu.
Start_Value — Specifies a string containing the font command for the initially selected font.
Attachment Keywords
Bottom — If a widget ID is specified (for example, Bottom=wid), then the bottom of the option menu is attached to the top of the specified widget. If no widget ID is specified (for example, /Bottom), then the bottom of the option menu is attached to the bottom of the parent widget.
Left — If a widget ID is specified (for example, Left=wid), then the left side of the option menu is attached to the right side of the specified widget. If no widget ID is specified (for example, /Left), then the left side of the option menu is attached to the left side of the parent widget.
Right — If a widget ID is specified (for example, Right=wid), then the right side of the option menu is attached to the left side of the specified widget. If no widget ID is specified (for example, /Right), then the right side of the option menu is attached to the right side of the parent widget.
Top — If a widget ID is specified (for example, Top=wid), then the top of the option menu is attached to the bottom of the specified widget. If no widget ID is specified (for example, /Top), then the top of the option menu is attached to the top of the parent widget.
Discussion
Software fonts, also called vector-drawn or Hershey fonts, are internal to PV‑WAVE and are drawn with line vectors. Software fonts are specified by their font command. For example, the font command for the Simplex Greek font is !4
Example
This example creates a font option menu inside a layout widget. The default font on the menu is set to Duplex Roman.
PRO OkApplyCB, wid, which
...
; Retrieve currently selected font from the font option menu.
; The returned value will be a Wave font string (i.e., '!3').
fontWid = WwGetValue (wid, /Userdata)
font = WoFontOptionmenuGetValue (fontWid)
...
END
PRO ChangeFontCB, wid, which
...
; Set the current value of the font option menu. The new font
; should be a PV-WAVE font string (i.e., '!3').
fontWid = WwGetValue (wid, /Userdata)
WoFontOptionmenuSetValue, fontWid, new_font
...
END
PRO CreateStuff
...
top = WwInit ('example', 'Example', layout)
; Create a font option menu as a child of the layout widget.
; When the font is displayed, its value will be '!5'
; (Duplex Roman).
fontWid = WoFontOptionmenu (layout, Start_value = '!5')
...
status = WwSetValue (top, /Display)
WwLoop
END
See Also