libgnomeuimm 2.28.0
app.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMEUIMM_APP_H
4#define _LIBGNOMEUIMM_APP_H
5
6
7#include <glibmm.h>
8
9// -*- C++ -*-
10/* $Id: app.hg,v 1.18 2003/08/27 18:03:20 murrayc Exp $ */
11
12/* app.hg, app.h for libgnomeuimm
13 *
14 * Copyright (C) 2000 The Gtk-- Development Team
15 * Copyright (C) 1998 EMC Capital Management Inc.
16 * Developed by Havoc Pennington <hp@pobox.com>
17 *
18 * Copyright (C) 1999 The Gtk-- Development Team
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This library is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free
32 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 */
34
35#include <gtkmm/window.h>
36//#include <bonobomm/widgets/dock.h>
38#include <libgnomeuimm/types.h>
40
41
42//#include <libgnome/gnome-i18n.h>
43#include <libgnomeui/gnome-app.h>
44#include <libgnomeui/gnome-app-util.h>
45#include <list>
46
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
48typedef struct _GnomeApp GnomeApp;
49typedef struct _GnomeAppClass GnomeAppClass;
50#endif /* DOXYGEN_SHOULD_SKIP_THIS */
51
52
53namespace Gnome
54{
55
56namespace UI
57{ class App_Class; } // namespace UI
58
59} // namespace Gnome
60namespace Gtk
61{
62 class MenuBar;
63 class Toolbar;
64}
65
66namespace Gnome
67{
68
69namespace UI
70{
71
72
73class App : public Gtk::Window
74{
75 public:
76#ifndef DOXYGEN_SHOULD_SKIP_THIS
77 typedef App CppObjectType;
78 typedef App_Class CppClassType;
79 typedef GnomeApp BaseObjectType;
80 typedef GnomeAppClass BaseClassType;
81#endif /* DOXYGEN_SHOULD_SKIP_THIS */
82
83 virtual ~App();
84
85#ifndef DOXYGEN_SHOULD_SKIP_THIS
86
87private:
88 friend class App_Class;
89 static CppClassType app_class_;
90
91 // noncopyable
92 App(const App&);
93 App& operator=(const App&);
94
95protected:
96 explicit App(const Glib::ConstructParams& construct_params);
97 explicit App(GnomeApp* castitem);
98
99#endif /* DOXYGEN_SHOULD_SKIP_THIS */
100
101public:
102#ifndef DOXYGEN_SHOULD_SKIP_THIS
103 static GType get_type() G_GNUC_CONST;
104
105
106 static GType get_base_type() G_GNUC_CONST;
107#endif
108
110 GnomeApp* gobj() { return reinterpret_cast<GnomeApp*>(gobject_); }
111
113 const GnomeApp* gobj() const { return reinterpret_cast<GnomeApp*>(gobject_); }
114
115
116public:
117 //C++ methods used to invoke GTK+ virtual functions:
118#ifdef GLIBMM_VFUNCS_ENABLED
119#endif //GLIBMM_VFUNCS_ENABLED
120
121protected:
122 //GTK+ Virtual Functions (override these to change behaviour):
123#ifdef GLIBMM_VFUNCS_ENABLED
124#endif //GLIBMM_VFUNCS_ENABLED
125
126 //Default Signal Handlers::
127#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
128#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
129
130
131private:
132
133
134public:
135 App(const Glib::ustring& name);
136
141 App(const Glib::ustring& appname, const Glib::ustring& title);
142
143/*** From gnome-app.h ***/
146 void set_menus(Gtk::MenuBar& menubar);
147
148
151 void set_toolbar(Gtk::Toolbar& toolbar);
152
153
154 void set_statusbar(Gtk::Widget& statusbar);
155
156
160 void set_statusbar_custom(Gtk::Container& container, Gtk::Widget& statusbar);
161
162
165 void set_contents(Gtk::Widget& contents);
166
167
168 void add_toolbar(Gtk::Toolbar& toolbar,
169 const Glib::ustring& name,
170 BonoboDockItemBehavior behavior,
171 BonoboDockPlacement placement,
172 int band_num,
173 int band_position,
174 int offset);
175
176
177 Gtk::Widget* add_docked(Gtk::Widget& widget,
178 const Glib::ustring& name,
179 BonoboDockItemBehavior behavior,
180 BonoboDockPlacement placement,
181 int band_num,
182 int band_position,
183 int offset);
184 //TODO:
185
186 void add_dock_item(BonoboDockItem* item,
187 BonoboDockPlacement placement,
188 int band_num,
189 int band_position,
190 int offset);
191
192
193 void enable_layout_config(gboolean enable);
194
195
196 BonoboDock* get_dock();
197
198
199 BonoboDockItem* get_dock_item_by_name(const Glib::ustring& name);
200
201
204
209 Items::Array<Items::Info>& insert_menus(const Glib::ustring& path, const Items::Array<Items::Info>& menuinfo);
210
211
212 void remove_menus(const Glib::ustring& path, int items);
213
214
215 void remove_menu_range(const Glib::ustring& path, int start, int items);
216
222
225
226
227// These are probably not necessary.
228// Please tell us if you find any example of their use.
229// static void install_appbar_menu_hints (const AppBar& app,
230// UIInfoTree& menuinfo);
231// static void install_statusbar_menu_hints (const Gtk::Statusbar& bar,
232// UIInfoTree& menuinfo);
233
234
235private:
240 void add(Gtk::Widget&);
241
244
245 //To store dynamically-added Items::Info,
246 //because GNOME does not make its own copy of some data.
247 // e.g. see insert_menus().
248 std::list< Items::Array<Items::Info> > listUIArray_;
249
250
251};
252
253} /* namespace UI */
254} /* namespace Gnome */
255
256
257namespace Glib
258{
267 Gnome::UI::App* wrap(GnomeApp* object, bool take_copy = false);
268} //namespace Glib
269
270
271#endif /* _LIBGNOMEUIMM_APP_H */
272
Definition: app.h:74
virtual ~App()
Items::Array< Items::Info > & create_toolbar(const Items::Array< Items::Info > &info)
Create toolbar from UI.
void remove_menus(const Glib::ustring &path, int items)
Gnome::UI::App * wrap(GnomeApp *object, bool take_copy=false)
A Glib::wrap() method for this object.
GnomeApp * gobj()
Provides access to the underlying C GtkObject.
Definition: app.h:110
void set_statusbar(Gtk::Widget &statusbar)
void add_dock_item(BonoboDockItem *item, BonoboDockPlacement placement, int band_num, int band_position, int offset)
Items::Array< Items::SubTree > & create_menus(const Items::Array< Items::SubTree > &info)
Create menus from UI.
BonoboDock * get_dock()
const GnomeApp * gobj() const
Provides access to the underlying C GtkObject.
Definition: app.h:113
void set_contents(Gtk::Widget &contents)
Set the contents in the middle.
void set_toolbar(Gtk::Toolbar &toolbar)
Set the toolbar on the bottom.
Gtk::Widget * add_docked(Gtk::Widget &widget, const Glib::ustring &name, BonoboDockItemBehavior behavior, BonoboDockPlacement placement, int band_num, int band_position, int offset)
Items::Array< Items::Info > & insert_menus(const Glib::ustring &path, const Items::Array< Items::Info > &menuinfo)
Insert menu items at the specified path (e.g.
App(const Glib::ustring &name)
void add_toolbar(Gtk::Toolbar &toolbar, const Glib::ustring &name, BonoboDockItemBehavior behavior, BonoboDockPlacement placement, int band_num, int band_position, int offset)
BonoboDockItem * get_dock_item_by_name(const Glib::ustring &name)
App(const Glib::ustring &appname, const Glib::ustring &title)
Create an application.
void install_menu_hints()
Adds hints to status bar.
void enable_layout_config(gboolean enable)
void remove_menu_range(const Glib::ustring &path, int start, int items)
void set_menus(Gtk::MenuBar &menubar)
Set the menubar on the top.
void set_statusbar_custom(Gtk::Container &container, Gtk::Widget &statusbar)
Sets the status bar with container.
Definition: app-helper.h:190
Definition: about.h:306
Definition: about.h:46
Definition: app.h:61