![]() |
![]() |
A Gtk::LinkButton is a Gtk::Button with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.
The URI bound to a Gtk::LinkButton can be set specifically using set_uri(), and retrieved using get_uri(). Gtk::LinkButton offers a global hook, which is called when the used clicks on it: see set_uri_hook().
Public Types | |
typedef sigc::slot< void, Gtk::LinkButton*, const Glib::ustring& > | SlotUri |
For instance, void on_linkbutton_uri(Gtk::LinkButton *button, const Glib::ustring& uri);. | |
Public Member Functions | |
Glib::ustring | get_uri () const |
Retrieves the URI set using set_uri(). | |
const GtkLinkButton* | gobj () const |
Provides access to the underlying C GtkObject. | |
GtkLinkButton* | gobj () |
Provides access to the underlying C GtkObject. | |
LinkButton (const Glib::ustring& uri, const Glib::ustring& label) | |
LinkButton (const Glib::ustring& uri) | |
LinkButton () | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_uri () const |
The URI bound to this button. | |
Glib::PropertyProxy<Glib::ustring> | property_uri () |
The URI bound to this button. | |
void | set_uri (const Glib::ustring& uri) |
Sets uri as the URI where the Gtk::LinkButton points. | |
virtual | ~LinkButton () |
Static Public Member Functions | |
static void | set_uri_hook (const SlotUri& slot) |
Sets slot as the function that should be invoked every time a user clicks a LinkButton. | |
static void | unset_uri_hook () |
Unsets any previously set slot as the function that should be invoked every time a user clicks a LinkButton. | |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::LinkButton* | wrap (GtkLinkButton* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
typedef sigc::slot<void, Gtk::LinkButton*, const Glib::ustring&> Gtk::LinkButton::SlotUri |
For instance, void on_linkbutton_uri(Gtk::LinkButton *button, const Glib::ustring& uri);.
virtual Gtk::LinkButton::~LinkButton | ( | ) | [virtual] |
Gtk::LinkButton::LinkButton | ( | ) |
Gtk::LinkButton::LinkButton | ( | const Glib::ustring & | uri | ) | [explicit] |
Gtk::LinkButton::LinkButton | ( | const Glib::ustring & | uri, | |
const Glib::ustring & | label | |||
) | [explicit] |
Glib::ustring Gtk::LinkButton::get_uri | ( | ) | const |
Retrieves the URI set using set_uri().
const GtkLinkButton* Gtk::LinkButton::gobj | ( | ) | const [inline] |
GtkLinkButton* Gtk::LinkButton::gobj | ( | ) | [inline] |
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::LinkButton::property_uri | ( | ) | const |
The URI bound to this button.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> Gtk::LinkButton::property_uri | ( | ) |
The URI bound to this button.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gtk::LinkButton::set_uri | ( | const Glib::ustring & | uri | ) |
static void Gtk::LinkButton::set_uri_hook | ( | const SlotUri& | slot | ) | [static] |
Sets slot as the function that should be invoked every time a user clicks a LinkButton.
This function is called before every signal handler registered for the "clicked" signal.
slot | A function called each time a LinkButton is clicked. |
static void Gtk::LinkButton::unset_uri_hook | ( | ) | [static] |
Unsets any previously set slot as the function that should be invoked every time a user clicks a LinkButton.
Gtk::LinkButton* wrap | ( | GtkLinkButton * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |