Ejemplo n.º 1
0
///////////////////////////////////////////////////////////////////////////////
// Called before the dialog is shown and initializes all the controls.
// 
void ExportOptionsDialog::OnInit( wxInitDialogEvent& event )
{
  wxBoxSizer* topmostSizer = new wxBoxSizer( wxVERTICAL );

  // Message explaining the options
  wxString msg = wxT( "Options" );
  wxStaticBoxSizer* groupBox = new wxStaticBoxSizer( wxHORIZONTAL, this, msg );
  wxBoxSizer* innerGroupBoxSizer = new wxBoxSizer( wxVERTICAL );

  // Checkboxes inside of the group box
  innerGroupBoxSizer->Add( &m_DependencyCheckbox, wxSizerFlags().Border( wxALL, 10 ) );
  innerGroupBoxSizer->Add( &m_HierarchyCheckbox, wxSizerFlags().Border( wxLEFT | wxRIGHT | wxBOTTOM, 10 ) );
  innerGroupBoxSizer->Layout();
  groupBox->Add( innerGroupBoxSizer );
  groupBox->Layout();

  // Ok/Cancel buttons at the bottom
  wxBoxSizer* buttonSizer = new wxBoxSizer( wxHORIZONTAL );
  buttonSizer->Add( CreateButtonSizer( wxOK ) );
  buttonSizer->Add( 40, 1, 0, wxEXPAND );
  buttonSizer->Add( CreateButtonSizer( wxCANCEL ) );
  buttonSizer->Layout();

  // Add all the controls in the proper order
  topmostSizer->Add( groupBox, wxSizerFlags().Border( wxALL, 10 ) );
  topmostSizer->Add( buttonSizer, wxSizerFlags().Border( wxBOTTOM | wxLEFT | wxRIGHT, 10 ).Center() );
  topmostSizer->Layout();
  
  // Assign the topmost sizer to this dialog, otherwise things don't layout correctly
  SetSizer( topmostSizer );
  topmostSizer->SetSizeHints( this );

  // Let the base class do its initialization
  event.Skip();
}
Ejemplo n.º 2
0
void dlgInterfaceSettings::OnInitDialog( wxInitDialogEvent& event )
{
////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_INTERFACE_SETTINGS in DlgInterfaceSettings.
  // Before editing this code, remove the block markers.
  event.Skip();
////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG_INTERFACE_SETTINGS in DlgInterfaceSettings. 
}
Ejemplo n.º 3
0
void TableSettings::OnInit(wxInitDialogEvent& event)
{
    m_textName->SetValue( m_pTable->GetName() );

    // fill database data types
    wxArrayString* pDbTypes = m_pDbAdapter->GetDbTypes();
    if( pDbTypes ) {
        wxArrayString choices;
        for (unsigned int i = 0; i < pDbTypes->GetCount(); ++i) {
            choices.Add( pDbTypes->Item(i) );
        }

        m_dvColumns->DeleteColumn( m_dvColumns->GetColumn(1) );
        m_dvColumns->InsertColumn( 1, new wxDataViewColumn( _("Type"), new wxDataViewChoiceRenderer( choices, wxDATAVIEW_CELL_EDITABLE, wxDVR_DEFAULT_ALIGNMENT), 1, -2, wxALIGN_LEFT));

        pDbTypes->Clear();
        delete pDbTypes;
    }

    // fill referenced tables
    ShapeList tables;
    m_choiceRefTable->Append( wxT("") );
    m_pDiagramManager->GetShapes( CLASSINFO(ErdTable), tables );
    for( ShapeList::iterator it = tables.begin(); it != tables.end(); ++it ) {
        Table *t = (Table*) (*it)->GetUserData();
        if( t && t->GetName() != m_pTable->GetName() ) m_choiceRefTable->Append( t->GetName() );
    }

    UpdateView();

    event.Skip();
}
Ejemplo n.º 4
0
void DlgCANMsg::OnInitDialog( wxInitDialogEvent& event )
{
////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_CAN_MESSAGE in DlgCANMsg.
    // Before editing this code, remove the block markers.
    event.Skip();
////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG_CAN_MESSAGE in DlgCANMsg. 
}
Ejemplo n.º 5
0
void dlgNewCanalSession::OnInitDialog( wxInitDialogEvent& event )
{
////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_NEW_CANAL_SESSION in DlgNewCanalSession.
  // Before editing this code, remove the block markers.
  event.Skip();
////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG_NEW_CANAL_SESSION in DlgNewCanalSession. 
}
Ejemplo n.º 6
0
void dlgNewVSCPSession::OnInitDialog(wxInitDialogEvent& event)
{
    ////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_NEW_VSCP_SESSION in DlgNewVSCPSession.
    // Before editing this code, remove the block markers.
    event.Skip();
    ////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG_NEW_VSCP_SESSION in DlgNewVSCPSession. 

    fillListBox(wxString(_("")));
}
Ejemplo n.º 7
0
void dlgConfiguration::OnInitDialog( wxInitDialogEvent& event )
{
    if ( g_Config.m_bAutoscollRcv ) {
        m_ChkAutoScroll->SetValue( 1 );
    }
    else {
        m_ChkAutoScroll->SetValue( 0 );
    }
    event.Skip();
}
Ejemplo n.º 8
0
// ------------------------------------------------------------
void SpellCheckerSettings::OnInitDialog(wxInitDialogEvent& event)
{
    event.Skip();

    if(m_pHunspell) {
        m_pDirPicker->SetPath(m_dictionaryPath);

        if(!m_dictionaryPath.IsEmpty()) FillLanguageList();
    }
}
Ejemplo n.º 9
0
	void ModuleManagerDialog::OnInit(wxInitDialogEvent& event) {
		
		Common::LoadModules();

		m_loaded_modules_list->Clear();
		for (std::uint32_t i = 0, max_i = System::GetLoadedPunkModulesCount(); i < max_i; ++i) {
			auto module = System::GetLoadedPunkModule(i);
			m_loaded_modules_list->Insert(wxString((const wchar_t*)module->GetName().Data()), 0, (void**)module);
		}
		event.Skip();
	}
