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

GFontSelect Class Reference

A font selection dialog. More...

#include <GFontSelect.h>

Inheritance diagram for GFontSelect:

GDialog GWindow GLgiRes GView GTarget GEvent GFlags List of all members.

Public Member Functions

 GFontSelect (GView *Parent, void *Init=0)
 Create the dialog.
int OnNotify (GView *Ctrl, int Flags)
 Called when a child view or view with it's SetNotify() set to this window changes.
bool Serialize (void *Data, bool Write)

Public Attributes

char * Face
 The face of the font selected.
int Size
 The point size of the font selected.
bool Bold
 True if the font should be bold.
bool Underline
 True if the font should be underline.
bool Italic
 True if the font should be italic.

Detailed Description

A font selection dialog.

Example:

    #if defined WIN32
    LOGFONT Info;
    #else
    char Info[256];
    #endif
    ZeroObj(Info);
    
    GFontSelect Dlg(MyWindow, Info);
    if (Dlg.DoModal() == IDOK)
    {
        Dlg.Serialize(Info, true);
    }


Constructor & Destructor Documentation

GFontSelect::GFontSelect GView Parent,
void *  Init = 0
 

Create the dialog.

Parameters:
Parent  The parent window
Init  The initial font information, or NULL if not available


Member Function Documentation

int GFontSelect::OnNotify GView Ctrl,
int  Flags
[virtual]
 

Called when a child view or view with it's SetNotify() set to this window changes.

The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.

Reimplemented from GView.

bool GFontSelect::Serialize void *  Data,
bool  Write
 

Read/Write the font information to a OS specific structure

Currently on Windows that is a LOGFONT structure and on all other platforms it's a char buffer of at least 256 chars.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:46:59 2005 for Lgi by  doxygen 1.4.1