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 __TEXTITEM_HPP_
|
---|
10 | #define __TEXTITEM_HPP_
|
---|
11 |
|
---|
12 | #include "menu/menu.hh"
|
---|
13 | #include "font/font.hh"
|
---|
14 | #include "window/style.hh"
|
---|
15 |
|
---|
16 | class i4_text_item_class : public i4_menu_item_class
|
---|
17 | {
|
---|
18 | protected :
|
---|
19 |
|
---|
20 | i4_color_hint_class *color;
|
---|
21 | i4_font_class *font;
|
---|
22 |
|
---|
23 | i4_str *text;
|
---|
24 | w16 pad_lr;
|
---|
25 |
|
---|
26 | public :
|
---|
27 | w32 bg_color;
|
---|
28 |
|
---|
29 |
|
---|
30 | i4_text_item_class(
|
---|
31 | const i4_const_str &_text,
|
---|
32 | i4_graphical_style_class *style,
|
---|
33 |
|
---|
34 | i4_color_hint_class *color_hint=0,
|
---|
35 | i4_font_class *font=0,
|
---|
36 |
|
---|
37 |
|
---|
38 | i4_event_reaction_class *press=0,
|
---|
39 | i4_event_reaction_class *depress=0,
|
---|
40 | i4_event_reaction_class *activate=0,
|
---|
41 | i4_event_reaction_class *deactivate=0,
|
---|
42 | w16 pad_left_right=0,
|
---|
43 | w16 pad_up_down=0
|
---|
44 | );
|
---|
45 | ~i4_text_item_class()
|
---|
46 | {
|
---|
47 | delete text;
|
---|
48 | }
|
---|
49 |
|
---|
50 | char *name() { return "text_item"; }
|
---|
51 |
|
---|
52 | virtual void parent_draw(i4_draw_context_class &context);
|
---|
53 | virtual void receive_event(i4_event *ev);
|
---|
54 | void change_text(const i4_const_str &new_st);
|
---|
55 | i4_const_str get_text() { return *text; }
|
---|
56 |
|
---|
57 | virtual i4_menu_item_class *copy();
|
---|
58 | } ;
|
---|
59 |
|
---|
60 | #endif
|
---|