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