home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek 6
/
Geek-006.iso
/
linux
/
video
/
xmovie-1.5.3.tar.gz
/
xmovie-1.5.3.tar
/
xmovie-1.5.3
/
guicast
/
test.C
< prev
next >
Wrap
C/C++ Source or Header
|
2000-11-29
|
1KB
|
75 lines
#include "guicast.h"
#include "vframe.h"
#include <math.h>
#include <string.h>
#include <unistd.h>
class TestWindow : public BC_Window
{
public:
TestWindow() : BC_Window("Test", 500, 500, 640, 480, 640, 480)
{
};
void create_objects()
{
// set_repeat(get_resources()->blink_rate);
};
// int repeat_event(long duration)
// {
// if(duration == get_resources()->blink_rate)
// {
// set_inverse();
// set_color(WHITE);
// draw_box(50, 50, 50, 50);
// flash();
// flush();
// return 1;
// }
// return 0;
// };
int close_event()
{
set_done(0);
return 1;
};
};
class TestTumbler : public BC_Tumbler
{
public:
TestTumbler(BC_Title *title) : BC_Tumbler(10, 10)
{
this->title = title;
};
int handle_up_event()
{
char string[1024];
sprintf(string, "%d", number);
return 1;
};
int handle_down_event()
{
return 1;
};
int number;
BC_Title *title;
};
int main()
{
TestWindow window;
BC_Title *title;
window.create_objects();
window.add_subwindow(new BC_Title(100, 50, ""));
window.add_subwindow(new TestTumbler(title));
window.run_window();
}