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. | |
|
|
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. |
1.3.2