Example #1
0
//---------------------------------------------------------------------------------------
bool WizardMetronomePage::Create( wxWizard* parent )
{
    // member initialisation
    m_pMtrChannelCombo = NULL;
    m_pMtrInstr1Combo = NULL;
    m_pMtrInstr2Combo = NULL;

    // Page creation
    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap );
    CreateControls();
    GetSizer()->Fit(this);

    // populate channel combo
    m_pMtrChannelCombo->Clear();
    for(int i=1; i <= 16; i++) {
        m_pMtrChannelCombo->Append(wxString::Format("%d", i));
    }

    //Set selection according to current user prefs
    MidiServer* pMidi = m_appScope.get_midi_server();
    m_pMtrChannelCombo->SetSelection( pMidi->MtrChannel() );

    //populate metronome sounds combos
    wxMidiDatabaseGM* pMidiGM = wxMidiDatabaseGM::GetInstance();
    int nTone1 = pMidi->MtrTone1();
    int nTone2 = pMidi->MtrTone2();
    pMidiGM->PopulateWithPercusionInstr((wxControlWithItems*)m_pMtrInstr1Combo, nTone1);
    pMidiGM->PopulateWithPercusionInstr((wxControlWithItems*)m_pMtrInstr2Combo, nTone2);

    return true;
}
Example #2
0
//---------------------------------------------------------------------------------------
bool WizardInstrumentsPage::Create( wxWizard* parent )
{
    // member initialisation
    m_pVoiceChannelCombo = NULL;
    m_pSectCombo = NULL;
    m_pInstrCombo = NULL;

    // page creation
    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap );
    CreateControls();
    GetSizer()->Fit(this);

    // populate channel combo
    m_pVoiceChannelCombo->Clear();
    for(int i=1; i <= 16; i++) {
        m_pVoiceChannelCombo->Append(wxString::Format("%d", i));
    }
    //Set selection according to current user prefs
    MidiServer* pMidi = m_appScope.get_midi_server();
    m_pVoiceChannelCombo->SetSelection( pMidi->VoiceChannel() );

    //populate sections and instruments combos
    wxMidiDatabaseGM* pMidiGM = wxMidiDatabaseGM::GetInstance();
    int nInstr = pMidi->VoiceInstr();
    int nSect = pMidiGM->PopulateWithSections((wxControlWithItems*)m_pSectCombo, nInstr );
    pMidiGM->PopulateWithInstruments((wxControlWithItems*)m_pInstrCombo, nSect, nInstr);

    return true;
}
Example #3
0
bool CErrProxyPage::Create(CBOINCBaseWizard* parent) {
    m_pTitleStaticCtrl = NULL;
    m_pProxyHTTPDescriptionCtrl = NULL; 
    m_pProxyHTTPServerStaticCtrl = NULL;
    m_pProxyHTTPServerCtrl = NULL;
    m_pProxyHTTPPortStaticCtrl = NULL;
    m_pProxyHTTPPortCtrl = NULL;
    m_pProxyHTTPUsernameStaticCtrl = NULL;
    m_pProxyHTTPUsernameCtrl = NULL;
    m_pProxyHTTPPasswordStaticCtrl = NULL;
    m_pProxyHTTPPasswordCtrl = NULL;
#if 0
    m_pProxyHTTPAutodetectCtrl = NULL;
#endif
    m_pProxySOCKSDescriptionCtrl = NULL; 
    m_pProxySOCKSServerStaticCtrl = NULL;
    m_pProxySOCKSServerCtrl = NULL;
    m_pProxySOCKSPortStaticCtrl = NULL;
    m_pProxySOCKSPortCtrl = NULL;
    m_pProxySOCKSUsernameStaticCtrl = NULL;
    m_pProxySOCKSUsernameCtrl = NULL;
    m_pProxySOCKSPasswordStaticCtrl = NULL;
    m_pProxySOCKSPasswordCtrl = NULL;
 
    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizardPage::Create(parent, wizardBitmap);

    CreateControls();
    GetSizer()->Fit(this);
    return TRUE;
}
bool CErrNotDetectedPage::Create(CBOINCBaseWizard* parent) {
    m_pTitleStaticCtrl = NULL;
    m_pDirectionsStaticCtrl = NULL;

    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizardPage::Create(parent, wizardBitmap);

    CreateControls();
    GetSizer()->Fit(this);
    return TRUE;
}
Example #5
0
bool WizardPageCanalConfig::Create( wxWizard* parent )
{
    wxBitmap wizardBitmap( wxNullBitmap );
    wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap );

    CreateControls();
    if ( GetSizer() ) {
        GetSizer()->Fit( this );
    }

    return true;
}
bool DictionaryWizard::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos )
{
////@begin DictionaryWizard member initialisation
////@end DictionaryWizard member initialisation

////@begin DictionaryWizard creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS|wxWIZARD_EX_HELPBUTTON);
    wxBitmap wizardBitmap(wiztest_xpm);
    wxWizard::Create( parent, id, _("Download Dictionary"), wizardBitmap, pos );

    CreateControls();
////@end DictionaryWizard creation
    return TRUE;
}
Example #7
0
bool CanalConfigWizard::Create( wxWindow* parent, 
                                    wxWindowID id, 
                                    const wxPoint& pos )
{
    for ( int i = 0; i < MAX_PARAMETERS; i++ ) {
        m_pgConfig[ i ] = NULL;
    }
    
    for ( int i = 0; i < MAX_FLAGS; i++ ) {
        m_pgConfigFlags[ i ] = NULL;
    }

    SetExtraStyle( wxWS_EX_BLOCK_EVENTS | wxWIZARD_EX_HELPBUTTON );
    wxBitmap wizardBitmap( GetBitmapResource( wxT( "vscp_logo.jpg" ) ) );
    wxWizard::Create( parent,
                      id,
                      CANAL_CONFIG_WIZARD_TITLE,
                      wizardBitmap,
                      pos,
                      wxDEFAULT_DIALOG_STYLE | wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX );

    return true;
}
Example #8
0
//---------------------------------------------------------------------------------------
bool MidiWizard::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos )
{
    // member initialisation
    m_pMtrChannelCombo = NULL;

    // creation
    SetExtraStyle(GetExtraStyle()|wxWIZARD_EX_HELPBUTTON);
    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizard::Create( parent, id, _("MIDI configuration wizard"), wizardBitmap, pos );
    CreateControls();

    //save current Midi configuration to restore it if the wizard is cancelled
    MidiServer* pMidi = m_appScope.get_midi_server();
    m_nOldInDevId = pMidi->InDevId();
    m_nOldOutDevId = pMidi->OutDevId();
    m_nOldVoiceInstr = pMidi->VoiceInstr();
    m_nOldVoiceChannel = pMidi->VoiceChannel();
    m_nOldMtrInstr = pMidi->MtrInstr();
    m_nOldMtrChannel = pMidi->MtrChannel();
    m_nOldMtrTone1 = pMidi->MtrTone1();
    m_nOldMtrTone2 = pMidi->MtrTone2();

    return true;
}
Example #9
0
//---------------------------------------------------------------------------------------
bool WizardDevicesPage::Create( wxWizard* parent )
{
    // member initialisation
    m_pOutCombo = NULL;
    m_pInCombo = NULL;

    // page creation
    wxBitmap wizardBitmap(GetBitmapResource("wizard.png"));
    wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap );
    CreateControls();
    GetSizer()->Fit(this);

    // populate combo boxes with available Midi devices
    MidiServer* pMidi = m_appScope.get_midi_server();
    //int nInput=0;
    int nItem, nOutput=0;
    int nNumDevices = pMidi->CountDevices();
    int nOutDevId = pMidi->OutDevId();
    int iSelOut = 0;
