本文整理汇总了C++中gtk::VBox::get_children方法的典型用法代码示例。如果您正苦于以下问题:C++ VBox::get_children方法的具体用法?C++ VBox::get_children怎么用?C++ VBox::get_children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gtk::VBox
的用法示例。
在下文中一共展示了VBox::get_children方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: show_msg
void ErrorPopup::show_msg() {
dialog = new Gtk::MessageDialog(msg, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
dialog->set_keep_above(true);
//Gtk::VBox *ma = dialog->get_message_area(); // not in Gtkmm 0.20
//FIXME: no comment :-)
Gtk::VBox *ma = dynamic_cast<Gtk::VBox*>(
*(++dynamic_cast<Gtk::HBox*>(
*dialog->get_vbox()->get_children().begin())->get_children().begin()));
// add an alignment parent to the label widget inside the message area
// should better define our own dialog instead of hacking MessageDialog...
Gtk::Alignment *align = new Gtk::Alignment();
align->show();
dynamic_cast<Gtk::Label*>(*ma->get_children().begin())->reparent(*align);
ma->pack_start(*manage(align));
align->set_padding(50,20,0,10);
Gtk::VBox *vbox = dynamic_cast<Gtk::VBox *>(dialog->get_child());
vbox->set_redraw_on_allocate(true);
vbox->signal_expose_event().connect(
sigc::group(&gx_cairo::error_box_expose,GTK_WIDGET(vbox->gobj()),sigc::_1,(void*)0),false);
dialog->set_title(_("GUITARIX ERROR"));
dialog->signal_response().connect(
sigc::mem_fun(*this, &ErrorPopup::on_response));
dialog->show();
}