本文整理汇总了C++中gtk::VBox::set_homogeneous方法的典型用法代码示例。如果您正苦于以下问题:C++ VBox::set_homogeneous方法的具体用法?C++ VBox::set_homogeneous怎么用?C++ VBox::set_homogeneous使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gtk::VBox
的用法示例。
在下文中一共展示了VBox::set_homogeneous方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
Gtk::Widget *
LPESimplify::newWidget()
{
// use manage here, because after deletion of Effect object, others might still be pointing to this widget.
Gtk::VBox * vbox = Gtk::manage( new Gtk::VBox(Effect::newWidget()) );
vbox->set_border_width(5);
vbox->set_homogeneous(false);
vbox->set_spacing(2);
std::vector<Parameter *>::iterator it = param_vector.begin();
Gtk::HBox * buttons = Gtk::manage(new Gtk::HBox(true,0));
while (it != param_vector.end()) {
if ((*it)->widget_is_visible) {
Parameter * param = *it;
Gtk::Widget * widg = dynamic_cast<Gtk::Widget *>(param->param_newWidget());
if (param->param_key == "simplify_individual_paths" ||
param->param_key == "simplify_just_coalesce") {
Glib::ustring * tip = param->param_getTooltip();
if (widg) {
buttons->pack_start(*widg, true, true, 2);
if (tip) {
widg->set_tooltip_text(*tip);
} else {
widg->set_tooltip_text("");
widg->set_has_tooltip(false);
}
}
} else {
Glib::ustring * tip = param->param_getTooltip();
if (widg) {
Gtk::HBox * horizontal_box = dynamic_cast<Gtk::HBox *>(widg);
std::vector< Gtk::Widget* > child_list = horizontal_box->get_children();
Gtk::Entry* entry_widg = dynamic_cast<Gtk::Entry *>(child_list[1]);
entry_widg->set_width_chars(8);
vbox->pack_start(*widg, true, true, 2);
if (tip) {
widg->set_tooltip_text(*tip);
} else {
widg->set_tooltip_text("");
widg->set_has_tooltip(false);
}
}
}
}
++it;
}
vbox->pack_start(*buttons,true, true, 2);
return dynamic_cast<Gtk::Widget *>(vbox);
}