예제 #1
0
Gobby::TabLabel::TabLabel(Folder& folder, SessionView& view,
                          const Glib::ustring& active_icon_name):
	Gtk::HBox(false, 6), m_folder(folder), m_view(view),
	m_title(view.get_title()), m_changed(false),
	m_active_icon_name(active_icon_name)
{
	m_title.set_alignment(Gtk::ALIGN_START);

	update_icon();
	update_color();

	m_icon.show();
	m_title.show();
	m_extra.show();
	m_button.show();

	view.signal_active_user_changed().connect(
		sigc::mem_fun(*this, &TabLabel::on_active_user_changed));

	m_notify_status_handle = g_signal_connect(
		G_OBJECT(view.get_session()), "notify::status",
		G_CALLBACK(on_notify_status_static), this);
	m_notify_subscription_group_handle = g_signal_connect(
		G_OBJECT(view.get_session()),
		"notify::subscription-group",
		G_CALLBACK(on_notify_subscription_group_static), this);

	m_folder.signal_document_changed().connect(
		sigc::mem_fun(*this, &TabLabel::on_folder_document_changed));

	pack_start(m_icon, Gtk::PACK_SHRINK);
	pack_start(m_title, Gtk::PACK_SHRINK);
	pack_start(m_extra, Gtk::PACK_EXPAND_WIDGET);
	pack_end(m_button, Gtk::PACK_SHRINK);
}
예제 #2
0
ChoiceWidget:: ChoiceWidget (ChoiceType type, const Choice& choice)
  : _spinButtonAdj (choice._value, -10000.0, 10000.0)
{
  if (type == ANY)
    {
      _toggleButton = manage (new Gtk::CheckButton (choice._choice));
    }
  else
    {
      _toggleButton = manage (new Gtk::RadioButton (_group, choice._choice));
    }
  pack_start (*_toggleButton);
  
  if (choice._takesInt)
    {
      _spinButton = manage (new Gtk::SpinButton (_spinButtonAdj));
      _spinButton->set_numeric ();
      this->setInput ();
      _toggleButton->signal_toggled().connect (SigC::slot (*this, &ChoiceWidget::setInput));
      pack_end (*_spinButton);
    }
  else
    _spinButton = 0;

  show_all ();
}
예제 #3
0
gui::Workspace::Workspace() :
		imageSpace_(), toolBox_(imageSpace_.getOriginalImage(),
				imageSpace_.getCurrentImage()) {
	set_border_width(BORDER_WIDTH);
	pack_start(imageSpace_, true, true);
	pack_end(toolBox_, false, false);
	show_all_children();
}
예제 #4
0
파일: GeneralTab.cpp 프로젝트: Raphy/irc
GeneralTab::GeneralTab(const std::string& title) :
  m_title(title), m_send_button("Send")
{  
  pack_start(m_text_view_container, true, true);
  pack_end(m_cmd_container, false, false);
  m_text_view_container.add(m_text_view);
  m_cmd_container.pack_start(m_cmd_entry);
  m_cmd_container.pack_end(m_send_button, false, false);

  m_text_view.set_editable(false);
  m_text_view.set_wrap_mode(Gtk::WRAP_WORD);

  m_cmd_entry.signal_key_release_event().connect(sigc::mem_fun(*this, &GeneralTab::onKeyReleased));
  this->m_send_button.signal_clicked().connect(sigc::mem_fun(*this, &GeneralTab::sendMessage));
}
예제 #5
0
TemplateWidget::TemplateWidget()
    : _more_info_button(_("More info"))
    , _short_description_label(" ")
    , _template_name_label(_("no template selected"))
    , _effect_prefs(NULL)
{
    pack_start(_template_name_label, Gtk::PACK_SHRINK, 10);
    pack_start(_preview_box, Gtk::PACK_SHRINK, 0);
    
    _preview_box.pack_start(_preview_image, Gtk::PACK_EXPAND_PADDING, 15);
    _preview_box.pack_start(_preview_render, Gtk::PACK_EXPAND_PADDING, 10);
    
    _short_description_label.set_line_wrap(true);

    Gtk::Alignment *align;
    align = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER, 0.0, 0.0));
    pack_end(*align, Gtk::PACK_SHRINK);
    align->add(_more_info_button);
    
    pack_end(_short_description_label, Gtk::PACK_SHRINK, 5);
    
    _more_info_button.signal_clicked().connect(
    sigc::mem_fun(*this, &TemplateWidget::_displayTemplateDetails));
}
예제 #6
0
WidgetChatBubble::WidgetChatBubble(gToxObservable* instance, Toxmm::FriendNr nr, Side left_side)
    : Glib::ObjectBase("WidgetChatLine"), m_side(left_side), m_row_count(0), m_avatar(instance, nr) {

    set_observable(instance);

    set_halign((m_side == LEFT) ? Gtk::Align::ALIGN_START : Gtk::Align::ALIGN_END);
    get_style_context()->add_class((m_side == LEFT) ? "gtox-left" : "gtox-right");

    auto hbox = Gtk::manage(new Gtk::HBox());
    auto frame = Gtk::manage(new Gtk::Frame());
    add(*hbox);
    if (m_side == LEFT) {
        hbox->pack_start(m_avatar);
        m_avatar.set_valign(Gtk::ALIGN_START);
        m_avatar.set_halign(Gtk::ALIGN_END);
    }
    hbox->add(*frame);
    if (m_side == RIGHT) {
        hbox->pack_end(m_avatar);
        m_avatar.set_valign(Gtk::ALIGN_END);
        m_avatar.set_halign(Gtk::ALIGN_START);
    }
    frame->add(m_grid);

    m_avatar.set_name("Avatar");
    m_avatar.set_size_request(0, 0);
    //TODO: replace this, it's deprecated
    m_avatar.property_xalign() = (m_side == LEFT) ? 1 : 0;
    m_avatar.property_yalign() = (m_side == LEFT) ? 1 : 0;
//    m_avatar.set_tooltip_text("TODO Display name here..");
    m_avatar.get_style_context()->add_class("frame");

    frame->get_style_context()->add_class("gtox-bubble");

    show_all();

    m_last_timestamp = 0;

    m_grid.show_all();
}
예제 #7
0
Gobby::StatusBar::StatusBar(Gtk::Window& window,
                            const Folder& folder,
                            const Preferences& preferences):
	Gtk::HBox(false, 2), m_folder(folder), m_preferences(preferences),
	m_visible_messages(0), m_current_view(NULL), m_position_context_id(0)
{
	pack_end(m_bar_position, Gtk::PACK_SHRINK);
	m_bar_position.set_size_request(200, -1);
	m_bar_position.show();

	window.signal_window_state_event().connect(
		sigc::mem_fun(*this, &StatusBar::on_window_state_event));

	m_folder.signal_document_removed().connect(
		sigc::mem_fun(*this, &StatusBar::on_document_removed));
	m_folder.signal_document_changed().connect(
		sigc::mem_fun(*this, &StatusBar::on_document_changed));
	m_preferences.appearance.show_statusbar.signal_changed().connect(
		sigc::mem_fun(*this, &StatusBar::on_view_changed));

	// Initial update
	on_document_changed(m_folder.get_current_document());
	on_view_changed();
}
예제 #8
0
entryBox::entryBox(const std::string & str) : m_label(str) {

	pack_start	(m_label, false, false);
	pack_end	(m_entry, false, false);

}