void
CFileSystemDialogImp::OnPostLayoutLoad( void )
{GUCE_TRACE;

    GUCEF::GUI::CFileSystemDialog::OnPostLayoutLoad();
    
    // Try and link the icon imageset
    CEGUI::ImagesetManager* imgSetManager = CEGUI::ImagesetManager::getSingletonPtr();
    if ( imgSetManager->isImagesetPresent( "Icons" ) )
    {
        m_iconsImageSet = imgSetManager->getImageset( "Icons" );
    }

    // Hook up the event handlers
    CEGUI::FrameWindow* window = static_cast< CEGUI::FrameWindow* >( GetWindow()->GetImplementationPtr() );
    window->subscribeEvent( CEGUI::FrameWindow::EventCloseClicked                                ,
                            CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnCancelButtonClick , 
                                                      this                                       ) );    

    CEGUI::MultiColumnList* fsViewWidget = static_cast< CEGUI::MultiColumnList* >( GetFileSystemGridView()->GetImplementationPtr() );
    fsViewWidget->subscribeEvent( CEGUI::MultiColumnList::EventSelectionChanged                   ,
                                  CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnItemSelected , 
                                                            this                                  ) );    
    fsViewWidget->subscribeEvent( CEGUI::MultiColumnList::EventMouseDoubleClick                     ,
                                  CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnItemDblClicked , 
                                                            this                                    ) );  
    CEGUI::PushButton* okButton = static_cast< CEGUI::PushButton* >( GetOkButton()->GetImplementationPtr() );
    okButton->subscribeEvent( CEGUI::PushButton::EventClicked                                  ,
                              CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnOkButtonClick , 
                                                        this                                   ) );
    CEGUI::PushButton* cancelButton = static_cast< CEGUI::PushButton* >( GetCancelButton()->GetImplementationPtr() );
    cancelButton->subscribeEvent( CEGUI::PushButton::EventClicked                                      ,
                                  CEGUI::Event::Subscriber( &CFileSystemDialogImp::OnCancelButtonClick , 
                                                            this                                       ) );
}
示例#2
0
void CBOINCBaseWizard::SimulateCancelButton() {
    wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_btnCancel->GetId());
    event.SetEventObject(GetCancelButton());
    AddPendingEvent(event);
}
CEGUI::PushButton*
CFileSystemDialogImp::GetCancelButtonImp( void )
{GUCE_TRACE;

    return static_cast< CEGUI::PushButton* >( GetCancelButton()->GetImplementationPtr() );
}