PaletteEditor::PaletteEditor(PaletteViewer* palette, boost::filesystem::path b, ImageLoader& il) : palViewer(palette), normal("Normal"), passability("Passability"), priority("Priority"), transparency("Transparency"), status("Palette"), fileChooser(Gtk::FILE_CHOOSER_ACTION_OPEN), importOne("Import Image as Tile"), importMany("Import and Tile Image"), load("Load Palette"), save("Save Palette"), baseDir(b / "gfx" / "textures"), il(il) { sPal.add(*palette); boxLeft.pack_start(sPal, true, true, 0); displayButtons.pack_start(normal); displayButtons.pack_start(passability); displayButtons.pack_start(priority); displayButtons.pack_start(transparency); boxLeft.pack_start(displayButtons, false, false, 0); boxRight.pack_start(status, false, false, 0); tileBox.pack_start(fileChooser); boxRight.pack_start(tileBox, true, true, 0); // buttonBox.pack_start(importOne); // buttonBox.pack_start(importMany); // buttonBox.pack_start(load); // buttonBox.pack_start(save); // boxRight.pack_start(buttonBox, false, false, 0); pack_start(boxLeft, false, false, 0); pack_start(boxRight); // Set up file chooser fileChooser.set_current_folder(baseDir.string()); fileChooser.set_select_multiple(false); fileChooser.signal_file_activated().connect(sigc::mem_fun(*this, &PaletteEditor::fileActivated)); }
// Constructor CustomClockedComponentEditor::CustomClockedComponentEditor(Component& component) : _component(&component), _scriptFunction(Gtk::manage(new Gtk::Entry)) { _interval = Gtk::manage(new Gtk::SpinButton( *Gtk::manage(new Gtk::Adjustment(1, 0, 65535, 0.1)), 0, 2) ); pack_start( *Gtk::manage(new gtkutil::LeftAlignedLabel(std::string("<b>") + _("Script Function:") + "</b>")), false, false, 0 ); pack_start(*_scriptFunction, false, false, 0); pack_start( *Gtk::manage(new gtkutil::LeftAlignedLabel(std::string("<b>") + _("Clock interval:") + "</b>")), false, false, 0 ); Gtk::HBox* hbox2 = Gtk::manage(new Gtk::HBox(false, 6)); hbox2->pack_start(*_interval, false, false, 0); hbox2->pack_start(*Gtk::manage(new gtkutil::LeftAlignedLabel(_("seconds"))), false, false, 0); pack_start(*hbox2, false, false, 0); // Load the initial values into the boxes _scriptFunction->set_text(component.getArgument(0)); float interval = component.getClockInterval(); _interval->set_value(interval >= 0 ? interval : 1.0); }
Gobby::TabLabel::TabLabel(Folder& folder, SessionView& view, const Glib::ustring& active_icon_name): Gtk::HBox(false, 6), m_folder(folder), m_view(view), m_title(view.get_title()), m_changed(false), m_active_icon_name(active_icon_name) { m_title.set_alignment(Gtk::ALIGN_START); update_icon(); update_color(); m_icon.show(); m_title.show(); m_extra.show(); m_button.show(); view.signal_active_user_changed().connect( sigc::mem_fun(*this, &TabLabel::on_active_user_changed)); m_notify_status_handle = g_signal_connect( G_OBJECT(view.get_session()), "notify::status", G_CALLBACK(on_notify_status_static), this); m_notify_subscription_group_handle = g_signal_connect( G_OBJECT(view.get_session()), "notify::subscription-group", G_CALLBACK(on_notify_subscription_group_static), this); m_folder.signal_document_changed().connect( sigc::mem_fun(*this, &TabLabel::on_folder_document_changed)); pack_start(m_icon, Gtk::PACK_SHRINK); pack_start(m_title, Gtk::PACK_SHRINK); pack_start(m_extra, Gtk::PACK_EXPAND_WIDGET); pack_end(m_button, Gtk::PACK_SHRINK); }
DualSpinScale::DualSpinScale(const char* label1, const char* label2, double value, double lower, double upper, double step_inc, double climb_rate, int digits, const SPAttributeEnum a, char* tip_text1, char* tip_text2) : AttrWidget(a), _s1(label1, value, lower, upper, step_inc, climb_rate, digits, SP_ATTR_INVALID, tip_text1), _s2(label2, value, lower, upper, step_inc, climb_rate, digits, SP_ATTR_INVALID, tip_text2), //TRANSLATORS: "Link" means to _link_ two sliders together _link(C_("Sliders", "Link")) { signal_value_changed().connect(signal_attr_changed().make_slot()); _s1.get_adjustment()->signal_value_changed().connect(_signal_value_changed.make_slot()); _s2.get_adjustment()->signal_value_changed().connect(_signal_value_changed.make_slot()); _s1.get_adjustment()->signal_value_changed().connect(sigc::mem_fun(*this, &DualSpinScale::update_linked)); _link.signal_toggled().connect(sigc::mem_fun(*this, &DualSpinScale::link_toggled)); Gtk::VBox* vb = Gtk::manage(new Gtk::VBox); vb->add(_s1); vb->add(_s2); pack_start(*vb); pack_start(_link, false, false); _link.set_active(true); show_all(); }
CPrintPreviewWidget::CPrintPreviewWidget( Glib::ustring &filename, std::list<Glib::ustring> &filelist, CPrintPreviewWidget **t_ptrPrintPreviewWidget) : Page() { set_flags(Gtk::NO_WINDOW); // tell our parent print operation who we are *t_ptrPrintPreviewWidget = this; #ifdef DEBUG std::cout << "CPRINTPREVIEWWIDGET: constructor\n"; std::cout << "CPRINTPREVIEWWIDGET: pointer address: " << t_ptrPrintPreviewWidget << std::endl; std::cout << "CPRINTPREVIEWWIDGET: address pointed to by pointer: " << *t_ptrPrintPreviewWidget << std::endl; #endif // DEBUG /* image_filelist = filelist; image_filename = filename; /*refPageSetup = _refPageSetup; refPrintSettings = _refPrintSettings; PagePreviewFrame.add(Page); TopHBox.pack_start(PagePreviewFrame,Gtk::PACK_SHRINK); /* Glib::Thread* const thread = Glib::Thread::create( sigc::mem_fun(get_parent(),&CPrintPreviewWidget::populate_iconview), true); populate_iconview(); //thread->join(); ImageListScroller.add(ImageIconView); ImageListScroller.set_size_request(350,0); ImageListScroller.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC); */ TopHBox.pack_start(ImageListFrame,Gtk::PACK_EXPAND_WIDGET); pack_start(TopHBox,Gtk::PACK_SHRINK); pack_start(PageSettingsFrame,Gtk::PACK_SHRINK); PageSetupButton.set_label( "Page Size and Orientation" ); HButtonBox.pack_start( PageSetupButton, Gtk::PACK_SHRINK ); pack_start(HButtonBox,Gtk::PACK_SHRINK); Page.load( filename, true ); show_all_children(); PageSetupButton.signal_clicked().connect( sigc::mem_fun(*this,&CPrintPreviewWidget::on_button_page_setup)); }
Terminal::Terminal() { dock_hint = GdkRectangle{0, 0, 0, 0}; vte = vte_terminal_new(); char *argv[] = { vte_get_user_shell(), NULL }; vte_terminal_spawn_sync(VTE_TERMINAL(vte), VTE_PTY_DEFAULT, NULL, argv, NULL, (GSpawnFlags)0, NULL, NULL, &child_pid, NULL, NULL); set_orientation(Gtk::ORIENTATION_VERTICAL); scrollbox.set_orientation(Gtk::ORIENTATION_HORIZONTAL); scrollbar.set_orientation(Gtk::ORIENTATION_VERTICAL); eventbox.add(label); eventbox.signal_button_press_event().connect(mem_fun(this, &Terminal::header_button_press)); VteRegex *regex = vte_regex_new_for_match("(https?://|www\\.)[^\\s]*", -1, PCRE2_MULTILINE, NULL); vte_terminal_match_add_regex(VTE_TERMINAL(vte), regex, 0); vte_terminal_set_scrollback_lines(VTE_TERMINAL(vte), 10000); g_signal_connect(vte, "bell", G_CALLBACK(Terminal::vte_beep), this); g_signal_connect(vte, "child-exited", G_CALLBACK(Terminal::vte_child_exited), this); g_signal_connect(vte, "button-press-event", G_CALLBACK(Terminal::vte_click), this); g_signal_connect(vte, "focus-in-event", G_CALLBACK(Terminal::vte_got_focus), this); g_signal_connect(vte, "focus-out-event", G_CALLBACK(Terminal::vte_lost_focus), this); g_signal_connect(vte, "selection-changed", G_CALLBACK(Terminal::vte_selection_changed), this); g_signal_connect(vte, "window-title-changed", G_CALLBACK(Terminal::vte_title_changed), this); searchbar.add(searchentry); searchbar.connect_entry(searchentry); searchentry.signal_focus_out_event().connect(mem_fun(this, &Terminal::searchentry_lost_focus)); searchentry.signal_key_release_event().connect(mem_fun(this, &Terminal::searchentry_keypress)); pack_start(eventbox, false, false, 0); pack_start(scrollbox, true, true, 0); pack_start(searchbar, false, false, 0); gtk_box_pack_start(GTK_BOX(scrollbox.gobj()), vte, true, true, 0); scrollbox.pack_start(scrollbar, false, false, 0); gtk_range_set_adjustment(GTK_RANGE(scrollbar.gobj()), gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vte))); show_all_children(); find_label.terminal = this; find_label.set_alignment(0.0, 0.5); find_window->list_box.prepend(find_label); std::vector<Gtk::TargetEntry> listTargets; listTargets.push_back(Gtk::TargetEntry("SvanTerminal", Gtk::TARGET_SAME_APP, 0)); eventbox.drag_source_set(listTargets); drag_dest_set(listTargets); eventbox.signal_drag_begin().connect(sigc::mem_fun(this, &Terminal::on_my_drag_begin)); eventbox.signal_drag_failed().connect(sigc::mem_fun(this, &Terminal::on_my_drag_failed)); eventbox.signal_drag_end().connect(sigc::mem_fun(this, &Terminal::on_my_drag_end)); signal_drag_motion().connect(sigc::mem_fun(this, &Terminal::on_my_drag_motion)); signal_drag_drop().connect(sigc::mem_fun(this, &Terminal::on_my_drag_drop)); signal_drag_leave().connect(sigc::mem_fun(this, &Terminal::on_my_drag_leave)); }
InfoWidget::InfoWidget() : Gtk::Box(Gtk::ORIENTATION_VERTICAL) { pack_start(m_title, Gtk::PACK_SHRINK); pack_start(m_content, Gtk::PACK_SHRINK); m_content.add(m_chartDrawingArea); m_title.set_justify(Gtk::JUSTIFY_CENTER); m_title.set_margin_bottom(20); m_chartDrawingArea.signal_draw().connect(sigc::mem_fun(*this, &InfoWidget::drawChart)); }
DateFilter::DateFilter() { m_startdate.clear(); m_enddate.clear(); set_spacing(12); // filtertype button m_filter_type = manage(new Gtk::ComboBoxText); m_filter_type->append_text(gettext("None")); m_filter_type->append_text(gettext("Today")); m_filter_type->append_text(gettext("Yesterday")); m_filter_type->append_text(gettext("Date")); m_filter_type->append_text(gettext("Range")); m_filter_type->set_active_text(gettext("None")); m_filter_type->signal_changed().connect(sigc::mem_fun(*this, &DateFilter::on_filtertype_changed)); m_filter_type->show(); // date selection m_filter_date = manage(new Gtk::HBox); m_filter_popup_from = manage(new Gtk::Button); m_filter_popup_from->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &DateFilter::on_select_date), true)); m_filter_popup_from->show(); m_filter_date->pack_start(*m_filter_popup_from, Gtk::PACK_SHRINK); // date range m_filter_range = manage(new Gtk::HBox); m_filter_popup_to = manage(new Gtk::Button); m_filter_popup_to->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &DateFilter::on_select_date), false)); m_filter_popup_to->show(); Gtk::Label* label = manage(new Gtk::Label("-")); label->set_padding(12,0); label->show(); m_filter_range->pack_start(*label, Gtk::PACK_SHRINK); m_filter_range->pack_start(*m_filter_popup_to, Gtk::PACK_SHRINK); // container for date/range selection Gtk::HBox* type_container = manage(new Gtk::HBox); type_container->pack_start(*m_filter_date, Gtk::PACK_SHRINK); type_container->pack_start(*m_filter_range, Gtk::PACK_SHRINK); type_container->show(); // add all widgets pack_start(*m_filter_type, Gtk::PACK_SHRINK); pack_start(*type_container, Gtk::PACK_SHRINK); }
tranche_effet::tranche_effet(controleur& c, effet* e, int numero_effet) : c_(c), e_(e), numero_effet_(numero_effet), afficheur_(c, e, numero_effet), lbl_wet_("Dry/Wet :"), scl_wet_(0.00, 1.05, 0.05) { conteneur_.set_label("Effet"); scl_wet_.signal_value_changed().connect(sigc::mem_fun(*this, &tranche_effet::drywet)); scl_wet_.set_value(1.0); box_wet_.pack_start(lbl_wet_, false, false, 5); box_wet_.pack_start(scl_wet_, true, true, 5); gauche_.pack_start(box_wet_, false, false, 5); conteneur_.add(gauche_); pack_start(conteneur_, true, true, 5); pack_start(afficheur_, true, true, 5); }
TwoDimensionalPlotPage::TwoDimensionalPlotPage() : _expander("Side bar"), _statisticFrame("Statistics"), _countButton("Count"), _meanButton("Mean"), _stdDevButton("StdDev"), _varianceButton("Variance"), _dCountButton("DCount"), _dMeanButton("DMean"), _dStdDevButton("DStdDev"), _rfiPercentageButton("RFI"), _snrButton("SNR"), _polarizationFrame("Polarization"), _polXXButton("XX"), _polXYButton("XY"), _polYXButton("YX"), _polYYButton("YY"), _polXXandYYButton("XX/2+YY/2"), _polXYandYXButton("XY/2+YX/2"), _phaseFrame("Phase"), _amplitudeButton("Amplitude"), _phaseButton("Phase"), _realButton("Real"), _imaginaryButton("Imaginary"), _plotFrame("Plot"), _logarithmicButton("Logarithmic"), _zeroAxisButton("Zero axis"), _plotPropertiesButton("Properties..."), _dataExportButton("Data..."), _statCollection(0), _plotPropertiesWindow(0), _customButtonsCreated(false) { initStatisticKindButtons(); initPolarizationButtons(); initPhaseButtons(); initPlotButtons(); _expander.add(_sideBox); pack_start(_expander, Gtk::PACK_SHRINK); _plotWidget.SetPlot(_plot); pack_start(_plotWidget, Gtk::PACK_EXPAND_WIDGET); show_all_children(); _dataWindow = new DataWindow(); }
MobileView::MobileView() { Gtk::Button *button; button = Gtk::manage(new Gtk::Button("mobile")); pack_start(*button, false, false, 0); show_all(); }
ChoiceWidget:: ChoiceWidget (ChoiceType type, const Choice& choice) : _spinButtonAdj (choice._value, -10000.0, 10000.0) { if (type == ANY) { _toggleButton = manage (new Gtk::CheckButton (choice._choice)); } else { _toggleButton = manage (new Gtk::RadioButton (_group, choice._choice)); } pack_start (*_toggleButton); if (choice._takesInt) { _spinButton = manage (new Gtk::SpinButton (_spinButtonAdj)); _spinButton->set_numeric (); this->setInput (); _toggleButton->signal_toggled().connect (SigC::slot (*this, &ChoiceWidget::setInput)); pack_end (*_spinButton); } else _spinButton = 0; show_all (); }
FontSizeComboBox::FontSizeComboBox(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder) : Gtk::ComboBox( cobject ) { font_size_tree_model_ = Gtk::ListStore::create(columns_); font_size_tree_model_->set_sort_column(columns_.font_size, Gtk::SORT_ASCENDING); set_model(font_size_tree_model_); Gtk::TreeModel::Row row = *(font_size_tree_model_->append()); row[columns_.font_size] = 6; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 8; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 10; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 11; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 12; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 14; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 16; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 18; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 24; row = *(font_size_tree_model_->append()); row[columns_.font_size] = 32; Gtk::CellRendererText* renderer = Gtk::manage (new Gtk::CellRendererText()); pack_start (*renderer, true); add_attribute(renderer->property_text(), columns_.font_size); }
bool ImageIcon::showSvgDocument(const SPDocument *docArg) { if (document) document->doUnref(); SPDocument *doc = const_cast<SPDocument *>(docArg); doc->doRef(); document = doc; //This should remove it from the box, and free resources //if (viewerGtkmm) // viewerGtkmm->destroy(); GtkWidget *viewerGtk = sp_svg_view_widget_new(doc); viewerGtkmm = Glib::wrap(viewerGtk); viewerGtkmm->show(); pack_start(*viewerGtkmm, TRUE, TRUE, 0); //GtkWidget *vbox = GTK_WIDGET(gobj()); //gtk_box_pack_start(GTK_BOX(vbox), viewerGtk, TRUE, TRUE, 0); return true; }
void TemplateWidget::display(TemplateLoadTab::TemplateData data) { _current_template = data; _template_name_label.set_text(_current_template.display_name); _short_description_label.set_text(_current_template.short_description); _preview_render.hide(); _preview_image.hide(); std::string imagePath = Glib::build_filename(Glib::path_get_dirname(_current_template.path), _current_template.preview_name); if (data.preview_name != ""){ _preview_image.set(imagePath); _preview_image.show(); } else if (!data.is_procedural){ Glib::ustring gPath = data.path.c_str(); _preview_render.showImage(gPath); _preview_render.show(); } if (_effect_prefs != NULL){ remove (*_effect_prefs); _effect_prefs = NULL; } if (data.is_procedural){ _effect_prefs = data.tpl_effect->get_imp()->prefs_effect(data.tpl_effect, SP_ACTIVE_DESKTOP, NULL, NULL); pack_start(*_effect_prefs); } }
void Gobby::FileEntry::init() { m_dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); m_dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK); m_btn_browse.signal_clicked().connect( sigc::mem_fun(*this, &FileEntry::on_browse) ); pack_start(m_ent_file, Gtk::PACK_EXPAND_WIDGET); pack_start(m_btn_browse, Gtk::PACK_SHRINK); m_ent_file.set_activates_default(true); set_spacing(5); }
PreviewHolder::PreviewHolder() : VBox(), PreviewFillable(), _scroller(0), _insides(0), _prefCols(0), _updatesFrozen(false), _anchor(SP_ANCHOR_CENTER), _baseSize(PREVIEW_SIZE_SMALL), _ratio(100), _view(VIEW_TYPE_LIST), _wrap(false), _border(BORDER_NONE) { _scroller = manage(new Gtk::ScrolledWindow()); _insides = manage(new Gtk::Table( 1, 2 )); _insides->set_col_spacings( 8 ); // Add a container with the scroller and a spacer Gtk::Table* spaceHolder = manage( new Gtk::Table(1, 2) ); _scroller->add( *_insides ); spaceHolder->attach( *_scroller, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); pack_start(*spaceHolder, Gtk::PACK_EXPAND_WIDGET); }
ScalarUnit::ScalarUnit(Glib::ustring const &label, Glib::ustring const &tooltip, UnitType unit_type, Glib::ustring const &suffix, Glib::ustring const &icon, UnitMenu *unit_menu, bool mnemonic) : Scalar(label, tooltip, suffix, icon, mnemonic), _unit_menu(unit_menu), _hundred_percent(0), _absolute_is_increment(false), _percentage_is_increment(false) { if (_unit_menu == NULL) { _unit_menu = new UnitMenu(); g_assert(_unit_menu); _unit_menu->setUnitType(unit_type); pack_start(*Gtk::manage(_unit_menu), false, false, 4); } _unit_menu->signal_changed() .connect_notify(sigc::mem_fun(*this, &ScalarUnit::on_unit_changed)); static_cast<SpinButton*>(_widget)->setUnitMenu(_unit_menu); lastUnits = _unit_menu->getUnitAbbr(); }
void ValueComboBox::setValues(const std::vector<std::string>& iValues) { // Set up tree model. _refTreeModel = Gtk::ListStore::create(_columns); set_model(_refTreeModel); std::cout << "ABAB1" << std::endl; _refTreeModel->clear(); std::cout << "ABAB1" << std::endl; // Fill rows with values. for (auto aValue : iValues) { std::cout << "ABAB1" << std::endl; Gtk::TreeModel::Row row = *(_refTreeModel->append()); row[_columns._name] = aValue; //set_active(row); } clear(); pack_start(_columns._name); }
ScriptWindow::ScriptWindow() : Gtk::VBox(false, 6), _outView(Gtk::manage(new gtkutil::ConsoleView)), _view(Gtk::manage(new gtkutil::SourceView(SCRIPT_LANGUAGE_ID, false))) // allow editing { _view->unset_focus_chain(); Gtk::Button* runButton = Gtk::manage(new Gtk::Button(_("Run Script"))); runButton->signal_clicked().connect(sigc::mem_fun(*this, &ScriptWindow::onRunScript)); Gtk::HBox* buttonBar = Gtk::manage(new Gtk::HBox(false, 6)); buttonBar->pack_start(*runButton, false, false, 0); Gtk::VBox* inputVBox = Gtk::manage(new Gtk::VBox(false, 3)); inputVBox->pack_start(*Gtk::manage(new gtkutil::LeftAlignedLabel(_("Python Script Input"))), false, false, 0); inputVBox->pack_start(*_view, true, true, 0); inputVBox->pack_start(*buttonBar, false, false, 0); // Pack the scrolled textview and the entry box to the vbox Gtk::VPaned* paned = Gtk::manage(new Gtk::VPaned); paned->add1(*inputVBox); paned->add2(*_outView); pack_start(*paned, true, true, 0); show_all(); }
NotebookPage::NotebookPage(int n_rows, int n_columns, bool expand, bool fill, guint padding) :_table(n_rows, n_columns) { set_border_width(2); _table.set_spacings(2); pack_start(_table, expand, fill, padding); }
Gobby::SessionView::SessionView(InfSession* session, const Glib::ustring& title, const Glib::ustring& path, const Glib::ustring& hostname): m_session(session), m_title(title), m_path(path), m_hostname(hostname), m_info_box(false, 0), m_info_close_button_box(false, 6) { g_object_ref(m_session); m_info_label.set_selectable(true); m_info_label.set_line_wrap(true); m_info_label.show(); m_info_close_button.signal_clicked().connect( sigc::mem_fun(m_info_frame, &Gtk::Frame::hide)); m_info_close_button.show(); m_info_close_button_box.pack_end(m_info_close_button, Gtk::PACK_SHRINK); // Don't show info close button box by default m_info_box.pack_start(m_info_close_button_box, Gtk::PACK_SHRINK); m_info_box.pack_start(m_info_label, Gtk::PACK_SHRINK); m_info_box.set_border_width(6); m_info_box.show(); m_info_frame.set_shadow_type(Gtk::SHADOW_IN); m_info_frame.add(m_info_box); // Don't show infoframe by default pack_start(m_info_frame, Gtk::PACK_SHRINK); }
RemapWidget::RemapWidget(Joystick& joystick_, Mode mode_) : joystick(joystick_), mode(mode_) { map_list = Gtk::ListStore::create(RemapWidgetColumns::instance()); treeview.set_model(map_list); if (mode == REMAP_AXIS) treeview.append_column("Axes", RemapWidgetColumns::instance().name); else treeview.append_column("Buttons", RemapWidgetColumns::instance().name); set_border_width(5); treeview.set_border_width(5); scroll.add(treeview); scroll.set_size_request(-1, 300); scroll.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); pack_start(scroll, Gtk::PACK_EXPAND_WIDGET); treeview.set_reorderable(); map_list->signal_row_inserted().connect(sigc::mem_fun(this, &RemapWidget::on_my_row_inserted)); map_list->signal_row_deleted().connect(sigc::mem_fun(this, &RemapWidget::on_my_row_deleted)); map_list->signal_rows_reordered().connect(sigc::mem_fun(this, &RemapWidget::on_my_rows_reordered)); }
void initialize(document_state& DocumentState, k3d::iproperty& Property) { Gtk::Button* const menu_button = new Gtk::Button(_("Selection Options")); menu_button->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &control::on_choose), &Property)); pack_start(*Gtk::manage(menu_button), Gtk::PACK_EXPAND_WIDGET); }
void Licensor::init (Gtk::Tooltips& tt, Registry& wr) { /* add license-specific metadata entry areas */ rdf_work_entity_t* entity = rdf_find_entity ( "license_uri" ); _eentry = EntityEntry::create (entity, tt, wr); LicenseItem *i; wr.setUpdating (true); i = manage (new LicenseItem (&_proprietary_license, _eentry, wr)); add (*i); LicenseItem *pd = i; for (struct rdf_license_t * license = rdf_licenses; license && license->name; license++) { i = manage (new LicenseItem (license, _eentry, wr)); add(*i); } // add Other at the end before the URI field for the confused ppl. LicenseItem *io = manage (new LicenseItem (&_other_license, _eentry, wr)); add (*io); pd->set_active(); wr.setUpdating (false); Gtk::HBox *box = manage (new Gtk::HBox); pack_start (*box, true, true, 0); box->pack_start (_eentry->_label, false, false, 5); box->pack_start (*_eentry->_packable, true, true, 0); show_all_children(); }
gui::Workspace::Workspace() : imageSpace_(), toolBox_(imageSpace_.getOriginalImage(), imageSpace_.getCurrentImage()) { set_border_width(BORDER_WIDTH); pack_start(imageSpace_, true, true); pack_end(toolBox_, false, false); show_all_children(); }
AttributeColorSelector::AttributeColorSelector(): AttributeSelector(true), _autoScaling("Autoscale to data range"), _lastColorMap(-1) { pack_start(_colorMapSelector, false, false, 5); pack_start(_autoScaling, false, false, 5); _autoScaling.set_active(true); _autoScaling.show(); _colorMapSelector.signal_changed() .connect(sigc::mem_fun(*this, &AttributeColorSelector::colorMapChanged)); _autoScaling.signal_toggled() .connect(sigc::mem_fun(*this, &AttributeColorSelector::colorMapChanged)); _componentSelect.signal_changed() .connect(sigc::mem_fun(this, &AttributeColorSelector::updateComponent)); }
void initialize(document_state& DocumentState) { m_implementation = new detail::implementation(DocumentState); m_implementation->m_scrolled_window.signal_button_press_event().connect(sigc::bind_return(sigc::hide(m_implementation->m_panel_grab_signal.make_slot()), false), false); pack_start(m_implementation->m_vbox, Gtk::PACK_EXPAND_WIDGET); show_all(); }
StatusBar::StatusBar() : Gtk::HBox(false, 1), _label("", 0.5, 0.5) { _frame.add(_label); _notifyframe.add(_notifylabel); //_statusbar.pack_end(_statuslabel); //_frame.set_shadow_type(Gtk::SHADOW_IN); _notifyframe.set_shadow_type(Gtk::SHADOW_IN); pack_start(_frame); pack_start(_notifyframe); setText1(_("Not connected.")); show_all(); }
SoundShaderPreview::SoundShaderPreview() : Gtk::HBox(false, 12), _soundShader("") { _treeView = Gtk::manage(new Gtk::TreeView); _treeView->set_size_request(-1, 130); _treeView->append_column(_("Sound Files"), _columns.shader); // Connect the "changed" signal _selection = _treeView->get_selection(); _selection->signal_changed().connect(sigc::mem_fun(*this,&SoundShaderPreview::onSelectionChanged)); pack_start(*Gtk::manage(new gtkutil::ScrolledFrame(*_treeView)), true, true); pack_start(createControlPanel(), false, false); // Trigger the initial update of the widgets update(); }