gtkmm: Gtk::AppChooserWidget Class Reference

gtkmm 3.4.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Related Functions
Gtk::AppChooserWidget Class Reference
Widgets

An application chooser widget that can be embedded in other widgets. More...

Inheritance diagram for Gtk::AppChooserWidget:
[legend]

List of all members.

## Public Member Functions
virtual | ~AppChooserWidget ()
GtkAppChooserWidget* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkAppChooserWidget* | gobj () const
| Provides access to the underlying C GtkObject.
| AppChooserWidget (const Glib::ustring& content_type)
| Creates a new app-chooser widget for applications that can handle content of the given type.
void | set_show_default (bool setting=true)
| Sets whether the app chooser should show the default handler for the content type in a separate section.
bool | get_show_default ()
| Returns the current value of the Gtk::AppChooserWidget::property_show_default() property.
void | set_show_recommended (bool setting=true)
| Sets whether the app chooser should show recommended applications for the content type in a separate section.
bool | get_show_recommended () const
| Returns the current value of the Gtk::AppChooserWidget::property_show_recommended() property.
void | set_show_fallback (bool setting=true)
| Sets whether the app chooser should show related applications for the content type in a separate section.
bool | get_show_fallback () const
| Returns the current value of the Gtk::AppChooserWidget::property_show_fallback() property.
void | set_show_other (bool setting=true)
| Sets whether the app chooser should show applications which are unrelated to the content type.
bool | get_show_other () const
| Returns the current value of the Gtk::AppChooserWidget::property_show_other() property.
void | set_show_all (bool setting=true)
| Sets whether the app chooser should show all applications in a flat list.
bool | get_show_all () const
| Returns the current value of the Gtk::AppChooserWidget::property_show_all() property.
void | set_default_text (const Glib::ustring& text)
| Sets the text that is shown if there are not applications that can handle the content type.
Glib::ustring | get_default_text ()
| Returns the text that is shown if there are not applications that can handle the content type.
Glib::SignalProxy1< void, const Glib::RefPtr < Gio::AppInfo >& > | signal_application_selected ()
Glib::SignalProxy1< void, const Glib::RefPtr < Gio::AppInfo >& > | signal_application_activated ()
Glib::SignalProxy2< void, Menu *, const Glib::RefPtr < Gio::AppInfo >& > | signal_populate_popup ()
Glib::PropertyProxy< bool > | property_show_default ()
| Whether the widget should show the default application.
Glib::PropertyProxy_ReadOnly < bool > | property_show_default () const
| Whether the widget should show the default application.
Glib::PropertyProxy< bool > | property_show_recommended ()
| Whether the widget should show recommended applications.
Glib::PropertyProxy_ReadOnly < bool > | property_show_recommended () const
| Whether the widget should show recommended applications.
Glib::PropertyProxy< bool > | property_show_fallback ()
| Whether the widget should show fallback applications.
Glib::PropertyProxy_ReadOnly < bool > | property_show_fallback () const
| Whether the widget should show fallback applications.
Glib::PropertyProxy< bool > | property_show_other ()
| Whether the widget should show other applications.
Glib::PropertyProxy_ReadOnly < bool > | property_show_other () const
| Whether the widget should show other applications.
Glib::PropertyProxy< bool > | property_show_all ()
| Whether the widget should show all applications.
Glib::PropertyProxy_ReadOnly < bool > | property_show_all () const
| Whether the widget should show all applications.
Glib::PropertyProxy < Glib::ustring > | property_default_text ()
| The default text appearing when there are no applications.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_default_text () const
| The default text appearing when there are no applications.
## Protected Member Functions
virtual void | on_application_selected (const Glib::RefPtr< Gio::AppInfo >& app_info)
| This is a default handler for the signal signal_application_selected().
virtual void | on_application_activated (const Glib::RefPtr< Gio::AppInfo >& app_info)
| This is a default handler for the signal signal_application_activated().
virtual void | on_populate_popup (Menu* menu, const Glib::RefPtr< Gio::AppInfo >& app_info)
| This is a default handler for the signal signal_populate_popup().
## Related Functions
(Note that these are not member functions.)
Gtk::AppChooserWidget* | wrap (GtkAppChooserWidget* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

An application chooser widget that can be embedded in other widgets.

This widget is for selecting applications. It is the main building block for AppChooserDialog. Most applications only need to use the latter, but you can use this widget as part of a larger widget if you have special needs.

The AppChooserWidget widget looks like this:

Since gtkmm 3.0:

## Constructor & Destructor Documentation

virtual Gtk::AppChooserWidget::~AppChooserWidget | ( |  | ) | `[virtual]`

Gtk::AppChooserWidget::AppChooserWidget | ( | const Glib::ustring & | content_type | ) | `[explicit]`

Creates a new app-chooser widget for applications that can handle content of the given type.

Parameters:

  content_type | The content type to show applications for

## Member Function Documentation

Glib::ustring Gtk::AppChooserWidget::get_default_text | ( |  | ) |

Returns the text that is shown if there are not applications that can handle the content type.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_default_text().

bool Gtk::AppChooserWidget::get_show_all | ( |  | ) | const

Returns the current value of the Gtk::AppChooserWidget::property_show_all() property.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_show_all().

bool Gtk::AppChooserWidget::get_show_default | ( |  | ) |

Returns the current value of the Gtk::AppChooserWidget::property_show_default() property.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_show_default().

bool Gtk::AppChooserWidget::get_show_fallback | ( |  | ) | const

Returns the current value of the Gtk::AppChooserWidget::property_show_fallback() property.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_show_fallback().

bool Gtk::AppChooserWidget::get_show_other | ( |  | ) | const

Returns the current value of the Gtk::AppChooserWidget::property_show_other() property.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_show_other().

bool Gtk::AppChooserWidget::get_show_recommended | ( |  | ) | const

Returns the current value of the Gtk::AppChooserWidget::property_show_recommended() property.

Since gtkmm 3.0:

Returns:
  The value of Gtk::AppChooserWidget::property_show_recommended().

GtkAppChooserWidget* Gtk::AppChooserWidget::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::AppChooser.

const GtkAppChooserWidget* Gtk::AppChooserWidget::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::AppChooser.

virtual void Gtk::AppChooserWidget::on_application_activated | ( | const Glib::RefPtr< Gio::AppInfo > & | app_info | ) | `[protected, virtual]`

This is a default handler for the signal signal_application_activated().

virtual void Gtk::AppChooserWidget::on_application_selected | ( | const Glib::RefPtr< Gio::AppInfo > & | app_info | ) | `[protected, virtual]`

This is a default handler for the signal signal_application_selected().

virtual void Gtk::AppChooserWidget::on_populate_popup | ( | Menu* | menu,
|  | const Glib::RefPtr< Gio::AppInfo > & | app_info
| ) |  | `[protected, virtual]`

This is a default handler for the signal signal_populate_popup().

Glib::PropertyProxy< Glib::ustring > Gtk::AppChooserWidget::property_default_text | ( |  | ) |

The default text appearing when there are no applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::AppChooserWidget::property_default_text | ( |  | ) | const

The default text appearing when there are no applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gtk::AppChooserWidget::property_show_all | ( |  | ) |

Whether the widget should show all applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gtk::AppChooserWidget::property_show_all | ( |  | ) | const

Whether the widget should show all applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gtk::AppChooserWidget::property_show_default | ( |  | ) |

Whether the widget should show the default application.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gtk::AppChooserWidget::property_show_default | ( |  | ) | const

Whether the widget should show the default application.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gtk::AppChooserWidget::property_show_fallback | ( |  | ) |

Whether the widget should show fallback applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gtk::AppChooserWidget::property_show_fallback | ( |  | ) | const

Whether the widget should show fallback applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gtk::AppChooserWidget::property_show_other | ( |  | ) |

Whether the widget should show other applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gtk::AppChooserWidget::property_show_other | ( |  | ) | const

Whether the widget should show other applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< bool > Gtk::AppChooserWidget::property_show_recommended | ( |  | ) |

Whether the widget should show recommended applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< bool > Gtk::AppChooserWidget::property_show_recommended | ( |  | ) | const

Whether the widget should show recommended applications.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::AppChooserWidget::set_default_text | ( | const Glib::ustring & | text | ) |

Sets the text that is shown if there are not applications that can handle the content type.

Parameters:

  text | The new value for Gtk::AppChooserWidget::property_default_text().

void Gtk::AppChooserWidget::set_show_all | ( | bool | setting = `true` | ) |

Sets whether the app chooser should show all applications in a flat list.

Since gtkmm 3.0:

Parameters:

  setting | The new value for Gtk::AppChooserWidget::property_show_all().

void Gtk::AppChooserWidget::set_show_default | ( | bool | setting = `true` | ) |

Sets whether the app chooser should show the default handler for the content type in a separate section.

Since gtkmm 3.0:

Parameters:

  setting | The new value for Gtk::AppChooserWidget::property_show_default().

void Gtk::AppChooserWidget::set_show_fallback | ( | bool | setting = `true` | ) |

Sets whether the app chooser should show related applications for the content type in a separate section.

Since gtkmm 3.0:

Parameters:

  setting | The new value for Gtk::AppChooserWidget::property_show_fallback().

void Gtk::AppChooserWidget::set_show_other | ( | bool | setting = `true` | ) |

Sets whether the app chooser should show applications which are unrelated to the content type.

Since gtkmm 3.0:

Parameters:

  setting | The new value for Gtk::AppChooserWidget::property_show_other().

void Gtk::AppChooserWidget::set_show_recommended | ( | bool | setting = `true` | ) |

Sets whether the app chooser should show recommended applications for the content type in a separate section.

Since gtkmm 3.0:

Parameters:

  setting | The new value for Gtk::AppChooserWidget::property_show_recommended().

Glib::SignalProxy1< void,const Glib::RefPtr<Gio::AppInfo>& > Gtk::AppChooserWidget::signal_application_activated | ( |  | ) |

Slot Prototype:
  `void on_my_application_activated(const Glib::RefPtr<Gio::AppInfo>& app_info)`

Emitted when an application item is activated from the widget's list.

This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.

Parameters:

  application | The activated AppInfo.

Glib::SignalProxy1< void,const Glib::RefPtr<Gio::AppInfo>& > Gtk::AppChooserWidget::signal_application_selected | ( |  | ) |

Slot Prototype:
  `void on_my_application_selected(const Glib::RefPtr<Gio::AppInfo>& app_info)`

Emitted when an application item is selected from the widget's list.

Parameters:

  application | The selected AppInfo.

Glib::SignalProxy2< void,Menu*,const Glib::RefPtr<Gio::AppInfo>& > Gtk::AppChooserWidget::signal_populate_popup | ( |  | ) |

Slot Prototype:
  `void on_my_populate_popup(Menu* menu, const Glib::RefPtr<Gio::AppInfo>& app_info)`

Emitted when a context menu is about to popup over an application item. Clients can insert menu items into the provided Gtk::Menu object in the callback of this signal; the context menu will be shown over the item if at least one item has been added to the menu.

Parameters:

  menu | The Gtk::Menu to populate.
  application | The current AppInfo.

## Friends And Related Function Documentation

Gtk::AppChooserWidget* wrap | ( | GtkAppChooserWidget * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  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.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/appchooserwidget.h