Ejemplo n.º 10
0
/*---------------------------------------------------------------------------*/
void wxPrefDlg::OnInitDialog(wxInitDialogEvent& event)
{
   m_OddLineColour->SetColour(m_Val_OddColour);
   m_LineNumberFG->SetColour(m_Val_LineFG);
   m_LineNumberBG->SetColour(m_Val_LineBG);

   m_ItemFG->SetColour(m_Val_ItemFG[0]);
   m_ItemBG->SetColour(m_Val_ItemBG[0]);

   event.Skip();
}
Ejemplo n.º 11
0
/// Set the focus if it is not already set in a derived constructor to a specific control.
void DIALOG_SHIM::onInit( wxInitDialogEvent& aEvent )
{
    wxWindow* focusWnd = wxWindow::FindFocus();

    // If focusWnd is not already this window or a child of it, then SetFocus().
    // Otherwise the derived class's constructor SetFocus() already to a specific
    // child control.

    if( !findWindowRecursively( this, focusWnd ) )
    {
        // Linux wxGTK needs this to allow the ESCAPE key to close a wxDialog window.
        SetFocus();
    }

    aEvent.Skip();     // derived class's handler should be called too
}
Ejemplo n.º 12
0
void MvcController::UponInitDialog(wxInitDialogEvent& event)
{
    event.Skip();

    Initialize();

    ::Connect
        (this
        ,wxEVT_REFOCUS_INVALID_CONTROL
        ,&MvcController::UponRefocusInvalidControl
        );
    ::Connect
        (this
        ,wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING
        ,&MvcController::UponPageChanging
        ,wxXmlResource::GetXRCID(view_.BookControlName())
        );
    ::Connect
        (this
        ,wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED
        ,&MvcController::UponPageChanged
        ,wxXmlResource::GetXRCID(view_.BookControlName())
        );
    ::Connect
        (this
        ,wxEVT_CHILD_FOCUS
        ,&MvcController::UponChildFocus
        );
    ::Connect
        (this
        ,wxEVT_UPDATE_UI
        ,&MvcController::UponUpdateUI
        ,wxXmlResource::GetXRCID(view_.MainDialogName())
        );

    if(contains(global_settings::instance().pyx(), "show_mvc_dims"))
        {
        int width  = 0;
        int height = 0;
        GetSize(&width, &height);
        status() << width << " by " << height << std::flush;
        }
}
Ejemplo n.º 13
0
void dlgNewVSCPSession::OnInitDialog(wxInitDialogEvent& event)
{
    event.Skip();

    fillListBox( wxString(_("") ) );
}
Ejemplo n.º 14
0
void VDialogoCambiarUser::evento_cambiar_user_cargar_dbs( wxInitDialogEvent& event )  {
	sistemas->Obtener_dbs(cambiar_user_dbs);
	event.Skip();
}
Ejemplo n.º 15
0
void serverOperationsForm::onInit(wxInitDialogEvent& event)
{
    wxLogDebug( _T("[serverOpForm] on init fired") );
    runThread();
    event.Skip();
}