Ardour
9.0-pre0-582-g084a23a80d
tk/ytkmm/ytkmm/gtkmm/menu_elems.h
Go to the documentation of this file.
1
/* $Id$ */
2
#ifndef _GTKMM_MENU_ELEMS_H
3
#define _GTKMM_MENU_ELEMS_H
4
/* menu_elems.h
5
*
6
* Copyright (C) 1998-2002 The gtkmm Development Team
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free
20
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
*/
22
23
#include <
gtkmm/container.h
>
24
#include <
gtkmm/menuitem.h
>
25
#include <
gtkmm/imagemenuitem.h
>
26
#include <
gtkmm/radiomenuitem.h
>
27
#include <
gtkmm/checkmenuitem.h
>
28
#include <
gtkmm/tearoffmenuitem.h
>
29
#include <
gtkmm/separatormenuitem.h
>
30
#include <
gtkmm/accelgroup.h
>
31
#include <
gtkmm/accelkey.h
>
32
#include <
gdk/gdkkeysyms.h
>
33
34
35
namespace
Gtk
36
{
37
38
class
Menu;
39
40
namespace
Menu_Helpers
41
{
42
43
// input class (MenuItem-Factory)
44
45
class
Element
46
{
47
public
:
48
typedef
sigc::slot<void>
CallSlot
;
49
50
Element
();
51
Element
(
MenuItem
& child);
52
~Element
();
53
54
const
Glib::RefPtr<MenuItem>&
get_child
()
const
;
55
56
protected
:
57
58
void
set_child
(
MenuItem
* pChild);
59
void
set_accel_key
(
const
AccelKey
& accel_key);
60
61
//We use a RefPtr to avoid leaks when the manage()d widget never gets added to a container.
62
//TODO: RefPtr is probably meant only for use with a create() method - see the extra reference() in set_child().
63
Glib::RefPtr<MenuItem>
child_
;
64
};
65
75
class
MenuElem
:
public
Element
76
{
77
public
:
78
79
MenuElem
(
MenuItem
& child);
80
85
MenuElem
(
const
Glib::ustring& label,
const
CallSlot
& slot =
CallSlot
());
86
92
MenuElem
(
const
Glib::ustring& label,
const
AccelKey
& key,
93
const
CallSlot
& slot =
CallSlot
());
94
99
MenuElem
(
const
Glib::ustring& label,
Gtk::Menu
& submenu);
100
106
MenuElem
(
const
Glib::ustring& label,
107
const
AccelKey
& key,
108
Gtk::Menu
& submenu);
109
};
110
111
class
SeparatorElem
:
public
Element
112
{
113
public
:
114
SeparatorElem
();
115
};
116
117
class
ImageMenuElem
:
public
Element
118
{
119
public
:
120
ImageMenuElem
(
ImageMenuItem
& child);
121
127
ImageMenuElem
(
const
Glib::ustring& label,
128
Gtk::Widget
& image_widget,
129
const
CallSlot
& slot =
CallSlot
());
130
137
ImageMenuElem
(
const
Glib::ustring& label,
const
AccelKey
& key,
138
Gtk::Widget
& image_widget,
139
const
CallSlot
& slot =
CallSlot
());
140
146
ImageMenuElem
(
const
Glib::ustring& label,
147
Gtk::Widget
& image_widget,
148
Gtk::Menu
& submenu);
149
156
ImageMenuElem
(
const
Glib::ustring& label,
const
AccelKey
& key,
157
Gtk::Widget
& image_widget,
158
Gtk::Menu
& submenu);
159
};
160
161
class
StockMenuElem
:
public
Element
162
{
163
public
:
168
StockMenuElem
(
const
Gtk::StockID
& stock_id,
169
const
CallSlot
& slot =
CallSlot
());
170
176
StockMenuElem
(
const
Gtk::StockID
& stock_id,
177
const
AccelKey
& key,
178
const
CallSlot
& slot =
CallSlot
());
179
184
StockMenuElem
(
const
Gtk::StockID
& stock_id,
185
Gtk::Menu
& submenu);
186
192
StockMenuElem
(
const
Gtk::StockID
& stock_id,
193
const
AccelKey
& key,
194
Gtk::Menu
& submenu);
195
};
196
197
class
CheckMenuElem
:
public
Element
198
{
199
public
:
200
CheckMenuElem
(
CheckMenuItem
& child);
201
206
CheckMenuElem
(
const
Glib::ustring& label,
const
CallSlot
& slot =
CallSlot
());
207
213
CheckMenuElem
(
const
Glib::ustring& label,
const
AccelKey
& key,
214
const
CallSlot
& slot =
CallSlot
());
215
};
216
217
218
class
RadioMenuElem
:
public
Element
219
{
220
public
:
221
RadioMenuElem
(
RadioMenuItem
& child);
222
227
RadioMenuElem
(
RadioMenuItem::Group
&,
const
Glib::ustring& label,
228
const
CallSlot
& slot =
CallSlot
());
229
236
RadioMenuElem
(
RadioMenuItem::Group
& group,
const
Glib::ustring& label,
237
const
AccelKey
& key,
238
const
CallSlot
& slot =
CallSlot
());
239
240
protected
:
241
RadioMenuItem::Group
*
gr_
;
242
};
243
244
class
TearoffMenuElem
:
public
Element
245
{
246
public
:
247
TearoffMenuElem
(
TearoffMenuItem
& child);
248
252
TearoffMenuElem
(
const
CallSlot
& slot =
CallSlot
());
253
258
TearoffMenuElem
(
const
AccelKey
& key,
259
const
CallSlot
& slot =
CallSlot
());
260
};
261
262
}
/* namespace Menu_Helpers */
263
264
}
/* namespace Gtk */
265
266
#endif
//_GTKMM_MENU_ELEMS_H
accelgroup.h
accelkey.h
checkmenuitem.h
Gtk::AccelKey
Definition:
accelkey.h:42
Gtk::CheckMenuItem
Definition:
checkmenuitem.h:53
Gtk::ImageMenuItem
Definition:
imagemenuitem.h:57
Gtk::MenuItem
Definition:
menuitem.h:60
Gtk::Menu_Helpers::CheckMenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:198
Gtk::Menu_Helpers::CheckMenuElem::CheckMenuElem
CheckMenuElem(const Glib::ustring &label, const AccelKey &key, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::CheckMenuElem::CheckMenuElem
CheckMenuElem(const Glib::ustring &label, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::CheckMenuElem::CheckMenuElem
CheckMenuElem(CheckMenuItem &child)
Gtk::Menu_Helpers::Element
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:46
Gtk::Menu_Helpers::Element::Element
Element(MenuItem &child)
Gtk::Menu_Helpers::Element::~Element
~Element()
Gtk::Menu_Helpers::Element::Element
Element()
Gtk::Menu_Helpers::Element::set_child
void set_child(MenuItem *pChild)
Gtk::Menu_Helpers::Element::get_child
const Glib::RefPtr< MenuItem > & get_child() const
Gtk::Menu_Helpers::Element::child_
Glib::RefPtr< MenuItem > child_
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:63
Gtk::Menu_Helpers::Element::set_accel_key
void set_accel_key(const AccelKey &accel_key)
Gtk::Menu_Helpers::Element::CallSlot
sigc::slot< void > CallSlot
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:48
Gtk::Menu_Helpers::ImageMenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:118
Gtk::Menu_Helpers::ImageMenuElem::ImageMenuElem
ImageMenuElem(ImageMenuItem &child)
Gtk::Menu_Helpers::ImageMenuElem::ImageMenuElem
ImageMenuElem(const Glib::ustring &label, const AccelKey &key, Gtk::Widget &image_widget, Gtk::Menu &submenu)
Gtk::Menu_Helpers::ImageMenuElem::ImageMenuElem
ImageMenuElem(const Glib::ustring &label, Gtk::Widget &image_widget, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::ImageMenuElem::ImageMenuElem
ImageMenuElem(const Glib::ustring &label, const AccelKey &key, Gtk::Widget &image_widget, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::ImageMenuElem::ImageMenuElem
ImageMenuElem(const Glib::ustring &label, Gtk::Widget &image_widget, Gtk::Menu &submenu)
Gtk::Menu_Helpers::MenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:76
Gtk::Menu_Helpers::MenuElem::MenuElem
MenuElem(const Glib::ustring &label, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::MenuElem::MenuElem
MenuElem(MenuItem &child)
Gtk::Menu_Helpers::MenuElem::MenuElem
MenuElem(const Glib::ustring &label, const AccelKey &key, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::MenuElem::MenuElem
MenuElem(const Glib::ustring &label, Gtk::Menu &submenu)
Gtk::Menu_Helpers::MenuElem::MenuElem
MenuElem(const Glib::ustring &label, const AccelKey &key, Gtk::Menu &submenu)
Gtk::Menu_Helpers::RadioMenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:219
Gtk::Menu_Helpers::RadioMenuElem::RadioMenuElem
RadioMenuElem(RadioMenuItem::Group &group, const Glib::ustring &label, const AccelKey &key, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::RadioMenuElem::RadioMenuElem
RadioMenuElem(RadioMenuItem &child)
Gtk::Menu_Helpers::RadioMenuElem::gr_
RadioMenuItem::Group * gr_
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:241
Gtk::Menu_Helpers::RadioMenuElem::RadioMenuElem
RadioMenuElem(RadioMenuItem::Group &, const Glib::ustring &label, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::SeparatorElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:112
Gtk::Menu_Helpers::SeparatorElem::SeparatorElem
SeparatorElem()
Gtk::Menu_Helpers::StockMenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:162
Gtk::Menu_Helpers::StockMenuElem::StockMenuElem
StockMenuElem(const Gtk::StockID &stock_id, const AccelKey &key, Gtk::Menu &submenu)
Gtk::Menu_Helpers::StockMenuElem::StockMenuElem
StockMenuElem(const Gtk::StockID &stock_id, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::StockMenuElem::StockMenuElem
StockMenuElem(const Gtk::StockID &stock_id, Gtk::Menu &submenu)
Gtk::Menu_Helpers::StockMenuElem::StockMenuElem
StockMenuElem(const Gtk::StockID &stock_id, const AccelKey &key, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::TearoffMenuElem
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:245
Gtk::Menu_Helpers::TearoffMenuElem::TearoffMenuElem
TearoffMenuElem(const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::TearoffMenuElem::TearoffMenuElem
TearoffMenuElem(const AccelKey &key, const CallSlot &slot=CallSlot())
Gtk::Menu_Helpers::TearoffMenuElem::TearoffMenuElem
TearoffMenuElem(TearoffMenuItem &child)
Gtk::Menu
Definition:
tk/ytkmm/ytkmm/gtkmm/menu.h:59
Gtk::RadioButtonGroup
Definition:
radiobuttongroup.h:48
Gtk::RadioMenuItem
Definition:
radiomenuitem.h:55
Gtk::StockID
Definition:
stockid.h:43
Gtk::TearoffMenuItem
Definition:
tearoffmenuitem.h:54
Gtk::Widget
Definition:
tk/ytkmm/ytkmm/gtkmm/widget.h:336
gdkkeysyms.h
imagemenuitem.h
menuitem.h
Gtk
Definition:
ardour_ui.h:188
radiomenuitem.h
separatormenuitem.h
tearoffmenuitem.h
container.h
libs
tk
ytkmm
ytkmm
gtkmm
menu_elems.h
Generated on Tue Dec 24 2024 06:08:02 for Ardour by
1.9.1