gehe zur Dokumentation dieser Datei00001
00076 #ifndef INPUTDEVICESHAPE_H
00077 #define INPUTDEVICESHAPE_H
00078
00079
00080
00081 #include "wx/defs.h"
00082
00083
00084
00085 #include "RouteIcons.h"
00086 #include "DeviceShape.h"
00087 #include "InputDevDlg.h"
00088
00089 class InputFilterPanel;
00090 class MutBoxChannelShape;
00091
00092 class MutInputDeviceShape:public MutDeviceShape{
00093 protected:
00094 InDevice *device;
00095
00096 static wxSizerFlags sizerFlags;
00097
00098 public:
00099
00100 MutInputDeviceShape():MutDeviceShape() {
00101 device = NULL;
00102 }
00103
00104 MutInputDeviceShape (wxWindow * parent, wxWindowID id, const wxString &
00105 name):MutDeviceShape ()
00106 {
00107 device = NULL;
00108 Create (parent, id, name);
00109 }
00110
00111
00112 MutInputDeviceShape (wxWindow * parent, wxWindowID id, InDevice * d):
00113 MutDeviceShape() {
00114 Create (parent, id, d);
00115 }
00116
00117 virtual ~MutInputDeviceShape();
00118
00119 bool Create (wxWindow * parent, wxWindowID id, const wxString &
00120 name)
00121 {
00122 DEBUGLOG (other,_T (""));
00123 device = NULL;
00124 return MutDeviceShape::Create (parent, id, name);
00125 }
00126
00127 bool Create (wxWindow * parent, wxWindowID id, InDevice * d);
00128
00129 static MutInputDeviceShape * CreateShape(wxWindow * parent,
00130 wxWindowID id,
00131 InDevice * d);
00132
00133 MutInputDeviceShape * CreateShape (InDevice * d)
00134 {
00135 DEBUGLOG (other,_T (""));
00136 return CreateShape (m_parent, wxID_ANY,d);
00137 }
00138
00139 static void SetSizerFlags (wxSizerFlags flags) {sizerFlags = flags; }
00140 static const wxSizerFlags & GetSizerFlags() { return sizerFlags; }
00141
00142 void SetLabel(const wxString & st );
00143
00144 MutIcon & GetMutIcon ()
00145 {
00146 return MidiInputDevBitmap;
00147 }
00148
00149 Route * getRoutes()
00150 {
00151 if (!device) return NULL;
00152 return device->GetRoutes();
00153 }
00154
00155 virtual void AddRoute(Route * route);
00156 virtual void RemoveRoute(Route * route);
00157
00158 void SetDevice (InDevice * d) {
00159 wxASSERT (d);
00160 device = d;
00161 wxASSERT (device->getUserData());
00162 device -> setUserData (this);
00163 }
00164
00165 InDevice * GetDevice() { return device; }
00166
00167 virtual void DoLeftDblClick();
00168 InputDevDlg * ShowDeviceDialog();
00169 virtual wxPanel * GetInputFilterPanel(wxWindow * parent, Route * route) const
00170 {
00171 ABSTRACT_FUNCTIONC;
00172 return NULL;
00173 }
00174
00175 virtual void ReadInputFilterPanel(wxWindow * panel, Route * route)
00176 {
00177 ABSTRACT_FUNCTIONC;
00178 return;
00179 }
00180 virtual void ReadPanel(InputFilterPanel * panel, MutBoxChannelShape * channel);
00181
00182 protected:
00183 virtual void InitializeDialog(InputDevDlg * in) const { }
00184 virtual bool readDialog (InputDevDlg * in) {
00185 wxASSERT (false);
00186 return false;
00187 }
00189
00192 virtual bool DetachDevice ();
00193 virtual bool replaceSelfBy (MutInputDeviceShape * newshape);
00194 virtual bool CanHandleType (DevType type) { return false; }
00195
00196 private:
00197 DECLARE_DYNAMIC_CLASS(MutDeviceShape);
00198 };
00199
00200 #endif
00201
00202
00203