InputDevDlg.h
gehe zur Dokumentation dieser Datei
00001 
00038 #ifndef _INPUTDEVDLG_H_
00039 #define _INPUTDEVDLG_H_
00040 
00041 
00042 #if defined(__GNUG__) && !defined(__APPLE__)
00043 #pragma interface "InputDevDlg.cpp"
00044 #endif
00045 
00050 
00051 #include "Defs.h"
00052 #include "wx/xrc/xmlres.h"
00053 #include "wx/html/htmlwin.h"
00054 #include "wx/statline.h"
00055 #include "wx/filepicker.h"
00056 #include "wxresource.h"
00057 #include "Device.h"
00058 #include "wx/valgen.h"
00059 #include "wx/valtext.h"
00061 
00062 
00063 #if 0
00064 
00068 
00069 
00070 class wxBoxSizer;
00072 
00077 
00078 #define ID_INPDIALOG 10010
00079 #define SYMBOL_INPUTDEVDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00080 #define SYMBOL_INPUTDEVDLG_TITLE _("Input Device")
00081 #define SYMBOL_INPUTDEVDLG_IDNAME ID_INPDIALOG
00082 #define SYMBOL_INPUTDEVDLG_SIZE wxSize(400, 300)
00083 #define SYMBOL_INPUTDEVDLG_POSITION wxDefaultPosition
00084 #define ID_CHOICE 10011
00085 #define ID_CHOICE1 10012
00086 #define ID_TEXTCTRL 10013
00087 #define ID_BUTTON 10014
00088 #define ID_TEXTCTRL1 10015
00089 #define ID_BUTTON1 10016
00090 
00091 
00096 #ifndef wxCLOSE_BOX
00097 #define wxCLOSE_BOX 0x1000
00098 #endif
00099 #ifndef wxFIXED_MINSIZE
00100 #define wxFIXED_MINSIZE 0
00101 #endif
00102 
00107 #endif
00108 
00109 class InputDevDlg: public InputDevDlgBase
00110 {
00111         DECLARE_DYNAMIC_CLASS( InputDevDlg )
00112         DECLARE_EVENT_TABLE()
00113 
00114 protected:
00115         wxSizer *Container,* TypeBox, *PortBox, *MidiFileBox, *GuidoFileBox;
00116 
00117 struct TypeData:wxClientData
00118         {
00119                 DevType nr;
00120                 TypeData(DevType i):wxClientData()
00121                 {
00122                         nr=i;
00123                 }
00124 
00125                 bool operator == (DevType i)
00126                 {
00127                         if (this)
00128                                 return i == nr;
00129                         else return false;
00130                 }
00131 
00132                 operator DevType()
00133                 {
00134                         if (this) return nr;
00135                         else return DTNotSet;
00136                 }
00137         };
00138 
00139         int FindType (DevType t);
00140 
00141 public:
00143         InputDevDlg( wxWindow* parent = NULL);
00144 
00146         void OnChoiceSelected( wxCommandEvent& event );
00147 
00149         void OnRemoveClick( wxCommandEvent& event );
00150 
00151         void OnFileChanged ( wxFileDirPickerEvent & event );
00152 
00153         void UpdateLayout(DevType type);
00154 
00155         int GetMidiDevice() const
00156         {
00157                 return PortChoice->GetSelection() ;
00158         }
00159 
00160         void SetMidiDevice(int value)
00161 
00162         {
00163                 DEBUGLOG(_T("%d"),value);
00164                 PortChoice->SetSelection (value) ;
00165                 Update();
00166         }
00167 
00168         wxString GetMidiFile() const
00169         {
00170                 return MidiFilePicker->GetPath() ;
00171         }
00172 
00173         void SetMidiFile(wxString value)
00174 
00175         {
00176                 DEBUGLOG(value);
00177                 MidiFilePicker->SetPath(value);
00178                 Update();
00179                 DEBUGLOG(_T("done"));
00180         }
00181 
00182         wxString GetGUIDOFile() const
00183         {
00184                 return GuidoFilePicker->GetPath() ;
00185         }
00186 
00187         void SetGUIDOFile(wxString value)
00188 
00189         {
00190                 DEBUGLOG(value);
00191                 GuidoFilePicker->SetPath(value);
00192                 Update();
00193         }
00194 
00195         DevType GetType() const
00196         {
00197                 int Type = DeviceChoice->GetSelection();
00198                 if (Type == wxNOT_FOUND) return DTNotSet;
00199 
00200                 wxASSERT (dynamic_cast<TypeData *>(DeviceChoice->GetClientObject(Type)));
00201                 TypeData * obj = (TypeData *)DeviceChoice->GetClientObject(Type);
00202 
00203                 if (obj) return  *obj;
00204                 else return DTNotSet;
00205         }
00206 
00207         void SetType(DevType value)
00208 
00209         {
00210                 DEBUGLOG(_T("%d"),value);
00211                 UpdateLayout(value);
00212                 Update();
00213         }
00214 
00215         wxString GetPortString(int i)
00216         {
00217                 return PortChoice->GetString (i);
00218         }
00219 
00220         void AppendPortChoice (const wxString &s)
00221         {
00222                 PortChoice->Append (s);
00223         }
00224 
00226         wxBitmap GetBitmapResource (const wxString& name );
00227 
00229         wxIcon GetIconResource (const wxString& name );
00230 
00232         static bool ShowToolTips ();
00233 
00234 };
00235 
00236 #endif
00237 // _INPUTDEVDLG_H_
00238 
00239 

Erzeugt am Sun Aug 21 2011 10:51:54 für Mutabor von doxygen 1.7.4