00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __CHMHTMLNOTEBOOK_H_
00025 #define __CHMHTMLNOTEBOOK_H_
00026
00027 #include <wx/aui/auibook.h>
00028 #include <wx/treectrl.h>
00029
00030
00031 enum {
00032 ID_NextPage,
00033 ID_PriorPage,
00034 };
00035
00036
00037 class CHMFrame;
00038 class CHMHtmlWindow;
00039
00040
00049 class CHMHtmlNotebook : public wxAuiNotebook {
00050
00051 public:
00053 CHMHtmlNotebook(wxWindow *parent, wxTreeCtrl *tc, CHMFrame* frame);
00054
00056 void AddHtmlView(const wxString& path,
00057 const wxString& link);
00058
00060 bool LoadPageInCurrentView(const wxString& location);
00061
00063 CHMHtmlWindow* GetCurrentPage();
00064
00066 void OnChildrenTitleChanged(const wxString& title);
00067
00069 void CloseAllPagesExceptFirst();
00070
00072 void SetChildrenFonts(const wxString& normal_face,
00073 const wxString& fixed_face,
00074 const int *sizes = NULL);
00075
00077 void OnCloseTab(wxCommandEvent&);
00078
00080 void OnNewTab(wxCommandEvent& event);
00081
00083 CHMHtmlWindow* CreateView();
00084
00086 virtual bool AddPage(wxWindow* page, const wxString& title);
00087
00088 protected:
00090 void OnGoToNextPage(wxCommandEvent&);
00091
00093 void OnGoToPriorPage(wxCommandEvent&);
00094
00096 void OnPageChanged(wxAuiNotebookEvent&);
00097
00098 private:
00099 wxTreeCtrl* _tcl;
00100 CHMFrame *_frame;
00101 wxString _fonts_normal_face;
00102 wxString _fonts_fixed_face;
00103 int _fonts_sizes[7];
00104 DECLARE_EVENT_TABLE()
00105 };
00106
00107
00108 #endif // __CHMHTMLNOTEBOOK_H_
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124