gehe zur Dokumentation dieser Datei00001
00105 #ifndef MUTCHILD_H
00106 #define MUTCHILD_H
00107
00108 #include "wx/toolbar.h"
00109 #include "wx/dynarray.h"
00110 #include "wx/arrimpl.cpp"
00111 #include "mhDefs.h"
00112 #include "wx/aui/aui.h"
00113 #include "MutTextBox.h"
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139 extern ArrayOfWinAttr WinAttrs[WK_NULL];
00140
00141 class MutFrame;
00142
00143
00144
00145
00146
00147
00148
00149 class MutChild: public MutTextBox
00150 {
00151
00152 public:
00153 MutChild (WinKind winkind,
00154 WinAttr *winAttr,
00155 wxWindow * parent= NULL,
00156 wxWindowID id = -1,
00157
00158 const wxPoint& pos = wxDefaultPosition,
00159 const wxSize & size = wxDefaultSize);
00160
00161 ~MutChild();
00162
00163 void OnActivate(wxActivateEvent& event);
00164
00165
00166
00167
00168
00169
00170
00171 void deleteFromWinAttrs();
00172
00173 void OnClose(wxCloseEvent& event)
00174 {
00175 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00176 #ifdef DEBUG
00177 std::cerr << "MutChild::OnClose" << std::endl;
00178 #endif
00179 MutTextBox::OnClose(event);
00180 }
00181
00182
00183 void OnAuiClose(wxAuiManagerEvent& event)
00184
00185 {
00186 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00187 #ifdef DEBUG
00188 std::cerr << "MutChild::OnAuiClose" << std::endl;
00189 #endif
00190 deleteFromWinAttrs();
00191 }
00192
00193
00194
00195 void GetClientSize(int * width, int * height)
00196 {
00197 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00198 MutTextBox::GetClientSize(width,height);
00199
00200 if ((width += 2) < 0) width = 0;
00201
00202 if ((height +=2) < 0) height =0;
00203 }
00204
00205 void SetClientSize(int width, int height)
00206 {
00207 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00208 MutTextBox::SetClientSize(width-2, height-3);
00209 }
00210
00211 void SetClientSize(const wxSize& size)
00212 {
00213 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00214 wxSize s = size;
00215 s.IncBy(-2);
00216 MutTextBox::SetClientSize(s);
00217 }
00218
00219 void ClientToScreen(int * x, int * y )
00220
00221 {
00222 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00223 MutTextBox::ClientToScreen(x,y);
00224 x+=1;
00225 y+=1;
00226 }
00227
00228 wxPoint ClientToScreen(const wxPoint& pt) const
00229 {
00230 wxASSERT(WK_KEY <= winKind && winKind < WK_NULL);
00231 return MutTextBox::ClientToScreen(pt)+wxPoint(1,1);
00232 }
00233
00234
00235
00236
00237
00238 DECLARE_EVENT_TABLE()
00239 };
00240
00241 extern int gs_nFrames;
00242
00243 WinAttr* GetWinAttr(WinKind kind, int box = 0);
00244
00245 WinAttr* Get(WinKind kind, int box = 0);
00246
00247 bool IsOpen(WinKind kind, int box = 0);
00248
00249 bool IsWanted(WinKind kind, int box = 0);
00250
00251 void DontWant(WinKind kind, int box = 0);
00252
00253 int NumberOfOpen(WinKind kind);
00254
00255 #endif
00256