gehe zur Dokumentation dieser Datei00001
00114 #ifndef BOXSHAPE_H
00115 #define BOXSHAPE_H
00116
00117
00118
00119
00120
00121
00122 #include "Defs.h"
00123
00124 #include "BoxChannelShape.h"
00125 #include "BoxIconShape.h"
00126 #include "Device.h"
00127
00128 #include "wx/colour.h"
00129
00130 wxColor BoxColor(int nr);
00131 void initBoxColors();
00132
00133 class MutBoxShape:public MutBoxIconShape
00134 {
00135 protected:
00136 MutBoxIconShape * m_icon;
00137 wxSizer * channels;
00138 static wxSizerFlags sizerFlags;
00139 int boxId;
00140 static int maxBoxId;
00141
00142 public:
00143 MutBoxShape():MutBoxIconShape(),m_icon(NULL),channels(NULL),boxId(NoBox) {}
00144
00145 MutBoxShape(wxStaticBox *box, int orient):
00146 MutBoxIconShape()
00147 {
00148 STUBC;
00149 }
00150
00151 MutBoxShape(wxWindow * parent,wxWindowID wid, int Id=NoBox):
00152 MutBoxIconShape()
00153 {
00154 Create(parent,wid,Id);
00155 }
00156
00157 virtual ~MutBoxShape()
00158 {
00159
00160 }
00161
00162 bool Create(wxWindow * parent,wxWindowID wid, int Id=NoBox);
00163
00164 static void SetSizerFlags (wxSizerFlags flags) {sizerFlags = flags; }
00165 static const wxSizerFlags & GetSizerFlags() { return sizerFlags; }
00166
00167 virtual void DoLeftDblClick();
00168 void LeftDblClickEvent (wxMouseEvent & event) {
00169 DoLeftDblClick();
00170 }
00171
00172 BoxDlg * ShowBoxDialog() const;
00173 virtual void InitializeDialog(BoxDlg * dlg) const;
00174
00175
00176 virtual MutBoxChannelShape * AddChannel(MutBoxChannelShape * channel);
00177 virtual MutBoxChannelShape * AddChannel(Route * route);
00178 virtual MutBoxChannelShape * AddChannel(RoutePanel * panel);
00179
00180 virtual bool HasChannel(Route * route);
00181
00182 virtual void AddPossibleOutput(MutOutputDeviceShape * device);
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192 virtual void DrawLines(wxDC & dc);
00193
00194 virtual bool Detach( wxWindow *window );
00195 virtual bool Detach( wxSizer *sizer )
00196 {
00197 if (channels)
00198 return channels -> Detach(sizer);
00199 else
00200 return false;
00201 }
00202 virtual bool Detach( int index )
00203 {
00204 if (channels)
00205 return channels -> Detach(index);
00206 else
00207 return false;
00208 }
00209 virtual bool replaceSelfBy (MutBoxShape * newshape);
00210 virtual bool DetachBox ();
00211
00212 virtual bool readDialog (BoxDlg * box);
00213 virtual bool CanHandleType (int type) { return true; }
00214 int GetBoxId() const { return boxId; }
00215 private:
00216 void SetBoxId(int Id, bool layout=true);
00217 DECLARE_CLASS(MutBoxShape)
00218 DECLARE_EVENT_TABLE();
00219 };
00220
00221 WX_DECLARE_LIST (MutBoxShape, MutBoxShapeList);
00222
00223
00224 #endif
00225
00226
00227