X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbctextbox.h;h=56514cad4e6c6df0d3df9402f86531081f62e33c;hb=c66c09b32c6f46ef67550a6c63ba7f9d1d46628d;hp=0f3f23ed75592c588485e1db03c6abf4f0802ca3;hpb=cdeb29aeaca2be9141f4c1d82f3aa36fcb51ab12;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/bctextbox.h b/cinelerra-5.1/guicast/bctextbox.h index 0f3f23ed..56514cad 100644 --- a/cinelerra-5.1/guicast/bctextbox.h +++ b/cinelerra-5.1/guicast/bctextbox.h @@ -40,6 +40,14 @@ class BC_ScrollTextBoxYScroll; class BC_TextBox : public BC_SubWindow { + static inline int nib(int ch) { + if( ch >= '0' && ch <= '9' ) ch -= '0'; + else if( ch >= 'A' && ch <= 'F' ) ch -= 'A'-10; + else if( ch >= 'a' && ch <= 'f' ) ch -= 'a'-10; + else ch = -1; + return ch; + } + char *text; wchar_t *wtext; public: @@ -125,7 +133,7 @@ public: // Compute suggestions for a path // If entries is null, just search absolute paths - int calculate_suggestions(ArrayList *entries); + int calculate_suggestions(ArrayList *entries=0, const char *filter=0); // User computes suggestions after handle_event. @@ -133,6 +141,7 @@ public: // A highlighted extension is added if 1 suggestion or a popup appears // if multiple suggestions. // column - starting column to replace + void no_suggestions(); void set_suggestions(ArrayList *suggestions, int column); BC_ScrollTextBoxYScroll *yscroll; @@ -169,7 +178,7 @@ private: // Top left of cursor relative to text int ibeam_x, ibeam_y; - int ibeam_letter; + int ibeam_letter, unicode_active; int highlight_letter1, highlight_letter2; int highlight_letter3, highlight_letter4; int text_x1, text_start, text_end; @@ -209,10 +218,8 @@ public: BC_TextBoxSuggestions(BC_TextBox *text_box, int x, int y); virtual ~BC_TextBoxSuggestions(); - int selection_changed(); int handle_event(); - BC_TextBox *text_box; }; @@ -387,7 +394,7 @@ public: int get_y(); int get_w(); int get_h(); - void disable(); + void disable(int hide_text=0); void enable(); int get_enabled(); void reposition_window(int x, int y); @@ -416,19 +423,8 @@ private: class BC_TumbleTextBoxText : public BC_TextBox { public: - BC_TumbleTextBoxText(BC_TumbleTextBox *popup, - int64_t default_value, - int64_t min, - int64_t max, - int x, - int y); - BC_TumbleTextBoxText(BC_TumbleTextBox *popup, - float default_value, - float min, - float max, - int x, - int y); - BC_TumbleTextBoxText(BC_TumbleTextBox *popup, int x, int y); + BC_TumbleTextBoxText(BC_TumbleTextBox *popup, int64_t default_value, int x, int y); + BC_TumbleTextBoxText(BC_TumbleTextBox *popup, float default_value, int x, int y); virtual ~BC_TumbleTextBoxText(); int handle_event(); int button_press_event();