gehe zur Dokumentation dieser Datei00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 #ifndef OUTPUTDEVICESHAPE_H
00083 #define OUTPUTDEVICESHAPE_H
00084
00085
00086
00087 #include "wx/defs.h"
00088
00089
00090
00091 #include "DeviceShape.h"
00092 #include "OutputDevDlg.h"
00093 #include "BoxChannelShape.h"
00094
00095 class MutOutputDeviceShape:public MutDeviceShape
00096 {
00097 protected:
00098 static wxSizerFlags sizerFlags;
00099 OutDevice *device;
00100 MutBoxChannelShapeList routes;
00101
00102 public:
00103 MutOutputDeviceShape():MutDeviceShape(),device(NULL) { }
00104
00105
00106 MutOutputDeviceShape (wxWindow * parent, wxWindowID id,
00107 const wxString & name) {
00108 Create (parent, id, name);
00109 }
00110
00111 MutOutputDeviceShape (wxWindow * parent, wxWindowID id, OutDevice * d):
00112 MutDeviceShape() {
00113 Create (parent, id, d);
00114 }
00115
00116 virtual ~MutOutputDeviceShape()
00117 {
00118 if (device) {
00119 wxASSERT (device -> getUserData() == this);
00120 device -> setUserData (NULL);
00121 }
00122 DEBUGLOG(other, _T("Deleting."));
00123 }
00124
00125
00126 bool Create (wxWindow * parent, wxWindowID id,
00127 const wxString & name)
00128 {
00129 device = NULL;
00130 return MutDeviceShape::Create (parent,id, name);
00131 }
00132
00133 bool Create (wxWindow * parent, wxWindowID id, OutDevice * d);
00134
00135
00136
00137 static MutOutputDeviceShape * CreateShape(wxWindow * parent,
00138 wxWindowID id,
00139 OutDevice * d);
00140
00141 MutOutputDeviceShape * CreateShape (OutDevice * d)
00142 {
00143 DEBUGLOG (other,_T (""));
00144 return CreateShape (m_parent, wxID_ANY,d);
00145 }
00146
00147 static void SetSizerFlags (wxSizerFlags flags)
00148 {
00149 sizerFlags = flags;
00150 }
00151 static const wxSizerFlags & GetSizerFlags() { return sizerFlags; }
00152
00153 void SetLabel(const wxString & st );
00154
00155 MutIcon & GetMutIcon ()
00156 {
00157 return MidiOutputDevBitmap;
00158 }
00159
00160 virtual void AddRoute(Route * route);
00161 virtual void AddRoute(MutBoxChannelShape * route) {
00162 wxASSERT(route->GetRoute()->getUserData() == route);
00163 AddRoute(route->GetRoute());
00164 }
00165 virtual void RemoveRoute(Route * route);
00166 virtual void RemoveRoute(MutBoxChannelShape * route) {
00167 wxASSERT(route->GetRoute()->getUserData() == route);
00168 RemoveRoute(route->GetRoute());
00169 }
00170
00171 Route * getRoutes()
00172 {
00173 UNREACHABLEC;
00174 abort();
00175 }
00176 const MutBoxChannelShapeList & getRoutesList()
00177 {
00178 return routes;
00179 }
00180
00181 OutDevice * GetDevice()
00182 {
00183 return device;
00184 }
00185
00186 virtual void DoLeftDblClick();
00187
00188 OutputDevDlg * ShowDeviceDialog();
00189
00190 virtual wxPanel * GetOutputFilterPanel(wxWindow * parent, Route * route) const
00191 {
00192 ABSTRACT_FUNCTIONC;
00193 return NULL;
00194 }
00195
00196 virtual void ReadOutputFilterPanel(wxWindow * panel, Route * route)
00197 {
00198 ABSTRACT_FUNCTIONC;
00199 }
00200 virtual void ReadPanel(OutputFilterPanel * panel, MutBoxChannelShape * channel);
00201
00202 protected:
00203 virtual void InitializeDialog(OutputDevDlg * out) const
00204 {
00205 DEBUGLOG(other, _T("Initializing only generic OutputDeviceShape"));
00206 }
00207
00208 virtual bool readDialog (OutputDevDlg * out) {
00209 wxASSERT (false);
00210 return false;
00211 }
00212
00214
00217 virtual bool DetachDevice ();
00218 virtual bool replaceSelfBy (MutOutputDeviceShape * newshape);
00219
00220 virtual bool CanHandleType (DevType type) = 0;
00221
00222 private:
00223 DECLARE_ABSTRACT_CLASS(MutDeviceShape);
00224 };
00225
00226 #endif
00227
00228
00229