void Chat::setWidgets() { // Show user button showUsersBtn_.set_can_focus(false); showUsersBtn_.signal_clicked().connect(mem_fun(this, &Chat::ShowUsers)); // First level HButtonBox * firstLvl = new HButtonBox(Gtk::BUTTONBOX_END); firstLvl->pack_start(showUsersBtn_); // Result view resultView_.set_wrap_mode(Gtk::WRAP_WORD); resultView_.set_editable(false); ScrolledWindow * messageScroll = new Gtk::ScrolledWindow(); messageScroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); messageScroll->add(resultView_); // User list users_.set_column_title(0, "Users"); users_.set_headers_visible(false); users_.append("Admin"); users_.append("Console"); userScroll_.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); userScroll_.add(users_); // Second level HBox * secondLvl = new HBox(); secondLvl->pack_start(*manage(messageScroll)); secondLvl->pack_start(userScroll_, Gtk::PACK_SHRINK); // Command entry commandEntry_.signal_activate().connect(mem_fun(this, &Chat::Submit)); commandEntry_.signal_changed().connect(mem_fun(this, &Chat::ShowSubmit)); // Submit button submitBtn_.set_can_focus(false); submitBtn_.signal_clicked().connect(mem_fun(this, &Chat::Submit)); // Third level HBox * thirdLvl = new HBox(); thirdLvl->pack_start(commandEntry_); thirdLvl->pack_start(submitBtn_, Gtk::PACK_SHRINK); // Vertical Align pack_start(*manage(firstLvl), Gtk::PACK_SHRINK); pack_start(*manage(secondLvl)); pack_start(*manage(thirdLvl), Gtk::PACK_SHRINK); // Window Settings set_focus_child(commandEntry_); show_all(); submitBtn_.hide(); userScroll_.hide(); }
lfownd::lfownd(sequence *a_seq, seqdata *a_seqdata){ m_seq = a_seq; m_seqdata = a_seqdata; /* main window */ string title = "seq42 - lfoeditor - "; title.append(m_seq->get_name()); set_title(title); set_size_request(150, 200); m_scale_value = manage(new VScale(0, 127, .1)); m_scale_range = manage(new VScale(0, 127, .1)); m_scale_speed = manage(new VScale(0, 16, .01)); m_scale_phase = manage(new VScale(0,1,.01)); m_scale_wave = manage(new VScale(1,5,1)); m_scale_value->set_tooltip_text("value"); m_scale_range->set_tooltip_text("range"); m_scale_speed->set_tooltip_text("speed"); m_scale_phase->set_tooltip_text("phase"); m_scale_wave->set_tooltip_text("wave"); m_scale_value->set_value(64); m_scale_range->set_value(64); m_scale_value->signal_value_changed().connect(mem_fun( *this, &lfownd::scale_lfo_change)); m_scale_range->signal_value_changed().connect(mem_fun( *this, &lfownd::scale_lfo_change)); m_scale_speed->signal_value_changed().connect(mem_fun( *this, &lfownd::scale_lfo_change)); m_scale_phase->signal_value_changed().connect(mem_fun( *this, &lfownd::scale_lfo_change)); m_scale_wave->signal_value_changed().connect(mem_fun( *this, &lfownd::scale_lfo_change)); m_hbox = manage(new HBox(false, 2)); add(*m_hbox); m_hbox->pack_start(*m_scale_value); m_hbox->pack_start(*m_scale_range); m_hbox->pack_start(*m_scale_speed); m_hbox->pack_start(*m_scale_phase); m_hbox->pack_start(*m_scale_wave); }