Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

FontSelector Class Reference

List of all members.

Detailed Description

The font selector brings up an OS-specific dialog to select a font and its parameters.

The font returned from it can then be used throughout dig.

Usage sample:

  Frame frame; // Our main frame.
  
  ...

  with (new FontSelector ())
  {
      Font f;

      effects = false; // Don't show underline, strikeout, and text color options.
      if ((f = run ()) !== null) // Display the selector.
      {
          // Succeeded, so set the font.
          frame.font (f);
          frame.paint ();
      }
  }


Public Member Functions

 this ()
 Empty constructor.

 this (Font font)
 Assigns the default font.

Font run ()
 Run the selector and return the font selected or null if there was a benign error.


Public Attributes

Font font
 The font to use as the default or null if there is none.

bit effects = true
 If true, show underline, strikeout, and text color options.

bit fixedPitchOnly = false
 If true, only show fixed pitch fonts.

float minSize
 Minimum font size, or nan for none.

float maxSize
 Maximum font size, or nan for none.


Member Function Documentation

Font FontSelector.run  ) 
 

Run the selector and return the font selected or null if there was a benign error.

If there was a serious error it will throw up.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:52 2003 for dig by doxygen 1.3.2