Example #1
0
void DeviceToolBar::Populate()
{
   DeinitChildren();
   // Hosts
   mHost = new wxChoice(this,
                        wxID_ANY,
                        wxDefaultPosition,
                        wxDefaultSize);
   mHost->SetName(_("Audio Host"));

   Add(mHost, 0, wxALIGN_CENTER);

   // Input device
   if( mRecordBitmap == NULL )
      mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic));

   Add(new wxStaticBitmap(this,
                          wxID_ANY,
                          *mRecordBitmap), 0, wxALIGN_CENTER);

   mInput = new wxChoice(this,
                         wxID_ANY,
                         wxDefaultPosition,
                         wxDefaultSize);
   /* i18n-hint: (noun) It's the device used for recording.*/
   mInput->SetName(_("Recording Device"));
   Add(mInput, 0, wxALIGN_CENTER);

   mInputChannels = new wxChoice(this,
                         wxID_ANY,
                         wxDefaultPosition,
                         wxDefaultSize);
   mInputChannels->SetName(_("Recording Channels"));
   Add(mInputChannels, 0, wxALIGN_CENTER);

   // Output device
   if( mPlayBitmap == NULL )
      mPlayBitmap = new wxBitmap(theTheme.Bitmap(bmpSpeaker));
   Add(new wxStaticBitmap(this,
                          wxID_ANY,
                          *mPlayBitmap), 0, wxALIGN_CENTER);

   mOutput = new wxChoice(this,
                               wxID_ANY,
                               wxDefaultPosition,
                               wxDefaultSize);
   /* i18n-hint: (noun) It's the device used for playback.*/
   mOutput->SetName(_("Playback Device"));
   Add(mOutput, 0, wxALIGN_CENTER);




   mHost->Connect(wxEVT_SET_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mHost->Connect(wxEVT_KILL_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mOutput->Connect(wxEVT_SET_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mOutput->Connect(wxEVT_KILL_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mInput->Connect(wxEVT_SET_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mInput->Connect(wxEVT_KILL_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mInputChannels->Connect(wxEVT_SET_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);
   mInputChannels->Connect(wxEVT_KILL_FOCUS,
                 wxFocusEventHandler(DeviceToolBar::OnFocus),
                 NULL,
                 this);

   RefillCombos();
}
Example #2
0
void DeviceToolBar::Populate()
{
    DeinitChildren();
    // Hosts
    mHost = new wxChoice(this,
                         wxID_ANY,
                         wxDefaultPosition,
                         wxDefaultSize);
    mHost->SetName(_("Audio Host"));

    Add(mHost, 0, wxALIGN_CENTER);

    // Output device
    mPlayBitmap = new wxBitmap(theTheme.Bitmap(bmpSpeaker));
    Add(new wxStaticBitmap(this,
                           wxID_ANY,
                           *mPlayBitmap), 0, wxALIGN_CENTER);

    mOutput = new wxChoice(this,
                           wxID_ANY,
                           wxDefaultPosition,
                           wxDefaultSize);
    mOutput->SetName(_("Output Device"));
    Add(mOutput, 0, wxALIGN_CENTER);

    // Input device
    mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic));

    Add(new wxStaticBitmap(this,
                           wxID_ANY,
                           *mRecordBitmap), 0, wxALIGN_CENTER);

    mInput = new wxChoice(this,
                          wxID_ANY,
                          wxDefaultPosition,
                          wxDefaultSize);
    mInput->SetName(_("Input Device"));
    Add(mInput, 0, wxALIGN_CENTER);

    mInputChannels = new wxChoice(this,
                                  wxID_ANY,
                                  wxDefaultPosition,
                                  wxDefaultSize);
    mInputChannels->SetName(_("Input Channels"));
    Add(mInputChannels, 0, wxALIGN_CENTER);

    mHost->Connect(wxEVT_SET_FOCUS,
                   wxFocusEventHandler(DeviceToolBar::OnFocus),
                   NULL,
                   this);
    mHost->Connect(wxEVT_KILL_FOCUS,
                   wxFocusEventHandler(DeviceToolBar::OnFocus),
                   NULL,
                   this);
    mOutput->Connect(wxEVT_SET_FOCUS,
                     wxFocusEventHandler(DeviceToolBar::OnFocus),
                     NULL,
                     this);
    mOutput->Connect(wxEVT_KILL_FOCUS,
                     wxFocusEventHandler(DeviceToolBar::OnFocus),
                     NULL,
                     this);
    mInput->Connect(wxEVT_SET_FOCUS,
                    wxFocusEventHandler(DeviceToolBar::OnFocus),
                    NULL,
                    this);
    mInput->Connect(wxEVT_KILL_FOCUS,
                    wxFocusEventHandler(DeviceToolBar::OnFocus),
                    NULL,
                    this);
    mInputChannels->Connect(wxEVT_SET_FOCUS,
                            wxFocusEventHandler(DeviceToolBar::OnFocus),
                            NULL,
                            this);
    mInputChannels->Connect(wxEVT_KILL_FOCUS,
                            wxFocusEventHandler(DeviceToolBar::OnFocus),
                            NULL,
                            this);

    RefillCombos();
}