source: golgotha/src/i4/gui/butbox.hh

Last change on this file was 80, checked in by Sam Hocevar, 12 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.8 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 __BUTBOX_HPP_
10#define __BUTBOX_HPP_
11
12#include "window/window.hh"
13#include "gui/button.hh"
14
15class i4_button_box_class : public i4_menu_item_parent_class
16{
17  i4_event_handler_class *receiver;
18  i4_button_class *current_down;
19  i4_bool require_one_down;
20
21  void expand_if_needed();
22
23  // I made this private so you have to call add_button
24  virtual void add_child(i4_coord x, i4_coord y, i4_window_class *child);
25
26public:
27  char *name() { return "button_box"; }
28
29  i4_button_box_class(i4_event_handler_class *receiver,
30                      i4_bool require_one_down=i4_T);
31
32  void parent_draw(i4_draw_context_class &context);
33
34  virtual void add_button(i4_coord x, i4_coord y, i4_button_class *child);
35
36  virtual void note_reaction_sent(i4_menu_item_class *who,       // this is who sent it
37                                  i4_event_reaction_class *ev,   // who it was to
38                                  i4_menu_item_class::reaction_type type);
39
40 
41  void push_button(i4_button_class *which, i4_bool send_event);
42
43  // arranges child windows from left to right then down, also enlarges self to
44  // fit this arrangement order
45  virtual void arrange_right_down();
46
47  // arranges child windows from top to bottom then right, also enlarges self to
48  // fit this arrangement order
49  virtual void arrange_down_right();
50} ;
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.