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 >
C/C++ Source or Header  |  2000-11-29  |  1KB  |  75 lines

  1. #include "guicast.h"
  2. #include "vframe.h"
  3. #include <math.h>
  4. #include <string.h>
  5. #include <unistd.h>
  6.  
  7. class TestWindow : public BC_Window
  8. {
  9. public:
  10.     TestWindow() : BC_Window("Test", 500, 500, 640, 480, 640, 480)
  11.     {
  12.     };
  13.     
  14.     void create_objects()
  15.     {
  16. //        set_repeat(get_resources()->blink_rate);
  17.     };
  18.  
  19. //     int repeat_event(long duration)
  20. //     {
  21. //         if(duration == get_resources()->blink_rate)
  22. //         {
  23. //             set_inverse();
  24. //             set_color(WHITE);
  25. //             draw_box(50, 50, 50, 50);
  26. //             flash();
  27. //             flush();
  28. //             return 1;
  29. //         }
  30. //         return 0;
  31. //     };
  32.     
  33.     int close_event()
  34.     {
  35.         set_done(0);
  36.         return 1;
  37.     };
  38. };
  39.  
  40. class TestTumbler : public BC_Tumbler
  41. {
  42. public:
  43.     TestTumbler(BC_Title *title) : BC_Tumbler(10, 10)
  44.     {
  45.         this->title = title;
  46.     };
  47.  
  48.     int handle_up_event()
  49.     {
  50.         char string[1024];
  51.         sprintf(string, "%d", number);
  52.         
  53.         return 1;
  54.     };
  55.  
  56.     int handle_down_event()
  57.     {
  58.         return 1;
  59.     };
  60.     
  61.     int number;
  62.     BC_Title *title;
  63. };
  64.  
  65. int main()
  66. {
  67.     TestWindow window;
  68.     BC_Title *title;
  69.  
  70.     window.create_objects();
  71.     window.add_subwindow(new BC_Title(100, 50, ""));
  72.     window.add_subwindow(new TestTumbler(title));
  73.     window.run_window();
  74. }
  75.