[80] | 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 |
|
---|
| 15 | class 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 |
|
---|
| 26 | public:
|
---|
| 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
|
---|