Fl_ToggleTree::Fl_ToggleTree(int x, int y, int w, int h,const char * label) : Fl_Tree(x, y, w, h) { pixmap_offset_ = 16; label_offset_ = 40; current_ = 0; state_ = FL_TOGGLE_NONE; closed_pixmap_ = 0; opened_pixmap_ = 0; if (s_closed_pixmap_ == 0) { s_closed_pixmap_ = new Fl_Pixmap(closed_icon); } if (s_opened_pixmap_ == 0) { s_opened_pixmap_ = new Fl_Pixmap(open_icon); } closed_pixmap(s_closed_pixmap_); opened_pixmap(s_opened_pixmap_); column_widths_ = no_columns; column_char_ = '\t'; textfont_ = FL_HELVETICA; textsize_ = 12; textcolor_ = FL_BLACK; edit_input_ = new Fl_Input(x, y, 0, 0); edit_input_->box(FL_FLAT_BOX); edit_input_->color(FL_WHITE); edit_input_->textcolor(FL_BLACK); edit_input_->textfont(textfont_); edit_input_->textsize(textsize_); edit_callback((Fl_Callback*) edit_default_callback, this); edit_input_->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY | FL_WHEN_NOT_CHANGED); edit_input_->hide(); edit_on_reselect_ = 1; color(FL_WHITE); selection_color(FL_BLACK); selection_label_color(FL_YELLOW); alternate_color(FL_LIGHT2); trim_color(FL_LIGHT1); draw_lines_ = 0; }
static void confirm_cb(int exit_code, void *context) { if (exit_code == dec_yes ) { edit_callback((SsdWidget)context, NULL); } }