本文整理汇总了C++中ConnectionManager::get_io方法的典型用法代码示例。如果您正苦于以下问题:C++ ConnectionManager::get_io方法的具体用法?C++ ConnectionManager::get_io怎么用?C++ ConnectionManager::get_io使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConnectionManager
的用法示例。
在下文中一共展示了ConnectionManager::get_io方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Gobby::Browser::Browser(Gtk::Window& parent,
StatusBar& status_bar,
ConnectionManager& connection_manager):
m_parent(parent),
m_status_bar(status_bar),
m_connection_manager(connection_manager),
m_expander(_("_Direct Connection"), true),
m_hbox(false, 6),
m_label_hostname(_("Host Name:")),
m_entry_hostname(config_filename("recent_hosts"), 5)
{
m_label_hostname.show();
m_entry_hostname.get_entry()->signal_activate().connect(
sigc::mem_fun(*this, &Browser::on_hostname_activate));
m_entry_hostname.show();
m_hbox.pack_start(m_label_hostname, Gtk::PACK_SHRINK);
m_hbox.pack_start(m_entry_hostname, Gtk::PACK_EXPAND_WIDGET);
m_hbox.show();
m_expander.add(m_hbox);
m_expander.show();
m_expander.property_expanded().signal_changed().connect(
sigc::mem_fun(*this, &Browser::on_expanded_changed));
m_browser_store = inf_gtk_browser_store_new(
connection_manager.get_io(),
connection_manager.get_communication_manager());
m_sort_model = inf_gtk_browser_model_sort_new(
INF_GTK_BROWSER_MODEL(m_browser_store));
gtk_tree_sortable_set_default_sort_func(
GTK_TREE_SORTABLE(m_sort_model), compare_func, NULL, NULL);
if(m_connection_manager.get_discovery() != NULL)
{
inf_gtk_browser_store_add_discovery(
m_browser_store,
m_connection_manager.get_discovery());
}
Glib::ustring known_hosts_file = config_filename("known_hosts");
m_cert_checker = inf_gtk_certificate_manager_new(
parent.gobj(), m_connection_manager.get_xmpp_manager(),
known_hosts_file.c_str());
m_browser_view =
INF_GTK_BROWSER_VIEW(
inf_gtk_browser_view_new_with_model(
INF_GTK_BROWSER_MODEL(m_sort_model)));
gtk_widget_show(GTK_WIDGET(m_browser_view));
gtk_container_add(GTK_CONTAINER(m_scroll.gobj()),
GTK_WIDGET(m_browser_view));
m_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
m_scroll.set_shadow_type(Gtk::SHADOW_IN);
m_scroll.show();
g_signal_connect(
m_browser_store,
"set-browser",
G_CALLBACK(&on_set_browser_static),
this
);
g_signal_connect(
m_browser_view,
"activate",
G_CALLBACK(&on_activate_static),
this
);
set_spacing(6);
pack_start(m_scroll, Gtk::PACK_EXPAND_WIDGET);
pack_start(m_expander, Gtk::PACK_SHRINK);
init_accessibility();
set_focus_child(m_expander);
}