1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions of MORE window classes
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/notebook.h>
21 //----------------------------------------------------------------------
24 %include my_typemaps.i
26 // Import some definitions of other classes, etc.
34 //---------------------------------------------------------------------------
46 wxString& GetTextValue();
47 void SetTextValue(const wxString& str);
49 void SetFont(wxFont *f);
50 wxColour& GetTextColour();
51 void SetTextColour(const wxColour& colour);
52 wxColour& GetBackgroundColour();
53 void SetBackgroundColour(const wxColour& colour);
54 wxBrush *GetBackgroundBrush();
56 void SetAlignment(int align);
57 wxBitmap *GetCellBitmap();
58 void SetCellBitmap(wxBitmap *bitmap);
65 class wxGrid : public wxPanel {
67 wxGrid(wxWindow* parent, wxWindowID id,
68 const wxPoint& pos=wxPyDefaultPosition,
69 const wxSize& size=wxPyDefaultSize,
73 void AdjustScrollbars();
74 bool AppendCols(int n=1, bool updateLabels=TRUE);
75 bool AppendRows(int n=1, bool updateLabels=TRUE);
77 bool CellHitTest(int x, int y, int *OUTPUT, int *OUTPUT);
80 // TODO: For now we are just ignoring the initial cellValues
81 // and widths. Add support for loading them from
82 // Python sequence objects.
83 bool CreateGrid(int rows, int cols,
84 //PyObject* cellValues = NULL,
85 //PyObject* widths = NULL,
86 short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH,
87 short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT) {
88 return self->CreateGrid(rows, cols, NULL, NULL,
89 defaultWidth, defaultHeight);
93 bool CurrentCellVisible();
94 bool DeleteCols(int pos=0, int n=1, bool updateLabels=TRUE);
95 bool DeleteRows(int pos=0, int n=1, bool updateLabels=TRUE);
99 wxGridCell* GetCell(int row, int col);
100 int GetCellAlignment(int row, int col);
101 %name(GetDefCellAlignment)int GetCellAlignment();
102 wxColour& GetCellBackgroundColour(int row, int col);
103 %name(GetDefCellBackgroundColour)
104 wxColour& GetCellBackgroundColour();
105 //wxGridCell *** GetCells();
106 wxColour& GetCellTextColour(int row, int col);
107 %name(GetDefCellTextColour)wxColour& GetCellTextColour();
108 wxFont* GetCellTextFont(int row, int col);
109 %name(GetDefCellTextFont)wxFont* GetCellTextFont();
110 wxString& GetCellValue(int row, int col);
112 int GetColumnWidth(int col);
113 wxRect& GetCurrentRect();
114 int GetCursorColumn();
117 wxScrollBar * GetHorizScrollBar();
118 int GetLabelAlignment(int orientation);
119 wxColour& GetLabelBackgroundColour();
120 int GetLabelSize(int orientation);
121 wxColour& GetLabelTextColour();
122 wxFont* GetLabelTextFont();
123 wxString& GetLabelValue(int orientation, int pos);
124 int GetRowHeight(int row);
128 wxTextCtrl* GetTextItem();
129 wxScrollBar* GetVertScrollBar();
131 bool InsertCols(int pos=0, int n=1, bool updateLabels=TRUE);
132 bool InsertRows(int pos=0, int n=1, bool updateLabels=TRUE);
134 // TODO: How to handle callbacks that don't come from
137 //void OnActivate(bool active);
138 //void OnChangeLabels();
139 //void OnChangeSelectionLabel();
140 //wxGridCell* OnCreateCell();
141 //void OnLeftClick(int row, int col, int x, int y, bool control, bool shift);
142 //void OnRightClick(int row, int col, int x, int y, bool control, bool shift);
143 //void OnLabelLeftClick(int row, int col, int x, int y, bool control, bool shift);
144 //void OnLabelRightClick(int row, int col, int x, int y, bool control, bool shift);
145 //void OnSelectCell(int row, int col);
146 //void OnSelectCellImplementation(wxDC *dc, int row, int col);
148 void SetCellAlignment(int alignment, int row, int col);
149 %name(SetDefCellAlignment)void SetCellAlignment(int alignment);
150 void SetCellBackgroundColour(const wxColour& colour, int row, int col);
151 %name(SetDefCellBackgroundColour)
152 void SetCellBackgroundColour(const wxColour& colour);
153 void SetCellTextColour(const wxColour& colour, int row, int col);
154 %name(SetDefCellTextColour)void SetCellTextColour(const wxColour& colour);
155 void SetCellTextFont(wxFont *font, int row, int col);
156 %name(SetDefCellTextFont)void SetCellTextFont(wxFont *font);
157 void SetCellValue(const wxString& val, int row, int col);
158 void SetColumnWidth(int col, int width);
159 void SetDividerPen(wxPen *pen);
160 void SetEditable(bool editable);
161 void SetGridCursor(int row, int col);
162 void SetLabelAlignment(int orientation, int alignment);
163 void SetLabelBackgroundColour(const wxColour& value);
164 void SetLabelSize(int orientation, int size);
165 void SetLabelTextColour(const wxColour& value);
166 void SetLabelTextFont(wxFont *font);
167 void SetLabelValue(int orientation, const wxString& value, int pos);
168 void SetRowHeight(int row, int height);
170 void UpdateDimensions();
173 //---------------------------------------------------------------------------
175 class wxNotebookEvent : public wxCommandEvent {
178 int GetOldSelection();
183 class wxNotebook : public wxControl {
185 wxNotebook(wxWindow *parent,
187 const wxPoint& pos = wxPyDefaultPosition,
188 const wxSize& size = wxPyDefaultSize,
190 char* name = "notebook");
193 int SetSelection(int nPage);
194 void AdvanceSelection(bool bForward = TRUE);
196 bool SetPageText(int nPage, const wxString& strText);
197 wxString GetPageText(int nPage) const;
198 void SetImageList(wxImageList* imageList);
199 wxImageList* GetImageList();
200 int GetPageImage(int nPage);
201 bool SetPageImage(int nPage, int nImage);
204 // LINK ERROR: void SetPageSize(const wxSize& size);
205 // LINK ERROR: void SetPadding(const wxSize& padding);
206 bool DeletePage(int nPage);
207 bool DeleteAllPages();
208 bool AddPage(/*wxNotebookPage*/ wxWindow *pPage,
209 const wxString& strText,
210 bool bSelect = FALSE,
213 bool InsertPage(int nPage,
214 /*wxNotebookPage*/ wxWindow *pPage,
215 const wxString& strText,
216 bool bSelect = FALSE,
219 wxNotebookPage *GetPage(int nPage);
223 //---------------------------------------------------------------------------
224 /////////////////////////////////////////////////////////////////////////////
227 // Revision 1.3 1998/08/18 19:48:20 RD
228 // more wxGTK compatibility things.
230 // It builds now but there are serious runtime problems...
232 // Revision 1.2 1998/08/15 07:36:50 RD
233 // - Moved the header in the .i files out of the code that gets put into
234 // the .cpp files. It caused CVS conflicts because of the RCS ID being
235 // different each time.
237 // - A few minor fixes.
239 // Revision 1.1 1998/08/09 08:25:52 RD