[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 __DIVIDER_HH
|
---|
| 10 | #define __DIVIDER_HH
|
---|
| 11 |
|
---|
| 12 | #include "window/window.hh"
|
---|
| 13 | #include "device/device.hh"
|
---|
| 14 |
|
---|
| 15 | class i4_graphical_style_class;
|
---|
| 16 |
|
---|
| 17 | class i4_divider_class : public i4_parent_window_class
|
---|
| 18 | {
|
---|
| 19 | i4_event_handler_reference_class<i4_window_class> w1,w2;
|
---|
| 20 | i4_bool split_up_down;
|
---|
| 21 | i4_graphical_style_class *style;
|
---|
| 22 | int split_value, min1, min2;
|
---|
| 23 |
|
---|
| 24 | i4_bool dragging, w_attached, h_attached;
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | void get_drag_area(int &x1, int &y1, int &x2, int &y2);
|
---|
| 28 | virtual void reparent(i4_image_class *draw_area, i4_parent_window_class *parent);
|
---|
| 29 | public:
|
---|
| 30 | void resize(w16 new_width, w16 new_height);
|
---|
| 31 |
|
---|
| 32 | i4_divider_class(int w, int h, // -1 uses parent w or height
|
---|
| 33 | i4_bool split_up_down,
|
---|
| 34 | int split_x_or_y, // -1 splits the middle
|
---|
| 35 | i4_window_class *window1,
|
---|
| 36 | i4_window_class *window2,
|
---|
| 37 | i4_graphical_style_class *style,
|
---|
| 38 | int window1_min_size=1,
|
---|
| 39 | int window2_min_size=1);
|
---|
| 40 |
|
---|
| 41 | void parent_draw(i4_draw_context_class &context);
|
---|
| 42 | void receive_event(i4_event *ev);
|
---|
| 43 | char *name() { return "divider"; }
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | #endif
|
---|