1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2002-06-28 20:46:11 -04:00
|
|
|
// Name: wx/generic/fontdlgg.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose: wxGenericFontDialog
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
2005-05-04 14:57:50 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-06-17 12:22:36 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
#ifndef _WX_GENERIC_FONTDLGG_H
|
|
|
|
#define _WX_GENERIC_FONTDLGG_H
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
#include "wx/setup.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
#include "wx/font.h"
|
|
|
|
#include "wx/dialog.h"
|
|
|
|
#include "wx/cmndata.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FONT DIALOG
|
|
|
|
*/
|
2004-06-17 12:22:36 -04:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
class WXDLLEXPORT wxChoice;
|
|
|
|
class WXDLLEXPORT wxText;
|
|
|
|
class WXDLLEXPORT wxCheckBox;
|
2002-01-19 18:23:51 -05:00
|
|
|
class WXDLLEXPORT wxFontPreviewer;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
wxID_FONT_UNDERLINE = 3000,
|
|
|
|
wxID_FONT_STYLE,
|
|
|
|
wxID_FONT_WEIGHT,
|
|
|
|
wxID_FONT_FAMILY,
|
|
|
|
wxID_FONT_COLOUR,
|
|
|
|
wxID_FONT_SIZE
|
|
|
|
};
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
class WXDLLEXPORT wxGenericFontDialog : public wxFontDialogBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
2002-06-28 20:46:11 -04:00
|
|
|
public:
|
|
|
|
wxGenericFontDialog() { Init(); }
|
|
|
|
wxGenericFontDialog(wxWindow *parent, const wxFontData& data)
|
|
|
|
: wxFontDialogBase(parent, data) { Init(); }
|
|
|
|
virtual ~wxGenericFontDialog();
|
|
|
|
|
|
|
|
virtual int ShowModal();
|
|
|
|
|
|
|
|
// deprecated, for backwards compatibility only
|
|
|
|
wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
|
|
|
|
: wxFontDialogBase(parent, data) { Init(); }
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
// Internal functions
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
virtual void CreateWidgets();
|
|
|
|
virtual void InitializeFont();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
void OnChangeFont(wxCommandEvent& event);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
virtual bool DoCreate(wxWindow *parent);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
wxFont dialogFont;
|
|
|
|
|
|
|
|
wxChoice *familyChoice;
|
|
|
|
wxChoice *styleChoice;
|
|
|
|
wxChoice *weightChoice;
|
|
|
|
wxChoice *colourChoice;
|
|
|
|
wxCheckBox *underLineCheckBox;
|
|
|
|
wxChoice *pointSizeChoice;
|
|
|
|
|
|
|
|
wxFontPreviewer *m_previewer;
|
|
|
|
bool m_useEvents;
|
|
|
|
|
|
|
|
// static bool fontDialogCancelled;
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2002-06-26 15:10:51 -04:00
|
|
|
WXDLLEXPORT const wxChar *wxFontFamilyIntToString(int family);
|
|
|
|
WXDLLEXPORT const wxChar *wxFontWeightIntToString(int weight);
|
|
|
|
WXDLLEXPORT const wxChar *wxFontStyleIntToString(int style);
|
|
|
|
WXDLLEXPORT int wxFontFamilyStringToInt(wxChar *family);
|
|
|
|
WXDLLEXPORT int wxFontWeightStringToInt(wxChar *weight);
|
|
|
|
WXDLLEXPORT int wxFontStyleStringToInt(wxChar *style);
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2002-06-28 20:46:11 -04:00
|
|
|
#endif // _WX_GENERIC_FONTDLGG_H
|
|
|
|
|