00001 00002 #include <basis/chaos.h> 00003 #include <opsystem/application_shell.h> 00004 #include <loggers/console_logger.h> 00005 #include <data_struct/static_memory_gremlin.h> 00006 #include <wp_active/quit_button.h> 00007 #include <wp_passive/manager.h> 00008 #include <wp_passive/wp_implementation.h> 00009 00010 class test_quit_button : public application_shell 00011 { 00012 public: 00013 test_quit_button() : application_shell(class_name()) {} 00014 IMPLEMENT_CLASS_NAME("test_quit_button"); 00015 int execute(); 00016 }; 00017 00018 int test_quit_button::execute() 00019 { 00020 FUNCDEF("execute"); 00021 manager root("fred"); 00022 color purple(root.lookup("purple")); 00023 root.foreground(purple); 00024 color red(root.lookup("red")); 00025 color green(root.lookup("green")); 00026 quit_button to_die(root, c_point(0, 0), green, red); 00027 to_die.draw(); 00028 root.poll(); 00029 LOG("main program exiting"); 00030 return 0; 00031 } 00032 00033 HOOPLE_MAIN(test_quit_button, ) 00034
1.5.1