pull.hh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #ifndef I4_PULL_HH
  9. #define I4_PULL_HH
  10. #include "menu/menu.hh"
  11. #include "window/style.hh"
  12. class i4_pull_menu_class : public i4_menu_class
  13. {
  14. win_list sub_menus;
  15. i4_parent_window_class *root;
  16. i4_menu_item_class *active_top;
  17. i4_menu_class *active_sub;
  18. i4_graphical_style_class *style;
  19. i4_bool sub_focused, focused;
  20. i4_bool watching_mouse;
  21. void unwatch();
  22. void watch();
  23. public:
  24. i4_color_hint_class menu_colors;
  25. i4_pull_menu_class(i4_graphical_style_class *style,
  26. i4_parent_window_class *root_window);
  27. ~i4_pull_menu_class();
  28. virtual void resize(w16 new_width, w16 new_height);
  29. virtual void reparent(i4_image_class *draw_area, i4_parent_window_class *parent);
  30. virtual void note_reaction_sent(i4_menu_item_class *who, // this is who sent it
  31. i4_event_reaction_class *ev, // who it was to
  32. i4_menu_item_class::reaction_type type);
  33. virtual void receive_event(i4_event *ev);
  34. virtual void parent_draw(i4_draw_context_class &context);
  35. void add_sub_menu(i4_menu_item_class *name,
  36. i4_menu_class *sub_menu);
  37. void show_active(i4_menu_item_class *who);
  38. void hide_active();
  39. virtual void hide();
  40. void show(i4_parent_window_class *show_on, i4_coord _x, i4_coord _y)
  41. {
  42. show_on->add_child(_x, _y, this);
  43. }
  44. char *name() { return "pull_menu"; }
  45. };
  46. #endif