gtkmm 2.24.4

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

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

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions

# Gtk::RecentAction Class Reference
RecentFiles

An action of which represents a list of recently used files. More...

Inheritance diagram for Gtk::RecentAction:
[legend]
Collaboration diagram for Gtk::RecentAction:
[legend]

List of all members.

## Public Member Functions
virtual | ~RecentAction ()
GtkRecentAction* | gobj ()
| Provides access to the underlying C GObject.
const GtkRecentAction* | gobj () const
| Provides access to the underlying C GObject.
GtkRecentAction* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool | get_show_numbers ()
| Returns the value set by Gtk::RecentChooserMenu::set_show_numbers().
void | set_show_numbers (bool show_numbers=true)
| Sets whether a number should be added to the items shown by the widgets representing action.
Glib::PropertyProxy< bool > | property_show_numbers ()
| Whether the items should be displayed with a number.
Glib::PropertyProxy_ReadOnly < bool > | property_show_numbers () const
| Whether the items should be displayed with a number.
## Static Public Member Functions
static Glib::RefPtr< RecentAction > | create ()
static Glib::RefPtr< RecentAction > | create (const Glib::ustring& name, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring())
| Creates an action.
static Glib::RefPtr< RecentAction > | create (const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring())
| Creates an action with a stock ID.
static Glib::RefPtr< RecentAction > | create (const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip, const Glib::RefPtr< RecentManager >& recent_manager)
## Protected Member Functions
| RecentAction ()
| RecentAction (const Glib::ustring& name, const StockID& stock_id=StockID(), const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring())
| RecentAction (const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip, const Glib::RefPtr< RecentManager >& recent_manager)
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gtk::RecentAction > | wrap (GtkRecentAction* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

An action of which represents a list of recently used files.

A Gtk::RecentAction represents a list of recently used files, which can be shown by widgets such as Gtk::RecentChooserDialog or Gtk::RecentChooserMenu. To construct a submenu showing recently used files, use a Gtk::RecentAction as the action for a <menuitem>. To construct a menu toolbutton showing the recently used files in the popup menu, use a Gtk::RecentAction as the action for a <toolitem> element.

See also the methods in the RecentChooser base class.

Since gtkmm 2.12:

## Constructor & Destructor Documentation

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

Gtk::RecentAction::RecentAction | ( |  | ) | `[protected]`

Gtk::RecentAction::RecentAction | ( | const Glib::ustring & | name,
|  | const StockID& | stock_id = `StockID()`,
|  | const Glib::ustring & | label = `Glib::ustring()`,
|  | const Glib::ustring & | tooltip = `Glib::ustring()`
| ) |  | `[explicit, protected]`

Gtk::RecentAction::RecentAction | ( | const Glib::ustring & | name,
|  | const StockID& | stock_id,
|  | const Glib::ustring & | label,
|  | const Glib::ustring & | tooltip,
|  | const Glib::RefPtr< RecentManager >& | recent_manager
| ) |  | `[explicit, protected]`

## Member Function Documentation

static Glib::RefPtr<RecentAction> Gtk::RecentAction::create | ( |  | ) | `[static]`

Reimplemented from Gtk::Action.

static Glib::RefPtr<RecentAction> Gtk::RecentAction::create | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | label = `Glib::ustring()`,
|  | const Glib::ustring & | tooltip = `Glib::ustring()`
| ) |  | `[static]`

Creates an action.

Parameters:

  name | A unique name for the action.
  label | The label displayed in menu items and on buttons.
  tooltip | A tooltip for the action.

Returns:
  A new Action.

Reimplemented from Gtk::Action.

static Glib::RefPtr<RecentAction> Gtk::RecentAction::create | ( | const Glib::ustring & | name,
|  | const Gtk::StockID& | stock_id,
|  | const Glib::ustring & | label = `Glib::ustring()`,
|  | const Glib::ustring & | tooltip = `Glib::ustring()`
| ) |  | `[static]`

Creates an action with a stock ID.

The stock ID is used to set a default icon, text and accelerator for the action.

Parameters:

  name | A unique name for the action.
  stock_id | The stock icon to display in widgets representing the action.
  label | The label displayed in menu items and on buttons.
  tooltip | A tooltip for the action.

Returns:
  A new Action.

Reimplemented from Gtk::Action.

static Glib::RefPtr<RecentAction> Gtk::RecentAction::create | ( | const Glib::ustring & | name,
|  | const Gtk::StockID& | stock_id,
|  | const Glib::ustring & | label,
|  | const Glib::ustring & | tooltip,
|  | const Glib::RefPtr< RecentManager >& | recent_manager
| ) |  | `[static]`

bool Gtk::RecentAction::get_show_numbers | ( |  | ) |

Returns the value set by Gtk::RecentChooserMenu::set_show_numbers().

Since gtkmm 2.12:

Returns:
  `true` if numbers should be shown.

const GtkRecentAction* Gtk::RecentAction::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gtk::Action.

GtkRecentAction* Gtk::RecentAction::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gtk::Action.

GtkRecentAction* Gtk::RecentAction::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gtk::Action.

Glib::PropertyProxy_ReadOnly<bool> Gtk::RecentAction::property_show_numbers | ( |  | ) | const

Whether the items should be displayed with a number.

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::RecentAction::property_show_numbers | ( |  | ) |

Whether the items should be displayed with a number.

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::RecentAction::set_show_numbers | ( | bool | show_numbers = `true` | ) |

Sets whether a number should be added to the items shown by the widgets representing action.

The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first ten items get a number to avoid clashes.

Since gtkmm 2.12:

Parameters:

  show_numbers | `true` if the shown items should be numbered.

## Friends And Related Function Documentation

Glib::RefPtr< Gtk::RecentAction > wrap | ( | GtkRecentAction * | 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/recentaction.h