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:
// Compute suggestions for a path
// If entries is null, just search absolute paths
- int calculate_suggestions(ArrayList<BC_ListBoxItem*> *entries);
+ int calculate_suggestions(ArrayList<BC_ListBoxItem*> *entries=0, const char *filter=0);
// User computes suggestions after handle_event.
// 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<char*> *suggestions, int column);
BC_ScrollTextBoxYScroll *yscroll;
// 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;
BC_TextBoxSuggestions(BC_TextBox *text_box, int x, int y);
virtual ~BC_TextBoxSuggestions();
- int selection_changed();
int handle_event();
-
BC_TextBox *text_box;
};
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);