Example #1
0
/** @brief Event - Deletes a line in the playlist GUI.
 *
 * @param event wxCommandEvent&
 * @return void
 *
 */
void FuXFenetre::onDeleteLine(wxCommandEvent& event)
{
    m_playList->GetPlayListTableau()->onDeleteLine(event);
    DeletedLines* deletedLines = static_cast<DeletedLines*>(event.GetClientData());
    delete deletedLines;
    event.SetClientData(NULL);
}
Example #2
0
void ModelListTree::OnItemMenuAddToScene(wxCommandEvent& event)
{
	ModelTreeItemData* itemData = (ModelTreeItemData*)GetItemData(GetSelection());
	Model* model = itemData->GetModel();

	event.SetClientData((void*)model);
	event.Skip();
}
Example #3
0
void
wxControlWithItemsBase::InitCommandEventWithItems(wxCommandEvent& event, int n)
{
    InitCommandEvent(event);

    if ( n != wxNOT_FOUND )
    {
        if ( HasClientObjectData() )
            event.SetClientObject(GetClientObject(n));
        else if ( HasClientUntypedData() )
            event.SetClientData(GetClientData(n));
    }
}
Example #4
0
void FindResultsTab::OnFindInFiles(wxCommandEvent& e)
{
    if(m_searchInProgress) {
        ::wxMessageBox(_("The search thread is currently busy"), _("CodeLite"), wxICON_INFORMATION | wxOK);
        return;
    }

    FindInFilesDialog dlg(EventNotifier::Get()->TopFrame(), "FindInFilesData");
    wxArrayString* paths = (wxArrayString*)e.GetClientData();
    if(paths) {
        dlg.SetSearchPaths(*paths);
        e.SetClientData(NULL);
        wxDELETE(paths);
    }
    dlg.ShowDialog();
}
Example #5
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
            ;
    }
}
void FindResultsTab::OnFindInFiles(wxCommandEvent& e)
{
    if(m_searchInProgress) {
        ::wxMessageBox(_("The search thread is currently busy"), _("CodeLite"), wxICON_INFORMATION | wxOK);
        return;
    }
    
    // Fire the wxEVT_CMD_FIND_IN_FILES_SHOWING showing event
    clCommandEvent fifDlgShowing(wxEVT_CMD_FIND_IN_FILES_SHOWING);
    EventNotifier::Get()->ProcessEvent(fifDlgShowing);
    
    // Display the Find In Files dialog 
    FindInFilesDialog dlg(EventNotifier::Get()->TopFrame(), "FindInFilesData", fifDlgShowing.GetStrings());
    wxArrayString* paths = (wxArrayString*)e.GetClientData();
    if(paths) {
        dlg.SetSearchPaths(*paths);
        e.SetClientData(NULL);
        wxDELETE(paths);
    }
    dlg.ShowDialog();
}