00001
00002
00003
00004
00005
00006
00007
00008
00010
00011
#ifndef WXVILLALIB_WX_TABLESSNOTEBOOK_H_
00012
#define WXVILLALIB_WX_TABLESSNOTEBOOK_H_
00013
00014
00015
00016
00017
#include "wx/dynarray.h"
00018
#include "wx/event.h"
00019
#include "wx/control.h"
00020
#include "wx/panel.h"
00021
#include "wx/generic/tabg.h"
00022
#include "wx/notebook.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
#if wxCHECK_VERSION(2,5,0)
00032
#define size_tt size_t
00033
#else
00034
#define size_tt int
00035
#endif
00036
00037 class wxTablessNotebook :
public wxNotebookBase
00038 {
00039
public:
00040
00041
00042
00043
wxTablessNotebook();
00044
00045
wxTablessNotebook(wxWindow *parent,
00046 wxWindowID
id,
00047
const wxPoint& pos = wxDefaultPosition,
00048
const wxSize& size = wxDefaultSize,
00049
long style = 0,
00050
const wxString& name = _T(
"notebook"));
00051
00052
bool Create(wxWindow *parent,
00053 wxWindowID
id,
00054
const wxPoint& pos = wxDefaultPosition,
00055
const wxSize& size = wxDefaultSize,
00056
long style = 0,
00057
const wxString& name = _T(
"notebook"));
00058
00059 ~
wxTablessNotebook();
00060
00061
00062
00063
00064
int FindPagePosition(wxNotebookPage* page)
const;
00065
00066
00067
00068
00069
int SetSelection(size_tt nPage);
00070
00071
00072
00073
int GetSelection()
const {
return m_nSelection; }
00074
00075
00076
bool SetPageText(size_tt n,
const wxString& strText) {
return true; };
00077 wxString GetPageText(size_tt n)
const {
return wxEmptyString; }
00078
00079
00080
00081
virtual int GetRowCount()
const ;
00082
00083
00084
int GetPageImage(size_tt n)
const {
return 0; }
00085
bool SetPageImage(size_tt n,
int imageId) {
return true; }
00086
00087
00088
00089
void SetPageSize(
const wxSize& size) {}
00090
00091
void SetPadding(
const wxSize& padding) {}
00092
00093
00094
void SetTabSize(
const wxSize& sz) {}
00095
00096
00097
00098
00099
bool DeletePage(size_tt nPage);
00100
bool DeletePage(wxNotebookPage* page);
00101
00102
bool RemovePage(size_tt nPage);
00103
bool RemovePage(wxNotebookPage* page);
00104
00105
bool DeleteAllPages();
00106
00107
bool InsertPage(size_tt nPage,
00108 wxNotebookPage *pPage,
00109
const wxString& strText,
00110
bool bSelect = FALSE,
00111
int imageId = -1);
00112
00113
00114
00115
void OnSize(wxSizeEvent& event);
00116
void OnIdle(wxIdleEvent& event);
00117
void OnSelChange(wxNotebookEvent& event);
00118
void OnSetFocus(wxFocusEvent& event);
00119
void OnNavigationKey(wxNavigationKeyEvent& event);
00120
00121
00122
00123
virtual void Command(wxCommandEvent& event);
00124
virtual void SetConstraintSizes(
bool recurse = TRUE);
00125
virtual bool DoPhase(
int nPhase);
00126
00127
00128
00129
void OnMouseEvent(wxMouseEvent& event);
00130
void OnPaint(wxPaintEvent& event);
00131
00132
virtual wxRect GetAvailableClientSize();
00133
00134
00135
00136
bool RefreshLayout(
bool force = TRUE);
00137
00138
protected:
00139
00140 wxWindow *DoRemovePage(size_t page) {
return NULL; }
00141
00142
00143
void Init();
00144
00145
00146
void ChangePage(
int nOldSel,
int nSel);
00147
00148
int m_nSelection;
00149
00150 DECLARE_DYNAMIC_CLASS(
wxTablessNotebook)
00151 DECLARE_EVENT_TABLE()
00152 };
00153
00154
#endif // WXVILLALIB_WX_TABLESSNOTEBOOK_H_