[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/test widgetlistbug.cpp,NONE,1.1.2.1 Makefile.
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/test widgetlistbug.cpp,NONE,1.1.2.1 Makefile.am,1.2.6.15,1.2.6.16 |
Date: |
Fri, 23 May 2003 04:17:54 -0400 |
Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv9829/test
Modified Files:
Tag: devel-1-0
Makefile.am
Added Files:
Tag: devel-1-0
widgetlistbug.cpp
Log Message:
- fixed PG_WidgetList bug
- added sample app that triggered the bug (Thanks Alexander Opitz
<address@hidden>)
--- NEW FILE ---
#include <pgapplication.h>
#include <pgbutton.h>
#include <pgwidgetlist.h>
#include <pglabel.h>
PARAGUI_CALLBACK(exit_handler) {
PG_Application* app = (PG_Application*) clientdata;
app->Quit();
return true;
}
PARAGUI_CALLBACK(show_handler) {
PG_WidgetList* list = (PG_WidgetList*) clientdata;
//list->SetVisible(true);
//list->Update();
list->Show();
std::cerr << "Show" << std::endl;
return true;
}
PARAGUI_CALLBACK(hide_handler) {
PG_WidgetList* list = (PG_WidgetList*) clientdata;
//list->SetVisible(false);
//list->Update();
list->Hide();
std::cerr << "Hide" << std::endl;
return true;
}
PARAGUI_CALLBACK(add_handler) {
PG_WidgetList* list = (PG_WidgetList*) clientdata;
PG_Label* label=new PG_Label(NULL, PG_Rect(0,0,200,100), "Blubber Bla Bla");
label->Show();
list->AddWidget(label);
std::cerr << "Add" << std::endl;
return true;
}
int main(int argc, char* argv[]) {
PG_Application app;
app.LoadTheme("default");
app.InitScreen(640, 480, 16, SDL_SWSURFACE);
PG_Button myButton(NULL,1,PG_Rect(260, 100, 120, 50),"Exit!");
myButton.SetEventCallback(MSG_BUTTONCLICK, exit_handler, &app);
myButton.Show();
PG_WidgetList list(NULL,PG_Rect(10,10,150,150));
list.EnableScrollBar(true, PG_SB_VERTICAL);
list.SetTransparency(0);
list.Show();
PG_Button myButtonHide(NULL,1,PG_Rect(260, 0, 120, 50),"Hide!");
myButtonHide.SetEventCallback(MSG_BUTTONCLICK, hide_handler, &list);
myButtonHide.Show();
PG_Button myButtonShow(NULL,1,PG_Rect(260, 50, 120, 50),"Show!");
myButtonShow.SetEventCallback(MSG_BUTTONCLICK, show_handler, &list);
myButtonShow.Show();
PG_Button myButtonAdd(NULL,1,PG_Rect(260, 150, 120, 50),"Add!");
myButtonAdd.SetEventCallback(MSG_BUTTONCLICK, add_handler, &list);
myButtonAdd.Show();
app.Run();
return 0;
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/test/Makefile.am,v
retrieving revision 1.2.6.15
retrieving revision 1.2.6.16
diff -C2 -r1.2.6.15 -r1.2.6.16
*** Makefile.am 16 Apr 2003 15:32:50 -0000 1.2.6.15
--- Makefile.am 23 May 2003 08:17:52 -0000 1.2.6.16
***************
*** 3,7 ****
AUTOMAKE_OPTIONS = foreign
! noinst_PROGRAMS = eventbug array writefile stress1 stress2 listbox animation
dropdown paratest dblbuffer navtest windowtest layouttest windowresize
eventbug_SOURCES = event_bug.cpp
--- 3,25 ----
AUTOMAKE_OPTIONS = foreign
! noinst_PROGRAMS = \
! widgetlistbug \
! eventbug \
! array \
! writefile \
! stress1 \
! stress2 \
! listbox \
! animation \
! dropdown \
! paratest \
! dblbuffer \
! navtest \
! windowtest \
! layouttest \
! windowresize
!
! widgetlistbug_SOURCES = widgetlistbug.cpp
! widgetlistbug_LDADD = -L../src $(PARAGUI_LIBS)
eventbug_SOURCES = event_bug.cpp
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/test widgetlistbug.cpp,NONE,1.1.2.1 Makefile.am,1.2.6.15,1.2.6.16,
Alexander Pipelka <address@hidden> <=