//    //TODO: Un-comment when ready to use MIDI input
//    int nInDevId = pMidi->InDevId();
//    int iSelIn = 0;
    for (int i = 0; i < nNumDevices; i++)
    {
        wxMidiOutDevice* pMidiDev = LENMUS_NEW wxMidiOutDevice(i);
        if (pMidiDev->IsOutputPort())
        {
            nOutput++;
            nItem = m_pOutCombo->Append( pMidiDev->DeviceName() );
            m_pOutCombo->SetClientData(nItem, reinterpret_cast<void*>(i));
            //wxLogMessage("[WizardDevicesPage::Create] nItem=%d, i=%d", nItem, i);
            if (nOutDevId == i)
                iSelOut = nItem;
        }
		////TODO: Un-comment when ready to use MIDI input
        //if (pMidiDev->IsInputPort()) {
        //    nInput++;
        //    nItem = m_pInCombo->Append( pMidiDev->DeviceName() );
        //    m_pInCombo->SetClientData(nItem, (void *)i);
        //    if (nInDevId == i)
        //        iSelIn = nItem;
        //}
        delete pMidiDev;
    }

    //set current selection
    if (nOutput == 0)
    {
        nItem = m_pOutCombo->Append( _("None") );
        m_pOutCombo->SetClientData(nItem, (void *)(-1));
        iSelOut = 0;
    }
    m_pOutCombo->SetSelection(iSelOut);

	////TODO: Un-comment when ready to use MIDI input
	////set current selection
    //if (nInput == 0) {
    //    nItem = m_pInCombo->Append( _("None") );
    //    m_pInCombo->SetClientData(nItem, (void *)(-1));
    //    iSelIn = 0;
    //}
    //m_pInCombo->SetSelection(iSelIn);

    return true;
}