本文整理汇总了C++中gtk::VBox::set_visible方法的典型用法代码示例。如果您正苦于以下问题:C++ VBox::set_visible方法的具体用法?C++ VBox::set_visible怎么用?C++ VBox::set_visible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gtk::VBox
的用法示例。
在下文中一共展示了VBox::set_visible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createPanelBox
Gtk::Box* PreferencesPanel::createPanelBox()
{
Gtk::VBox* PanelBox = Gtk::manage(new Gtk::VBox(false, 5));
PanelBox->set_border_width(10);
PanelBox->set_visible(true);
return PanelBox;
}
示例2: compose
void ModelStructureModule::compose()
{
mp_MainPanel = Gtk::manage(new Gtk::VPaned());
Gtk::VBox* ButtonsPanel = Gtk::manage(new Gtk::VBox());
ButtonsPanel->pack_start(*mp_StructureListToolBox->asWidget(),Gtk::PACK_SHRINK);
ButtonsPanel->set_visible(true);
Gtk::HBox* TopPanel = Gtk::manage(new Gtk::HBox());
TopPanel->set_border_width(5);
TopPanel->pack_start(*mp_ModelStructureMVP->asWidget(),Gtk::PACK_EXPAND_WIDGET,5);
TopPanel->pack_start(*ButtonsPanel, Gtk::PACK_SHRINK,5);
TopPanel->pack_start(*mp_ModelFctDetailMVP->asWidget(),Gtk::PACK_SHRINK,5);
TopPanel->set_visible(true);
TopPanel->set_border_width(6);
Gtk::HBox* BottomPanel = Gtk::manage(new Gtk::HBox());
BottomPanel->set_border_width(5);
BottomPanel->pack_start(*mp_ModelParamsPanel->asWidget());
BottomPanel->set_visible(true);
BottomPanel->set_border_width(6);
BuilderFrame* TopFrame = Gtk::manage(new BuilderFrame());
TopFrame->setLabelText(_("Model definition"));
TopFrame->set_visible(true);
TopFrame->add(*TopPanel);
BuilderFrame* BottomFrame = Gtk::manage(new BuilderFrame());
BottomFrame->setLabelText(_("Model parameters"));
BottomFrame->set_visible(true);
BottomFrame->add(*BottomPanel);
mp_MainPanel->pack1(*TopFrame, true,false);
mp_MainPanel->pack2(*BottomFrame, true,false);
mp_MainPanel->set_visible(true);
}
示例3: setFileContentsByName
void ResViewerViewImpl::setFileContentsByName(std::map<std::string,
Glib::RefPtr<Gtk::TextBuffer> > FileContents)
{
Glib::ustring ExistingTabSelection = "";
if (mp_Notebook->get_current())
ExistingTabSelection = mp_Notebook->get_current()->get_tab_label_text();
int TabToSelect = 0;
while (mp_Notebook->get_n_pages() > 1)
mp_Notebook->remove_page(1);
for (std::map<std::string, Glib::RefPtr<Gtk::TextBuffer> >::iterator it =
FileContents.begin(); it != FileContents.end(); ++it)
{
Gtk::TextView* TextView = Gtk::manage(new Gtk::TextView(it->second));
TextView->set_editable(false);
TextView->set_visible(true);
Gtk::ScrolledWindow* Win = Gtk::manage(new Gtk::ScrolledWindow());
Win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
Win->set_visible(true);
Win->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
Win->add(*TextView);
Gtk::Label* TabLabel = Gtk::manage(new Gtk::Label(it->first));
Gtk::Label* MenuLabel = Gtk::manage(new Gtk::Label(it->first,
Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER));
Gtk::Button* SingleGNUplotButton = Gtk::manage(new Gtk::Button(
_("Plot file with GNUplot\n(All-in-one window)")));
Gtk::Button* MultiGNUplotButton = Gtk::manage(new Gtk::Button(
_("Plot file with GNUplot\n(Multiple windows)")));
Gtk::VBox* RightButtonsBox = Gtk::manage(new Gtk::VBox());
RightButtonsBox->pack_start(*SingleGNUplotButton, Gtk::PACK_SHRINK);
RightButtonsBox->pack_start(*MultiGNUplotButton, Gtk::PACK_SHRINK, 5);
RightButtonsBox->show_all_children(true);
RightButtonsBox->set_visible(true);
#if WIN32
SingleGNUplotButton->set_sensitive(false);
MultiGNUplotButton->set_sensitive(false);
#else
if (ViewWithGNUplot::IsGNUplotAvailable())
{
SingleGNUplotButton->signal_clicked().connect(sigc::bind<Glib::RefPtr<
Gtk::TextBuffer>, std::string, std::string, std::string, bool>(
sigc::mem_fun(*this, &ResViewerViewImpl::onGNUplotClicked),
(Glib::RefPtr<Gtk::TextBuffer>) (it->second), m_DateFormat, m_ColSep,
m_CommentChar, true));
SingleGNUplotButton->set_sensitive(true);
MultiGNUplotButton->signal_clicked().connect(sigc::bind<Glib::RefPtr<
Gtk::TextBuffer>, std::string, std::string, std::string, bool>(
sigc::mem_fun(*this, &ResViewerViewImpl::onGNUplotClicked),
(Glib::RefPtr<Gtk::TextBuffer>) (it->second), m_DateFormat, m_ColSep,
m_CommentChar, false));
MultiGNUplotButton->set_sensitive(true);
}
else
{
SingleGNUplotButton->set_sensitive(false);
MultiGNUplotButton->set_sensitive(false);
}
#endif
Gtk::HBox* MainHBox = Gtk::manage(new Gtk::HBox());
MainHBox->pack_start(*Win, Gtk::PACK_EXPAND_WIDGET, 5);
MainHBox->pack_start(*RightButtonsBox, Gtk::PACK_SHRINK, 5);
MainHBox->set_border_width(8);
MainHBox->set_visible(true);
int PageNum = mp_Notebook->append_page(*MainHBox, *TabLabel, *MenuLabel);
if (it->first == ExistingTabSelection)
TabToSelect = PageNum;
mp_Notebook->set_tab_reorderable(*Win, true);
}
mp_Notebook->set_current_page(TabToSelect);
}