GFontSelect Class Reference

A font selection dialog. More...

#include <GFontSelect.h>

Inheritance diagram for GFontSelect:

GDialog GWindow GLgiRes GView GDragDropTarget

List of all members.

Public Member Functions

 GFontSelect (GView *Parent, void *Init=0)
 Create the dialog.
int OnNotify (GViewI *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 
)


Member Function Documentation

int GFontSelect::OnNotify ( GViewI *  Ctrl,
int  Flags 
)

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.

References GDialog::EndModal(), GLIST_NOTIFY_SELECT, IDCANCEL, IDOK, GCombo::Name(), and GView::SetCtrlValue().

Referenced by GFontSelect().

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.

References Bold, Face, FW_BOLD, FW_NORMAL, Italic, and Size.

Referenced by GFontSelect().


The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:03 2010 for Lgi by  doxygen 1.5.7.1