2 /****************************************************************************
3 * Copyright (C) 2002 by Leo Khramov
4 * email: leo@xnc.dubna.su
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 ****************************************************************************/
16 // $Id: wellinput.cxx,v 1.2 2003/02/21 11:40:33 leo Exp $
18 #include "wellinput.h"
19 #include "wellengine.h"
21 //////////////////////////////WellInput class///////////////////////////////
23 //===========================================================================
24 /// global WellInput(char*)
25 /// constructor - fill name and get geometry
27 WellInput::WellInput(char* iname
) : WellObject()
29 strncpy(object_name
,iname
,GEO_NAME
);
30 object_name
[GEO_NAME
]=0;
31 geo
=get_geo_by_name(object_name
);
32 fnt
=default_well_engine
->new_well_image_font(imFont1
,FONT2_L
,FONT2_H
,
34 fnt
->set_screen_region(geo
[1].tox
, geo
[1].toy
, geo
[1].l
, geo
[1].h
);
38 //===========================================================================
39 /// global process_event(wEvent)
40 /// stub that process events
42 bool WellInput::process_event(wEvent ev
)
47 dbgprintf(("WellInput - done\n"));
48 object_on_enter
.call(wEvent(aInputDone
,this));
55 //===========================================================================
56 /// global highlight(int mx, int my)
59 void WellInput::set_text(char* txt
)
77 //===========================================================================
78 /// global draw_text()
79 /// draw text on the screen
81 void WellInput::draw_text()
83 fnt
->draw_text(buf
,buflen
,BackColor
);
86 //===========================================================================
90 void WellInput::show()
94 default_well_engine
->add_object(this);
97 //===========================================================================
101 void WellInput::redraw()
105 default_well_engine
->screen_copy(&geo
[0]);
110 //===========================================================================
114 void WellInput::hide()
117 default_well_engine
->screen_clear(&geo
[0]);
118 default_well_engine
->del_object(this);