~ubuntu-branches/ubuntu/raring/ginkgocadx/raring-proposed

« back to all changes in this revision

Viewing changes to src/visualizator/visualizator/wxvtk/gvistacompleja.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2011-09-09 08:39:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: package-import@ubuntu.com-20110909083926-iktecd132cnku5cd
Tags: 2.5.4.0~rc-1
New upstream version (patches were applied)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  
3
 
 *  $Id: gvistacompleja.cpp 3893 2011-06-21 13:01:56Z tovar $
 
3
 *  $Id: gvistacompleja.cpp 4124 2011-09-02 12:21:20Z carlos $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
6
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
17
17
#include "imprimevistasimple.h"
18
18
#include "../vistas/vista2d.h"
19
19
#include "../../recursos/aprimresourcemanager.h"
 
20
#include <resources/ginkgoresourcemanager.h>
20
21
 
21
22
#include <wx/msgdlg.h>
22
23
#include <wx/menu.h>
195
196
        m_pSizerIzquierda->Add(m_pBarraIzquierda,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
196
197
 
197
198
        m_pBarraCine = new BarraHerramientasBotones(m_pPanelManipulacion);
198
 
        m_pBarraCine->AddTool(ID_BOTON_PLAY_STOP,_("Play"),APrimResourcesManager::BarraCine::GetIcoPlay(),_("Play"));
 
199
        m_pBarraCine->AddTool(ID_BOTON_PLAY_STOP,_("Play"),GinkgoResourcesManager::BarraCine::GetIcoPlay(),_("Play"));
199
200
        m_pBarraCine->Connect(ID_BOTON_PLAY_STOP,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( GVistaCompleja::OnPlayStopClick),NULL,this);
200
201
        m_pBarraCine->SetToolDropDown(ID_BOTON_PLAY_STOP, true);
201
202
        m_pBarraCine->Connect(ID_BOTON_PLAY_STOP,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler( GVistaCompleja::OnMenuCineClick),NULL,this);
582
583
 
583
584
                wxMenuItem* pItem = new wxMenuItem(&menuVer,wxID_ANY,_("Loop"),_("Repeat on end"),wxITEM_CHECK);
584
585
                #ifdef __WXMSW__
585
 
                pItem->SetBitmaps(APrimResourcesManager::BarraCine::GetIcoBucle(),APrimResourcesManager::BarraCine::GetIcoNoBucle());
 
586
                pItem->SetBitmaps(GinkgoResourcesManager::BarraCine::GetIcoBucle(),GinkgoResourcesManager::BarraCine::GetIcoNoBucle());
586
587
                //#else
587
 
                //pItem->SetBitmap(APrimResourcesManager::BarraCine::GetIcoBucle());
 
588
                //pItem->SetBitmap(GinkgoResourcesManager::BarraCine::GetIcoBucle());
588
589
                #endif
589
590
                //este apend suelta por consola: 'InsertMenuItem()' failed with error 0x00000057, es un buf arreglado pero no afecta negativamente,
590
591
                // es xq solo tiene un bitmap mas info:
597
598
                if(!m_playTimer->IsRunning()){
598
599
                        pItem = new wxMenuItem(&menuVer,wxID_ANY,_("Play"),_("Start playback"));
599
600
                        #ifdef __WXMSW__
600
 
                        pItem->SetBitmaps(APrimResourcesManager::BarraCine::GetIcoPlay());
 
601
                        pItem->SetBitmaps(GinkgoResourcesManager::BarraCine::GetIcoPlay());
601
602
                        #else
602
 
                        pItem->SetBitmap(APrimResourcesManager::BarraCine::GetIcoPlay());
 
603
                        pItem->SetBitmap(GinkgoResourcesManager::BarraCine::GetIcoPlay());
603
604
                        #endif
604
605
                        menuVer.Append(pItem);
605
606
                        menuVer.Connect(pItem->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GVistaCompleja::OnPlayStopClick ),NULL,this);
606
607
                } else {
607
608
                        pItem = new wxMenuItem(&menuVer,wxID_ANY,_("Stop"),_("End playback"));
608
609
                        #ifdef __WXMSW__
609
 
                        pItem->SetBitmaps(APrimResourcesManager::BarraCine::GetIcoPause());
 
610
                        pItem->SetBitmaps(GinkgoResourcesManager::BarraCine::GetIcoPause());
610
611
                        #else
611
 
                        pItem->SetBitmap(APrimResourcesManager::BarraCine::GetIcoPause());
 
612
                        pItem->SetBitmap(GinkgoResourcesManager::BarraCine::GetIcoPause());
612
613
                        #endif
613
614
                        menuVer.Append(pItem);
614
615
                        menuVer.Connect(pItem->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GVistaCompleja::OnPlayStopClick ),NULL,this);
703
704
                m_pSliderSlice->SetRange(minSlider, maxSlider);
704
705
                m_pSliderSlice->Enable(true);
705
706
                if( !m_pBarraCine->IsShown() ) {
706
 
                        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, APrimResourcesManager::BarraCine::GetIcoPlay());
 
707
                        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, GinkgoResourcesManager::BarraCine::GetIcoPlay());
707
708
                        m_pBarraCine->SetToolShortHelp(ID_BOTON_PLAY_STOP, _("Play"));
708
709
                        m_pBarraCine->Enable(true);
709
710
                        m_pBarraCine->Show(true);
778
779
                        }
779
780
                        break;
780
781
                default:
 
782
                        event.ResumePropagation(1);
781
783
                        event.Skip(true);
782
784
        }
783
785
}
824
826
                GoToSlice(0,false);
825
827
        }
826
828
        m_playTimer->Start(m_PeriodoMs);
827
 
        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, APrimResourcesManager::BarraCine::GetIcoStop());
 
829
        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, GinkgoResourcesManager::BarraCine::GetIcoStop());
828
830
        m_pBarraCine->SetToolShortHelp(ID_BOTON_PLAY_STOP, _("Stop"));
829
831
        m_pBarraCine->Refresh();
830
832
 
836
838
{
837
839
        //stop
838
840
        m_playTimer->Stop();
839
 
        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, APrimResourcesManager::BarraCine::GetIcoPlay());
 
841
        m_pBarraCine->SetToolBitmap(ID_BOTON_PLAY_STOP, GinkgoResourcesManager::BarraCine::GetIcoPlay());
840
842
        m_pBarraCine->SetToolShortHelp(ID_BOTON_PLAY_STOP, _("Play"));
841
843
        m_pBarraCine->Refresh();
842
844