X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbctextbox.C;h=e8cb09ced1fc35afb853cea90382e99766229cd8;hp=f1d8f596f486aa590193b034781724ffd76022df;hb=77815ec03df6a03ed75433e8cf8ae1e83fb76d6e;hpb=c66c09b32c6f46ef67550a6c63ba7f9d1d46628d diff --git a/cinelerra-5.1/guicast/bctextbox.C b/cinelerra-5.1/guicast/bctextbox.C index f1d8f596..e8cb09ce 100644 --- a/cinelerra-5.1/guicast/bctextbox.C +++ b/cinelerra-5.1/guicast/bctextbox.C @@ -750,7 +750,8 @@ int BC_TextBox::focus_out_event() int BC_TextBox::cursor_enter_event() { - if(top_level->event_win == win && enabled) + if( top_level->event_win == win && enabled && + !(top_level->get_resources()->textbox_focus_policy & CLICK_ACTIVATE) ) { tooltip_done = 0; if( !active ) { @@ -776,7 +777,8 @@ int BC_TextBox::cursor_leave_event() draw_border(); flash(1); } - if( !suggestions_popup ) + if( !suggestions_popup && + !(top_level->get_resources()->textbox_focus_policy & CLICK_DEACTIVATE) ) deactivate(); return 0; } @@ -895,10 +897,13 @@ int BC_TextBox::button_press_event() return 1; } else - if(active && suggestions_popup && (!yscroll || !yscroll->is_event_win())) - { - if( suggestions_popup->button_press_event() ) - return suggestions_popup->handle_event(); + if( active ) { + if( suggestions_popup && (!yscroll || !yscroll->is_event_win())) { + if( suggestions_popup->button_press_event() ) + return suggestions_popup->handle_event(); + } + else if( (top_level->get_resources()->textbox_focus_policy & CLICK_DEACTIVATE) ) + deactivate(); } return 0; @@ -2161,46 +2166,18 @@ void BC_ScrollTextBox::create_objects() set_text_row(0); } -int BC_ScrollTextBox::handle_event() -{ - return 1; -} - -int BC_ScrollTextBox::get_x() -{ - return x; -} - -int BC_ScrollTextBox::get_y() -{ - return y; -} +int BC_ScrollTextBox::handle_event() { return 1; } +int BC_ScrollTextBox::button_press_event() { return text->BC_TextBox::button_press_event(); } +int BC_ScrollTextBox::button_release_event() { return text->BC_TextBox::button_release_event(); } +int BC_ScrollTextBox::get_buttonpress() { return text->BC_TextBox::get_buttonpress(); }; +int BC_ScrollTextBox::get_x() { return x; } +int BC_ScrollTextBox::get_y() { return y; } +int BC_ScrollTextBox::get_w() { return w; } +int BC_ScrollTextBox::get_h() { return text->get_h(); } +int BC_ScrollTextBox::get_rows() { return rows; } -int BC_ScrollTextBox::get_w() -{ - return w; -} - -int BC_ScrollTextBox::get_h() -{ - return this->text->get_h(); -} - -int BC_ScrollTextBox::get_rows() -{ - return rows; -} - - -const char* BC_ScrollTextBox::get_text() -{ - return text->get_text(); -} - -const wchar_t* BC_ScrollTextBox::get_wtext() -{ - return text->get_wtext(); -} +const char* BC_ScrollTextBox::get_text() { return text->get_text(); } +const wchar_t* BC_ScrollTextBox::get_wtext() { return text->get_wtext(); } void BC_ScrollTextBox::set_text(char *text, int isz) { @@ -2321,7 +2298,6 @@ int BC_ScrollTextBoxText::motion_event() return 1; } - BC_ScrollTextBoxYScroll::BC_ScrollTextBoxYScroll(BC_ScrollTextBox *gui) : BC_ScrollBar(gui->x + gui->w -