gehe zur Dokumentation dieser Datei00001
00058 #ifndef _OUTPUTDEVDLG_H_
00059 #define _OUTPUTDEVDLG_H_
00060
00061
00066 #include "Defs.h"
00067 #include "wx/xrc/xmlres.h"
00068 #include "wx/html/htmlwin.h"
00069 #include "wx/statline.h"
00070 #include "wx/filepicker.h"
00071 #include "resourceload.h"
00072 #include "Device.h"
00073 #include "wx/valgen.h"
00074 #include "wx/valtext.h"
00075
00076
00077 class OutputDevDlg: public OutputDevDlgBase
00078 {
00079 DECLARE_DYNAMIC_CLASS( OutputDevDlg )
00080 DECLARE_EVENT_TABLE()
00081
00082 protected:
00083 wxSizer *Container,* TypeBox, *PortBox, *MidiFileBox, *GuidoFileBox;
00084
00085 struct TypeData:wxClientData
00086 {
00087 DevType nr;
00088 TypeData(DevType i):wxClientData()
00089 {
00090 nr=i;
00091 }
00092
00093 bool operator == (DevType i)
00094 {
00095 if (this)
00096 return i == nr;
00097 else return false;
00098 }
00099
00100 operator DevType()
00101 {
00102 if (this) return nr;
00103 else return DTNotSet;
00104 }
00105 };
00106
00107 int FindType (DevType t);
00108
00109 public:
00111 OutputDevDlg( wxWindow* parent = NULL);
00112
00114 void OnChoiceSelected( wxCommandEvent& event );
00115
00117 void OnRemoveClick( wxCommandEvent& event );
00118
00119 void OnFileChanged ( wxFileDirPickerEvent & event );
00120
00121 void UpdateLayout(DevType type);
00122
00123 int GetMidiDevice() const
00124 {
00125 return PortChoice->GetSelection() ;
00126 }
00127
00128 void SetMidiDevice(int value)
00129
00130 {
00131 DEBUGLOG(other, _T("%d"),value);
00132 PortChoice->SetSelection (value) ;
00133 Update();
00134 }
00135
00136 wxString GetMidiFile() const
00137 {
00138 return MidiFilePicker->GetPath() ;
00139 }
00140
00141 void SetMidiFile(wxString value)
00142
00143 {
00144 DEBUGLOG(other, value);
00145 MidiFilePicker->SetPath(value);
00146 InvalidateBestSize();
00147 SetInitialSize(wxDefaultSize);
00148 Update();
00149 DEBUGLOG(other, _T("done"));
00150 }
00151
00152 wxString GetGUIDOFile() const
00153 {
00154 return GuidoFilePicker->GetPath() ;
00155 }
00156
00157 void SetGUIDOFile(wxString value)
00158
00159 {
00160 DEBUGLOG(other, value);
00161 GuidoFilePicker->SetPath(value);
00162 Update();
00163 }
00164
00165 DevType GetType() const
00166 {
00167 int Type = DeviceChoice->GetSelection();
00168 if (Type == wxNOT_FOUND) return DTNotSet;
00169
00170 wxASSERT (dynamic_cast<TypeData *>(DeviceChoice->GetClientObject(Type)));
00171 TypeData * obj = (TypeData *)DeviceChoice->GetClientObject(Type);
00172
00173 if (obj) return *obj;
00174 else return DTNotSet;
00175 }
00176
00177 void SetType(DevType value)
00178
00179 {
00180 DEBUGLOG(other, _T("%d"),value);
00181 UpdateLayout(value);
00182 Update();
00183 }
00184
00185 long GetMidiBendingRange() {
00186 return MidiBendingRange->GetValue();
00187 }
00188
00189 void SetMidiBendingRange (long i) {
00190 MidiBendingRange->SetValue (i);
00191 }
00192
00193 long GetMidiFileBendingRange() {
00194 return MidiFileBendingRange->GetValue();
00195 }
00196
00197 void SetMidiFileBendingRange (long i) {
00198 MidiFileBendingRange->SetValue (i);
00199 }
00200
00201 wxString GetPortString(int i)
00202 {
00203 return PortChoice->GetString (i);
00204 }
00205
00206 void AppendPortChoice (const wxString &s)
00207 {
00208 PortChoice->Append (s);
00209 }
00210
00212 wxBitmap GetBitmapResource (const wxString& name );
00213
00215 wxIcon GetIconResource (const wxString& name );
00216
00218 static bool ShowToolTips ();
00219 };
00220
00221 #endif
00222
00223