[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] Bug in WidgetList
From: |
Alexander Opitz |
Subject: |
Re: [paragui-users] Bug in WidgetList |
Date: |
Wed, 7 May 2003 12:16:06 +0200 |
User-agent: |
KMail/1.5.1 |
Hi Alex,
> Can you provide a patch ?
> I don't know exactly what you mean.
I can only provide a demonstration at the moment. I've try it with 1.0.3 and
1.0.4beta. I hope it helps to understand the problem.
(Cause of the missing update of PG_Application the hide of the WidgetList is
not to seen on the screen. But there is a Debug Message).
Source:
#include <pgapplication.h>
#include <pgbutton.h>
#include <pgwidgetlist.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();
std::cerr << "Hide" << std::endl;
return true;
}
PARAGUI_CALLBACK(hide_handler) {
PG_WidgetList* list = (PG_WidgetList*) clientdata;
list->SetVisible(false);
list->Update();
std::cerr << "Hide" << 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();
app.Run();
return 0;
}
Compile Option:
g++ -I/usr/include/paragui -I/usr/include/SDL -I/usr/include/freetype2
-L/usr/lib -lparagui -lSDL -lfreetype WidgetListBug.cpp
Greetings Alexander Opitz
--
FunComeunity.de -- Dein neues Zuhause.