[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/test factory.cpp,NONE,1.1 Makefile.am,1.7,1.8
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/test factory.cpp,NONE,1.1 Makefile.am,1.7,1.8 paratest.cpp,1.10,1.11 |
Date: |
Wed, 26 Jun 2002 07:22:20 -0400 |
Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv8693/test
Modified Files:
Makefile.am paratest.cpp
Added Files:
factory.cpp
Log Message:
basic factory stuff
--- NEW FILE ---
#include "paragui.h"
#include "pgapplication.h"
#include "pgthemewidget.h"
#include "pgbutton.h"
#include "pgfactory.h"
int main( int argc, char **argv ) {
PG_Application& app = PG_Application::GetInstance();
app.LoadTheme( "default" );
app.InitScreen( 640, 480 );
app.SetEmergencyQuit(true);
PG_Factory::RegisterClass<PG_ThemeWidget>("themewidget");
PG_Factory::RegisterClass<PG_Button>("button");
PG_Widget* w = PG_Factory::CreateObject("themewidget");
w->MoveWidget(PG_Rect(10,10,300,200));
w->Show();
PG_Button* b = static_cast<PG_Button*>(PG_Factory::CreateObject("button"));
b->MoveWidget(PG_Rect(150,150,150,30));
b->SetText("Factory");
b->Show();
app.Run();
return 0;
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/test/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Makefile.am 26 Jun 2002 08:03:53 -0000 1.7
--- Makefile.am 26 Jun 2002 11:22:17 -0000 1.8
***************
*** 1,5 ****
AUTOMAKE_OPTIONS = foreign
! noinst_PROGRAMS = listbox tabbar animation dropdown paratest dblbuffer
navtest layouttest windowresize
listbox_SOURCES = list.cpp
--- 1,8 ----
AUTOMAKE_OPTIONS = foreign
! noinst_PROGRAMS = factory listbox tabbar animation dropdown paratest
dblbuffer navtest layouttest windowresize
!
! factory_SOURCES = factory.cpp
! factory_LDADD = $(PARAGUI_LIBS)
listbox_SOURCES = list.cpp
Index: paratest.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/paratest.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** paratest.cpp 26 Jun 2002 08:03:53 -0000 1.10
--- paratest.cpp 26 Jun 2002 11:22:17 -0000 1.11
***************
*** 72,76 ****
/** a new style callback member */
! bool handle_show_window(PG_Button* button) {
Show(true);
return true;
--- 72,76 ----
/** a new style callback member */
! bool handle_show_window() {
Show(true);
return true;
***************
*** 519,523 ****
int ticks = SDL_GetTicks() - start_ticks;
PG_LogMSG("did %i iterations in %i ms", iter, ticks);
!
return EXIT_SUCCESS;
}
--- 519,524 ----
int ticks = SDL_GetTicks() - start_ticks;
PG_LogMSG("did %i iterations in %i ms", iter, ticks);
! PG_LogMSG("~%2.2fms per iteration", (float)ticks/(float)iter);
!
return EXIT_SUCCESS;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/test factory.cpp,NONE,1.1 Makefile.am,1.7,1.8 paratest.cpp,1.10,1.11,
Alexander Pipelka <address@hidden> <=