Debian Codegraph @

gtk/src/recentaction.ccg

raw
1 /* Copyright (C) 2003 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
15 */
16
17 #include <gtk/gtk.h>
18
19
20 namespace Gtk
21 {
22
23 _DEPRECATE_IFDEF_START
24 RecentAction::RecentAction(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
25 :
26 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
27 Glib::ObjectBase(nullptr),
28 Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? nullptr : name.c_str(), "stock_id", (stock_id).get_c_str(), "label", label.empty() ? nullptr : label.c_str(), "tooltip", tooltip.empty() ? nullptr : tooltip.c_str(), nullptr))
29 {
30 }
31
32 RecentAction::RecentAction(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip, const Glib::RefPtr<RecentManager>& recent_manager)
33 :
34 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
35 Glib::ObjectBase(nullptr),
36 Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? nullptr : name.c_str(), "stock_id", (stock_id).get_c_str(), "label", label.empty() ? nullptr : label.c_str(), "tooltip", tooltip.empty() ? nullptr : tooltip.c_str(), "recent_manager", Glib::unwrap(recent_manager), nullptr))
37 {
38 }
39 _DEPRECATE_IFDEF_END
40
41 _DEPRECATE_IFDEF_START
42 Glib::RefPtr<RecentAction> RecentAction::create(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip)
43 {
44 return Glib::RefPtr<RecentAction>( new RecentAction(name, StockID(), label, tooltip) );
45 }
46
47 Glib::RefPtr<RecentAction> RecentAction::create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
48 {
49 return Glib::RefPtr<RecentAction>( new RecentAction(name, stock_id, label, tooltip) );
50 }
51
52 Glib::RefPtr<RecentAction> 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)
53 {
54 return Glib::RefPtr<RecentAction>( new RecentAction(name, stock_id, label, tooltip, recent_manager) );
55 }
56 _DEPRECATE_IFDEF_END
57
58 } // namespace Gtk