paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test animation.cpp,1.2,1.3 dblbuffer.cpp,1.4,


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test animation.cpp,1.2,1.3 dblbuffer.cpp,1.4,1.5 list.cpp,1.1,1.2
Date: Tue, 25 Jun 2002 16:38:44 -0400

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv7373/test

Modified Files:
        animation.cpp dblbuffer.cpp list.cpp 
Log Message:
fixed GCC 3.1 compiling
added PG_Singleton



Index: animation.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/animation.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** animation.cpp       27 Apr 2002 11:57:23 -0000      1.2
--- animation.cpp       25 Jun 2002 20:38:42 -0000      1.3
***************
*** 19,30 ****
  #define ID_APP_EXIT           1
  
! bool exit_handler(PG_Button* button, PG_Pointer* data) {
! 
!       // we can pass in some pointer to data
!       // (in this case we get a pointer to the application object)
!       PG_Application* app = static_cast<PG_Application*>(data);
  
        // exit the application eventloop
!       app->Quit();
  
        // return true to signal that we have processed this message
--- 19,26 ----
  #define ID_APP_EXIT           1
  
! bool exit_handler(PG_Button* button) {
  
        // exit the application eventloop
!       PG_Application::GetInstance().Quit();
  
        // return true to signal that we have processed this message
***************
*** 32,41 ****
  }
  
! bool handle_menu_click(PG_MenuItem* item, PG_Pointer* data) {
!       PG_Application* app = static_cast<PG_Application*>(data);
        
        switch (item->getId()) {
          case ID_APP_EXIT:
!               app->Quit();
                break;
        }
--- 28,37 ----
  }
  
! bool handle_menu_click(PG_MenuItem* item) {
!       PG_Application& app = PG_Application::GetInstance();
        
        switch (item->getId()) {
          case ID_APP_EXIT:
!               app.Quit();
                break;
        }
***************
*** 239,243 ****
  
        // every ParaGUI application need an application-object
!       PG_Application app;
  
        // let us escape with "ESC"
--- 235,239 ----
  
        // every ParaGUI application need an application-object
!       PG_Application& app = PG_Application::GetInstance();
  
        // let us escape with "ESC"
***************
*** 275,279 ****
  
        popmenu.addMenuItem("Nail", 99, slot(handle_menu_click)).
!         addMenuItem("Quit", ID_APP_EXIT, slot(handle_menu_click), &app);
   
        menubar.Add("File", &popmenu);
--- 271,275 ----
  
        popmenu.addMenuItem("Nail", 99, slot(handle_menu_click)).
!         addMenuItem("Quit", ID_APP_EXIT, slot(handle_menu_click));
   
        menubar.Add("File", &popmenu);
***************
*** 281,285 ****
        menubar.Show();
  
!       myButton.sigButtonClick.connect(slot(exit_handler), &app);
  
        // now we have to make the button visible
--- 277,281 ----
        menubar.Show();
  
!       myButton.sigButtonClick.connect(slot(exit_handler));
  
        // now we have to make the button visible

Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dblbuffer.cpp       2 May 2002 09:50:40 -0000       1.4
--- dblbuffer.cpp       25 Jun 2002 20:38:42 -0000      1.5
***************
*** 140,144 ****
        Uint32 then, now, frames;
  
!       PG_Application app;
  
        numsprites = NUM_SPRITES;
--- 140,144 ----
        Uint32 then, now, frames;
  
!       PG_Application& app = PG_Application::GetInstance();
  
        numsprites = NUM_SPRITES;

Index: list.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/list.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** list.cpp    30 Apr 2002 08:46:13 -0000      1.1
--- list.cpp    25 Jun 2002 20:38:42 -0000      1.2
***************
*** 17,21 ****
  int main( int argc, char **argv )
  {
!       PG_Application app;
        
        app.LoadTheme( "default" );
--- 17,21 ----
  int main( int argc, char **argv )
  {
!       PG_Application& app = PG_Application::GetInstance();
        
        app.LoadTheme( "default" );




reply via email to

[Prev in Thread] Current Thread [Next in Thread]