listbox->update(data, 0, 0, 1);
}
-
-const char* BC_PopupTextBox::get_text()
-{
- return textbox->get_text();
-}
-
-const wchar_t* BC_PopupTextBox::get_wtext()
-{
- return textbox->get_wtext();
-}
-
-int BC_PopupTextBox::get_number()
-{
- return listbox->get_selection_number(0, 0);
-}
-
-int BC_PopupTextBox::get_x()
-{
- return x;
-}
-
-int BC_PopupTextBox::get_y()
-{
- return y;
-}
-
-int BC_PopupTextBox::get_w()
-{
- return textbox->get_w() + listbox->get_w();
-}
-
-int BC_PopupTextBox::get_h()
-{
- return textbox->get_h();
-}
-
-int BC_PopupTextBox::get_show_query()
+int BC_PopupTextBox::handle_event()
{
- return listbox->get_show_query();
+ return 1;
}
-void BC_PopupTextBox::set_show_query(int v)
-{
- listbox->set_show_query(v);
-}
+const char *BC_PopupTextBox::get_text() { return textbox->get_text(); }
+const wchar_t *BC_PopupTextBox::get_wtext() { return textbox->get_wtext(); }
+int BC_PopupTextBox::get_number() { return listbox->get_selection_number(0, 0); }
+int BC_PopupTextBox::get_x() { return x; }
+int BC_PopupTextBox::get_y() { return y; }
+int BC_PopupTextBox::get_w() { return textbox->get_w() + listbox->get_w(); }
+int BC_PopupTextBox::get_h() { return textbox->get_h(); }
+int BC_PopupTextBox::get_show_query() { return listbox->get_show_query(); }
+void BC_PopupTextBox::set_show_query(int v) { listbox->set_show_query(v); }
+int BC_PopupTextBox::get_back_color() { return textbox->get_back_color(); }
+void BC_PopupTextBox::set_back_color(int v) { textbox->set_back_color(v); }
-int BC_PopupTextBox::handle_event()
+void BC_PopupTextBox::set_tooltip(const char *text)
{
- return 1;
+ listbox->set_tooltip(text);
}
void BC_PopupTextBox::reposition_window(int x, int y)
}
-
-
-
-
-
-
-
-
-
-
-
-
BC_TumbleTextBoxText::BC_TumbleTextBoxText(BC_TumbleTextBox *popup,
int64_t default_value, int x, int y)
: BC_TextBox(x, y, popup->text_w, 1, default_value)
-
BC_TumbleTextBox::BC_TumbleTextBox(BC_WindowBase *parent_window,
- int64_t default_value,
- int64_t min,
- int64_t max,
- int x,
- int y,
- int text_w)
+ int64_t default_value, int64_t min, int64_t max,
+ int x, int y, int text_w)
{
reset();
this->x = x;
}
BC_TumbleTextBox::BC_TumbleTextBox(BC_WindowBase *parent_window,
- int default_value,
- int min,
- int max,
- int x,
- int y,
- int text_w)
+ int default_value, int min, int max,
+ int x, int y, int text_w)
{
reset();
this->x = x;
}
BC_TumbleTextBox::BC_TumbleTextBox(BC_WindowBase *parent_window,
- float default_value_f,
- float min_f,
- float max_f,
- int x,
- int y,
- int text_w)
+ float default_value_f, float min_f, float max_f,
+ int x, int y, int text_w, int precision)
{
reset();
this->x = x;
this->max_f = max_f;
this->default_value_f = default_value_f;
this->text_w = text_w;
+ this->precision = precision;
this->parent_window = parent_window;
use_float = 1;
- precision = 4;
increment = 1;
}
x += textbox->get_w();
tumbler = use_float ?
- (BC_Tumbler *)new BC_FTumbler(textbox, min_f, max_f, x, y) :
- (BC_Tumbler *)new BC_ITumbler(textbox, min, max, x, y);
+ (BC_Tumbler *)new BC_FTextTumbler(this, min_f, max_f, x, y) :
+ (BC_Tumbler *)new BC_ITextTumbler(this, min, max, x, y);
parent_window->add_subwindow(tumbler);
tumbler->set_increment(increment);
return 0;
}
+int BC_TumbleTextBox::handle_up_event()
+{
+ return use_float ?
+ ((BC_FTumbler *)tumbler)->BC_FTumbler::handle_up_event() :
+ ((BC_ITumbler *)tumbler)->BC_ITumbler::handle_up_event() ;
+}
+
+int BC_TumbleTextBox::handle_down_event()
+{
+ return use_float ?
+ ((BC_FTumbler *)tumbler)->BC_FTumbler::handle_down_event() :
+ ((BC_ITumbler *)tumbler)->BC_ITumbler::handle_down_event() ;
+}
+
const char* BC_TumbleTextBox::get_text()
{
return textbox->get_text();