12 bool bright = fg() & 0x8;
13 if (state != F_INPUT_NORMAL)
14 fg((fg() & 0x7) | (bright ? 0 : 0x8));
15 put_string(p, label());
16 if (state != F_INPUT_NORMAL)
17 fg((fg() & 0x7) | (bright ? 0x8 : 0));
18 F_Text_Symbol smb(' ', bg(), fg());
20 for (int xx = 0; xx < w(); xx++) {
22 smb.ch_ = f_text_display->recode((len < text_.size()) ? text_.at(len++) : ' ');
25 damage(F_DAMAGE_FLUSH);
26 if (state == F_INPUT_ON_FOCUS) {
27 coord_t cp = (text_.size() > w()) ? w() : text_.size();
28 f_text_display->cursor(parent()->x() + x() + cp, parent()->y() + y() + 1);
29 f_text_display->cursor(1);
30 f_text_display->mouse_cursor(0);
34 bool F_Input::handle(F_Event_t &ev)
39 state = F_INPUT_ON_FOCUS;
44 f_text_display->cursor(0);
45 f_text_display->mouse_cursor(1);
46 state = F_INPUT_NORMAL;
51 // ÔÉÐÁ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ
66 text_.erase(text_.end() - 1);
69 if (F_Printable(ev.kbd.key))
70 text_ += (unsigned char)ev.kbd.key;
77 debug("iid - %d, evtype - %d", id(), ev.type);