Ejemplo n.º 1
0
void OutputViewControlBarToggleButton::OnButtonToggled(wxCommandEvent& e)
{
	if ( GetText() == wxT("More") ) {
		DoShowPopupMenu();

	} else {

		wxCommandEvent e(EVENT_BUTTON_PRESSED);
		e.SetEventObject(this);
		GetParent()->GetEventHandler()->AddPendingEvent(e);
	}
}
Ejemplo n.º 2
0
void WorkspaceTab::OnConfigurationManagerChoice(wxCommandEvent& e)
{
    e.Skip();
    wxString selection = m_workspaceConfig->GetStringSelection();
    if(selection == OPEN_CONFIG_MGR_STR) {
        e.Skip(false);
        wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, XRCID("configuration_manager"));
        e.SetEventObject(this);
        ProcessEvent(e);
        return;
    }
    
    CallAfter(&WorkspaceTab::DoConfigChanged);
}
Ejemplo n.º 3
0
void wxTimeSpinCtrl::OnText(wxCommandEvent &ev)
{
	long time = GetTextTime();
	if (time >= 0)
	{
		spinValue = time;
		ev.SetEventObject(this);
		ev.SetId(GetId());
#if wxCHECK_VERSION(2, 9, 0)
		GetParent()->GetEventHandler()->ProcessEvent(ev);
#else
		GetParent()->ProcessEvent(ev);
#endif
	}
}
Ejemplo n.º 4
0
void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
{
    event.SetEventObject((wxControlBase *)this);    // const_cast

    // event.SetId(GetId()); -- this is usuall done in the event ctor

    switch ( m_clientDataType )
    {
        case wxClientData_Void:
            event.SetClientData(GetClientData());
            break;

        case wxClientData_Object:
            event.SetClientObject(GetClientObject());
            break;

        case wxClientData_None:
            // nothing to do
            ;
    }
}
Ejemplo n.º 5
0
void WorkspaceTab::OnConfigurationManagerChoice(wxCommandEvent& e)
{
    wxString selection = m_workspaceConfig->GetStringSelection();
    if(selection == OPEN_CONFIG_MGR_STR) {
        wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, XRCID("configuration_manager"));
        e.SetEventObject(this);
        ProcessEvent(e);
        return;
    }

    BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix();
    matrix->SetSelectedConfigurationName(selection);
    ManagerST::Get()->SetWorkspaceBuildMatrix(matrix);

    // Set the focus to the active editor if any
    LEditor *editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
    if(editor)
        editor->SetActive();

    ManagerST::Get()->UpdateParserPaths(true);
}
Ejemplo n.º 6
0
/*****************************************************
**
**   BasicView   ---   OnMenuCommand
**
******************************************************/
void BasicView::OnMenuCommand( wxCommandEvent &event )
{
	//printf( "BasicView::OnMenuCommand\n" );
	event.SetEventObject( this );
	wxPostEvent( frame->GetParent(), event );
}
Ejemplo n.º 7
0
void wxVListBox::InitEvent(wxCommandEvent& event, int n)
{
    event.SetEventObject(this);
    event.SetInt(n);
}