source: golgotha/src/i4/menu/pull.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.9 KB
Line 
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
9#ifndef I4_PULL_HH
10#define I4_PULL_HH
11
12
13#include "menu/menu.hh"
14#include "window/style.hh"
15
16class i4_pull_menu_class : public i4_menu_class
17
18  win_list sub_menus;
19  i4_parent_window_class *root;
20  i4_menu_item_class *active_top;
21  i4_menu_class *active_sub;
22  i4_graphical_style_class *style;
23
24  i4_bool sub_focused, focused;
25  i4_bool watching_mouse;
26
27  void unwatch();
28  void watch();
29
30public:
31  i4_color_hint_class menu_colors;
32
33  i4_pull_menu_class(i4_graphical_style_class *style,
34                     i4_parent_window_class *root_window);
35
36  ~i4_pull_menu_class();
37
38  virtual void resize(w16 new_width, w16 new_height);
39  virtual void reparent(i4_image_class *draw_area, i4_parent_window_class *parent);
40
41  virtual void note_reaction_sent(i4_menu_item_class *who,       // this is who sent it
42                                  i4_event_reaction_class *ev,   // who it was to
43                                  i4_menu_item_class::reaction_type type);
44
45  virtual void receive_event(i4_event *ev);
46  virtual void parent_draw(i4_draw_context_class &context);
47
48  void add_sub_menu(i4_menu_item_class *name,
49                   i4_menu_class *sub_menu);
50
51  void show_active(i4_menu_item_class *who);
52  void hide_active();
53 
54  virtual void hide();
55
56  void show(i4_parent_window_class *show_on, i4_coord _x, i4_coord _y)
57  {
58    show_on->add_child(_x, _y, this);
59  }
60
61  char *name() { return "pull_menu"; }
62};
63
64
65#endif
Note: See TracBrowser for help on using the repository browser.