class LM_FontPreview

The LM_FontPreview class is a user interface class that is used in a dialog to preview what a font will look like. You can create an LM_FontPreview object using the following function:


LM_FontPreview FontPreview(width, height)

Creates a new font preview object that can then be used in a dialog layout.

Return value (LM_FontPreview): the newly-created font preview
width (int): width in pixels
height (int): heigh in pixels

Member Functions

void SetPreviewText(text)

Set the text to be displayed in the preview.

Return value: none
text (string): preview text

void SetFontName(font)

Set the name of the font to be used when displaying the preview.

Return value: none
font (string): font name

void Refresh()

Force the preview to redraw itself.

Return value: none
class LM_FontPreview : public LM_View {
  void SetPreviewText(const char *text);
  void SetFontName(const char *font);
  void Refresh();
};
 
extern LM_FontPreview *WF_FontPreview @ FontPreview(int32 width, int32 height);