[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.9,1.4.2.10 factory.c
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.9,1.4.2.10 factory.cpp,1.5.2.1,1.5.2.2 list.cpp,1.1.2.3,1.1.2.4 paratest.cpp,1.9.2.7,1.9.2.8 pokus.xml,1.1.1.1.2.1,1.1.1.1.2.2 |
Date: |
Mon, 04 Nov 2002 18:04:38 -0500 |
Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv9570/test
Modified Files:
Tag: devel-opengl
dblbuffer.cpp factory.cpp list.cpp paratest.cpp pokus.xml
Log Message:
- some PG_ListBox fixes
Index: dblbuffer.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/dblbuffer.cpp,v
retrieving revision 1.4.2.9
retrieving revision 1.4.2.10
diff -C2 -r1.4.2.9 -r1.4.2.10
*** dblbuffer.cpp 1 Nov 2002 03:43:37 -0000 1.4.2.9
--- dblbuffer.cpp 4 Nov 2002 23:04:35 -0000 1.4.2.10
***************
*** 242,254 ****
app.ShowCursor(PG_CURSOR_SOFTWARE);
// get a pointer to the "quit" button
! PG_Button* btn = static_cast<PG_Button*>(app.GetWidgetByName("quit"));
btn->sigButtonClick.connect(slot(handle_quit));
// get the checkbutton
! PG_CheckButton* toggle =
static_cast<PG_CheckButton*>(app.GetWidgetByName("toggle"));
toggle->sigButtonClick.connect(slot(handle_toggle));
// get the label
! PG_Label* fps = static_cast<PG_Label*>(app.GetWidgetByName("fps"));
/*
if ( ! screen ) {
--- 242,254 ----
app.ShowCursor(PG_CURSOR_SOFTWARE);
// get a pointer to the "quit" button
! PG_Button* btn = app.GetWidget<PG_Button>("quit");
btn->sigButtonClick.connect(slot(handle_quit));
// get the checkbutton
! PG_CheckButton* toggle = app.GetWidget<PG_CheckButton>("toggle");
toggle->sigButtonClick.connect(slot(handle_toggle));
// get the label
! PG_Label* fps = app.GetWidget<PG_Label>("fps");
/*
if ( ! screen ) {
Index: factory.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/factory.cpp,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -r1.5.2.1 -r1.5.2.2
*** factory.cpp 31 Aug 2002 04:01:25 -0000 1.5.2.1
--- factory.cpp 4 Nov 2002 23:04:35 -0000 1.5.2.2
***************
*** 11,51 ****
typedef PG_FactoryHolder<unsigned long> MyFactory;
! PG_Application& app = PG_Application::GetInstance();
! app.LoadTheme( "default" );
! app.InitScreen( 640, 480, 0 );
! app.SetEmergencyQuit(true);
!
! PG_Factory::RegisterClass<PG_ThemeWidget, PG_Widget>("themewidget");
! PG_Factory::RegisterClass<PG_Button, PG_Widget>("button");
! PG_Factory::RegisterClass<PG_Window, PG_Widget>("window");
! PG_Factory::RegisterClass<PG_Label, PG_Widget>("label");
!
! MyFactory::RegisterClass<PG_Label, PG_Widget>(1);
!
! 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();
! PG_Window* wnd =
static_cast<PG_Window*>(PG_Factory::CreateObject("window"));
wnd->MoveWidget(PG_Rect(100,100,200,300));
wnd->SetTitle("Window");
!
! PG_Label* l = static_cast<PG_Label*>(MyFactory::CreateObject(1, wnd));
l->MoveWidget(PG_Rect(50,50,100,20));
l->SetText("Label");
!
wnd->Show();
-
- app.Run();
! return 0;
}
--- 11,51 ----
typedef PG_FactoryHolder<unsigned long> MyFactory;
! PG_Application& app = PG_Application::GetInstance();
! app.LoadTheme( "default" );
! app.InitScreen( 640, 480, 0 );
! app.SetEmergencyQuit(true);
! PG_Factory::RegisterClass<PG_ThemeWidget, PG_Widget>("themewidget");
! PG_Factory::RegisterClass<PG_Button, PG_Widget>("button");
! PG_Factory::RegisterClass<PG_Window, PG_Widget>("window");
! PG_Factory::RegisterClass<PG_Label, PG_Widget>("label");
!
! MyFactory::RegisterClass<PG_Label, PG_Widget>(1);
!
! PG_Widget* w = PG_Factory::CreateObject("themewidget");
!
! w->MoveWidget(PG_Rect(10,10,300,200));
! w->Show();
!
! PG_Widget* b = PG_Factory::CreateObject("button");
!
! b->MoveWidget(PG_Rect(150,150,150,30));
! b->SetText("Factory");
! b->Show();
!
! PG_Window* wnd = PG_Factory::CreateObject<PG_Window>("window");
wnd->MoveWidget(PG_Rect(100,100,200,300));
wnd->SetTitle("Window");
!
! PG_Label* l = MyFactory::CreateObject<PG_Label>(1, wnd);
l->MoveWidget(PG_Rect(50,50,100,20));
l->SetText("Label");
!
wnd->Show();
! app.Run();
!
! return 0;
}
Index: list.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/list.cpp,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -r1.1.2.3 -r1.1.2.4
*** list.cpp 12 Sep 2002 06:38:50 -0000 1.1.2.3
--- list.cpp 4 Nov 2002 23:04:35 -0000 1.1.2.4
***************
*** 12,16 ****
bool handleListBoxItem(PG_ListBoxItem* item) {
delete item;
! return true;
}
--- 12,16 ----
bool handleListBoxItem(PG_ListBoxItem* item) {
delete item;
! return true;
}
***************
*** 26,31 ****
PG_ListBox listbox(NULL, PG_Rect(10,10,300,100));
listbox.sigSelectItem.connect(slot(handleListBoxItem));
-
- listbox.Show();
new PG_ListBoxItem(&listbox, 25, "Item1");
--- 26,29 ----
***************
*** 39,42 ****
--- 37,42 ----
new PG_ListBoxItem(&listbox, 25, "Item9");
new PG_ListBoxItem(&listbox, 25, "Item10");
+
+ listbox.Show();
app.Run();
Index: paratest.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/paratest.cpp,v
retrieving revision 1.9.2.7
retrieving revision 1.9.2.8
diff -C2 -r1.9.2.7 -r1.9.2.8
*** paratest.cpp 31 Oct 2002 10:38:04 -0000 1.9.2.7
--- paratest.cpp 4 Nov 2002 23:04:35 -0000 1.9.2.8
***************
*** 529,545 ****
PG_Widget *tmp;
! tmp = PG_Application::GetWidgetByName("WindowOne");
if (tmp)
PG_LogMSG("'WindowOne' found by name (id %d)", tmp->GetID());
! tmp = PG_Application::GetWidgetById(100);
if (tmp)
PG_LogMSG("'100' found by ID (name '%s')", tmp->GetName());
! PG_Window* tempw =
PG_Application::GetWidgetByName<PG_Window>("WindowTwo");
if (tempw)
PG_LogMSG("'WindowTwo' found by name (id %d)", tempw->GetID());
! tmp = PG_Application::GetWidgetById(101);
if (tmp)
PG_LogMSG("'101' found by ID (name '%s')", tmp->GetName());
--- 529,545 ----
PG_Widget *tmp;
! tmp = PG_Application::GetWidget("WindowOne");
if (tmp)
PG_LogMSG("'WindowOne' found by name (id %d)", tmp->GetID());
! tmp = PG_Application::GetWidget(100);
if (tmp)
PG_LogMSG("'100' found by ID (name '%s')", tmp->GetName());
! PG_Window* tempw = PG_Application::GetWidget<PG_Window>("WindowTwo");
if (tempw)
PG_LogMSG("'WindowTwo' found by name (id %d)", tempw->GetID());
! tmp = PG_Application::GetWidget(101);
if (tmp)
PG_LogMSG("'101' found by ID (name '%s')", tmp->GetName());
Index: pokus.xml
===================================================================
RCS file: /cvsroot/paragui/paragui/test/pokus.xml,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -C2 -r1.1.1.1.2.1 -r1.1.1.1.2.2
*** pokus.xml 31 Aug 2002 04:01:25 -0000 1.1.1.1.2.1
--- pokus.xml 4 Nov 2002 23:04:35 -0000 1.1.1.1.2.2
***************
*** 65,75 ****
<listbox pos="360,500,100,90" multisel="0">
! <listboxitem height="15" text="First" select="1"/>
! <listboxitem height="15" text="Second"/>
! <listboxitem height="15" text="Third" select="1"/>
! <listboxitem height="15" text="Fouth" select="1"/>
! <listboxitem height="15" text="Fifth"/>
! <listboxitem height="15" text="Sixth"/>
! <listboxitem height="15" text="Seventh"/>
</listbox>
--- 65,75 ----
<listbox pos="360,500,100,90" multisel="0">
! <listboxitem height="20" text="First" select="1"/>
! <listboxitem height="20" text="Second"/>
! <listboxitem height="20" text="Third" select="1"/>
! <listboxitem height="20" text="Fouth" select="1"/>
! <listboxitem height="20" text="Fifth"/>
! <listboxitem height="20" text="Sixth"/>
! <listboxitem height="20" text="Seventh"/>
</listbox>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/test dblbuffer.cpp,1.4.2.9,1.4.2.10 factory.cpp,1.5.2.1,1.5.2.2 list.cpp,1.1.2.3,1.1.2.4 paratest.cpp,1.9.2.7,1.9.2.8 pokus.xml,1.1.1.1.2.1,1.1.1.1.2.2,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/widgets pgdropdown.cpp,1.8.2.1,1.8.2.2 pglayout.cpp,1.2.2.5,1.2.2.6 pglistbox.cpp,1.7.2.1,1.7.2.2
- Next by Date:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.13,1.10.2.14
- Previous by thread:
[paragui-cvs] CVS: paragui/src/widgets pgdropdown.cpp,1.8.2.1,1.8.2.2 pglayout.cpp,1.2.2.5,1.2.2.6 pglistbox.cpp,1.7.2.1,1.7.2.2
- Next by thread:
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.13,1.10.2.14
- Index(es):