CheckButton::CheckButton(Glib::ustring const &label, Glib::ustring const &tooltip, bool active) { set_use_underline (true); set_label (label); set_tooltip_text(tooltip); set_active(active); }
TableofcontentsMenuItem::TableofcontentsMenuItem ( const gnote::Note::Ptr & note, const Glib::ustring & heading, Heading::Type heading_level, int heading_position) : m_note (note) , m_heading_position (heading_position) { //Create a new menu item, with style depending on the heading level: /* +-----------------+ |[] NOTE TITLE | <---- Title == note icon + bold note title | > Heading 1 | <---- Level_1 == arrow icon + heading title | > Heading 1 | | → heading 2 | <---- Level_2 == (no icon) + indent string + heading title | → heading 2 | | → heading 2 | | > Heading 1 | +-----------------+ */ set_use_underline (false); //we don't want potential '_' in the heading to be used as mnemonic if (heading_level == Heading::Title) { set_image(*manage(new Gtk::Image(gnote::IconManager::obj().get_icon(gnote::IconManager::NOTE, 16)))); Gtk::Label *label = (Gtk::Label*)get_child(); label->set_markup("<b>" + heading + "</b>"); } else if (heading_level == Heading::Level_1) { set_image(*manage(new Gtk::Image(Gtk::Stock::GO_FORWARD, Gtk::ICON_SIZE_MENU))); set_label(heading); } else if (heading_level == Heading::Level_2) { set_label("→ " + heading); } }
RadioButton::RadioButton(Glib::ustring const &label, Glib::ustring const &tooltip) { set_use_underline (true); set_label (label); set_tooltip_text(tooltip); }