/* $Id: recentaction.hg,v 1.5 2004/07/01 08:55:45 murrayc Exp $ */

/* Copyright (C) 2003 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/action.h>
#include <gtkmm/recentmanager.h>
#include <gtkmm/stockid.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/action_p.h)


namespace Gtk
{

/** 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. 
 *
 * @newin2p12
 *
 * @ingroup RecentFiles
 */
class RecentAction : public Gtk::Action
{
  _CLASS_GOBJECT(RecentAction, GtkRecentAction, GTK_RECENT_ACTION, Gtk::Action, GtkAction)

protected:
  //TODO: See bug #450032: _CTOR_DEFAULT()
  _WRAP_CTOR(RecentAction(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip = Glib::ustring(), const Gtk::StockID& stock_id = Gtk::StockID()), gtk_recent_action_new)
  _WRAP_CTOR(RecentAction(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip, const Gtk::StockID& stock_id, const Glib::RefPtr<RecentManager>& manager), gtk_recent_action_new_for_manager )

public:
  //TODO: See bug #450032: _WRAP_CREATE()
  _WRAP_CREATE(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip = Glib::ustring(), const Gtk::StockID& stock_id = Gtk::StockID())
  _WRAP_CREATE(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip, const Gtk::StockID& stock_id, const Glib::RefPtr<RecentManager>& manager)

  _WRAP_METHOD(bool get_show_numbers(), gtk_recent_action_get_show_numbers)
  _WRAP_METHOD(void set_show_numbers(bool show_numbers = true), gtk_recent_action_set_show_numbers)

  _WRAP_PROPERTY("show-numbers", bool)          
};

} // namespace Gtk

