00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __CHMFONTDIALOG_H
00024 #define __CHMFONTDIALOG_H
00025
00026
00027 #include <wx/html/htmlwin.h>
00028 #include <wx/spinctrl.h>
00029 #include <wx/dialog.h>
00030 #include <wx/combobox.h>
00031
00032
00039
00040 class CHMFontDialog : public wxDialog
00041 {
00042 public:
00054 CHMFontDialog(wxWindow *parent, wxArrayString *normalFonts,
00055 wxArrayString *fixedFonts, const wxString& normalFont,
00056 const wxString& fixedFont, const int fontSize);
00057
00059 const wxString& FixedFont() const { return _fixedFont; }
00060
00062 const wxString& NormalFont() const { return _normalFont; }
00063
00065 int* Sizes() { return _sizes; }
00066
00067 protected:
00069 void OnUpdate(wxCommandEvent& event);
00070
00072 void OnUpdateSpin(wxSpinEvent& event);
00073
00074 private:
00076 void UpdatePreview();
00077
00079 void InitDialog(wxArrayString *normalFonts, wxArrayString *fixedFonts);
00080
00081 private:
00082 wxHtmlWindow *_test;
00083 wxSpinCtrl *_fontSizeControl;
00084 wxComboBox *_normalFControl;
00085 wxComboBox *_fixedFControl;
00086
00087 wxString _normalFont;
00088 wxString _fixedFont;
00089 int _sizes[7];
00090 int _fontSize;
00091
00092 private:
00093 DECLARE_EVENT_TABLE();
00094 };
00095
00096
00097 #endif // __CHMFONTDIALOG_H
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112