- if( (wlen+=ilen) > wsize ) wlen = wsize;
- wtext[wlen] = 0;
- window->text->update(wtext);
- client->config.wlen = wlen;
- client->send_configure_change();
+TitleFontsPopup::TitleFontsPopup(TitleMain *client, TitleWindow *window)
+ : BC_ListBox(-1, -1, 1, 1, LISTBOX_ICON_LIST,
+ &window->fonts, 0, 0, 1, 0, 1)
+{
+ this->client = client;
+ this->window = window;
+ set_use_button(0);
+}
+TitleFontsPopup::~TitleFontsPopup()
+{
+}
+
+int TitleFontsPopup::handle_event()
+{
+ deactivate();
+ BC_ListBoxItem *item = get_selection(0, 0);
+ if( !item ) return 1;
+ const char *item_text = item->get_text();
+ char txt[BCTEXTLEN]; sprintf(txt, "<font %s>",item_text);
+ return window->insert_ibeam(txt, strlen(txt));
+}
+
+TitleColorPopup::TitleColorPopup(TitleMain *client, TitleWindow *window)
+ : ColorThread(0, _("Text Color"))
+{
+ this->client = client;
+ this->window = window;
+ this->color_value = client->config.color;
+}
+TitleColorPopup::~TitleColorPopup()
+{
+}
+int TitleColorPopup::handle_new_color(int output, int alpha)
+{
+ color_value = output;
+ return 1;
+}
+int TitleColorPopup::activate()
+{
+ start_window(client->config.color, 255, 1);