本文整理汇总了C++中gtk::Label::get_label方法的典型用法代码示例。如果您正苦于以下问题:C++ Label::get_label方法的具体用法?C++ Label::get_label怎么用?C++ Label::get_label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gtk::Label
的用法示例。
在下文中一共展示了Label::get_label方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: show
void Info::show(std::string ClassName, std::set<int> UnitIDs)
{
mp_IDLabel->set_label("");
mp_ProcessOrderLabel->set_label("");
mref_ListStoreFrom->clear();
mref_ListStoreTo->clear();
mref_ListStoreParent->clear();
mref_ListStoreChildren->clear();
mref_ListStoreIDs->clear();
m_InputDataNames.clear();
if (!m_InputDataLineTable.empty())
{
std::map<Gtk::Label*, std::pair<Gtk::Entry*, Gtk::Button*> >::iterator iter;
for (iter = m_InputDataLineTable.begin(); iter
!= m_InputDataLineTable.end(); ++iter)
{
delete((*iter).first);
delete((*iter).second.second);
delete((*iter).second.first);
}
}
m_InputDataLineTable.clear();
mp_NameClassLabel->set_label(ClassName);
mp_TreeViewIDs->set_name("");
std::set<int>::iterator it;
for (it = UnitIDs.begin(); it != UnitIDs.end(); it++)
{
Gtk::TreeRow Row = *mref_ListStoreIDs->append();
Row[m_ModelColumnIDs.m_ID] = *it;
m_InputDataNames
= mp_CoreRepos->getUnit(ClassName, *it)->getInputData()->getInputDataNames();
if(m_InputDataNames.empty())
mp_InputDataTable->set_visible(false);
else
{
mp_InputDataTable->resize((m_InputDataNames.size() * 2) - 1, 3);
mp_InputDataTable->set_homogeneous(false);
mp_InputDataTable->set_spacings(5);
int compt = 0;
for (unsigned int i = 0; i < (m_InputDataNames.size() * 2) - 1; i++)
{
if ((i % 2) == 0)
{
Gtk::Label* InputDataLabel = Gtk::manage(
new Gtk::Label(m_InputDataNames[compt]));
mp_InputDataTable->attach(*InputDataLabel, 0, 1, i, i + 1,
Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
Gtk::Entry* InputDataValueEntry = Gtk::manage(new Gtk::Entry());
InputDataValueEntry->set_name(InputDataLabel->get_label());
mp_InputDataTable->attach(*InputDataValueEntry, 1, 2, i, i + 1,
Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
InputDataValueEntry->signal_activate().connect(
sigc::bind<std::string>(
sigc::mem_fun(*this, &Info::onEntryInputDataChanged),
InputDataValueEntry->get_name()));
InputDataValueEntry->signal_focus_out_event().connect(
sigc::bind<std::string>(
sigc::mem_fun(*this, &Info::on_focus_out_event),
InputDataValueEntry->get_name()));
InputDataValueEntry->set_activates_default(true);
Gtk::Button* RestoreDefaultButton = Gtk::manage(
new Gtk::Button(_("Restore"), false));
mp_InputDataTable->attach(*RestoreDefaultButton, 2, 3, i, i + 1,
Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
std::pair<Gtk::Entry*, Gtk::Button*> TempPairEntryButton =
std::make_pair(InputDataValueEntry, RestoreDefaultButton);
m_InputDataLineTable.insert(
std::pair<Gtk::Label*, std::pair<Gtk::Entry*, Gtk::Button*> >(
InputDataLabel, TempPairEntryButton));
InputDataLabel->set_visible(true);
InputDataValueEntry->set_visible(true);
RestoreDefaultButton->set_visible(true);
RestoreDefaultButton->set_sensitive(false);
compt++;
} else
{
mp_InputDataTable->attach(*ToolBox::setHSeparator(), 0, 3, i, i + 1,
Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
}
}
mp_InputDataTable->set_visible(true);
}
}
if(! mref_ListStoreIDs->children().empty())
mp_TreeViewIDs->get_selection()->select(mref_ListStoreIDs->children()[0]);
if (mp_Dialog->run() == Gtk::RESPONSE_OK)
//.........这里部分代码省略.........