draw_wtext(text_x, k + text_ascent, wtext_row, len,
0, &positions[wtext_row - wtext]);
}
+ else
+ positions[wtext_row - wtext] = 0;
// Get ibeam location
if(ibeam_letter >= row_begin && ibeam_letter <= row_end) {
//printf("BC_TextBox::draw 3 %d\n", ibeam_y);
if(need_ibeam) {
- if( wtext_len == 0 ) {
- ibeam_x = 0;
- ibeam_y = 0;
- }
- else {
- ibeam_x = -1;
- ibeam_y = -1;
- }
+// ibeam_x = ibeam_y = !wtext_len ? 0 : -1;
+ ibeam_x = 0; ibeam_y = k - text_y;
}
//printf("BC_TextBox::draw 4 %d\n", ibeam_y);
int wlen = -1;
switch( last_keypress ) {
//unicode active acitons
- case ESC: {
- unicode_active = -1;
- result = 1;
- wlen = 0;
- break; }
case RETURN: {
for( int i=highlight_letter1+1; i<highlight_letter2; ++i ) {
int ch = nib(wtext[i]);
if( ch < 0 ) return 1;
wch = (wch<<4) + ch;
}
+ if( wch ) {
+ dispatch_event = 1;
+ unicode_active = -1;
+ result = 1;
+ wlen = 1;
+ break;
+ } } // fall through
+ case ESC: {
unicode_active = -1;
- dispatch_event = 1;
result = 1;
- wlen = 1;
+ wlen = 0;
break; }
case BACKSPACE: {
if(ibeam_letter > 0) {
{
int i, row_begin, row_end;
int wtext_len = wtext_update();
+ x = y = 0;
- y = 0;
- x = 0;
for( i=0; i<wtext_len; ) {
row_begin = i;
for(; i<wtext_len && wtext[i]!='\n'; i++);
parent_window->add_subwindow(yscroll = new BC_ScrollTextBoxYScroll(this));
text->yscroll = yscroll;
yscroll->bound_to = text;
-
+ set_text_row(0);
}
int BC_ScrollTextBox::handle_event()