chmfontdialog.h

00001 /*
00002 
00003   Copyright (C) 2003  Razvan Cojocaru <razvanco@gmx.net>
00004  
00005   This program is free software; you can redistribute it and/or modify
00006   it under the terms of the GNU General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009   
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU General Public License for more details.
00014   
00015   You should have received a copy of the GNU General Public License
00016   along with this program; if not, write to the Free Software
00017   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00018   MA 02110-1301, USA.
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   Local Variables:
00102   mode: c++
00103   c-basic-offset: 8
00104   tab-width: 8
00105   c-indent-comments-syntactically-p: t
00106   c-tab-always-indent: t
00107   indent-tabs-mode: t
00108   End:
00109 */
00110 
00111 // vim:shiftwidth=8:autoindent:tabstop=8:noexpandtab:softtabstop=8
00112 

Generated on Tue Apr 14 19:43:38 2009 for xCHM by  doxygen 1.5.4