00001
00002
00003 #ifndef _LIBGNOMEUIMM_APP_H
00004 #define _LIBGNOMEUIMM_APP_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include <gtkmm/window.h>
00036
00037 #include <libgnomeuimm/app-helper.h>
00038 #include <libgnomeuimm/types.h>
00039 #include <libgnomeuimm/ui-items-stock.h>
00040
00041
00042
00043 #include <libgnomeui/gnome-app.h>
00044 #include <libgnomeui/gnome-app-util.h>
00045 #include <list>
00046
00047 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00048 typedef struct _GnomeApp GnomeApp;
00049 typedef struct _GnomeAppClass GnomeAppClass;
00050 #endif
00051
00052
00053 namespace Gnome
00054 {
00055
00056 namespace UI
00057 { class App_Class; }
00058
00059 }
00060 namespace Gtk
00061 {
00062 class MenuBar;
00063 class Toolbar;
00064 }
00065
00066 namespace Gnome
00067 {
00068
00069 namespace UI
00070 {
00071
00072
00073 class App : public Gtk::Window
00074 {
00075 public:
00076 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00077 typedef App CppObjectType;
00078 typedef App_Class CppClassType;
00079 typedef GnomeApp BaseObjectType;
00080 typedef GnomeAppClass BaseClassType;
00081 #endif
00082
00083 virtual ~App();
00084
00085 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00086
00087 private:
00088 friend class App_Class;
00089 static CppClassType app_class_;
00090
00091
00092 App(const App&);
00093 App& operator=(const App&);
00094
00095 protected:
00096 explicit App(const Glib::ConstructParams& construct_params);
00097 explicit App(GnomeApp* castitem);
00098
00099 #endif
00100
00101 public:
00102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00103 static GType get_type() G_GNUC_CONST;
00104 static GType get_base_type() G_GNUC_CONST;
00105 #endif
00106
00108 GnomeApp* gobj() { return reinterpret_cast<GnomeApp*>(gobject_); }
00109
00111 const GnomeApp* gobj() const { return reinterpret_cast<GnomeApp*>(gobject_); }
00112
00113
00114 public:
00115
00116
00117 protected:
00118
00119
00120
00121
00122
00123 private:
00124
00125
00126 public:
00127 App(const Glib::ustring& name);
00128
00133 App(const Glib::ustring& appname, const Glib::ustring& title);
00134
00135
00137
00138 void set_menus(Gtk::MenuBar& menubar);
00139
00141
00142 void set_toolbar(Gtk::Toolbar& toolbar);
00143
00144
00145 void set_statusbar(Gtk::Widget& statusbar);
00146
00151 void set_statusbar_custom(Gtk::Container& container, Gtk::Widget& statusbar);
00152
00154
00155 void set_contents(Gtk::Widget& contents);
00156
00157
00158 void add_toolbar(Gtk::Toolbar& toolbar,
00159 const Glib::ustring& name,
00160 BonoboDockItemBehavior behavior,
00161 BonoboDockPlacement placement,
00162 int band_num,
00163 int band_position,
00164 int offset);
00165
00166
00167 Gtk::Widget* add_docked(Gtk::Widget& widget,
00168 const Glib::ustring& name,
00169 BonoboDockItemBehavior behavior,
00170 BonoboDockPlacement placement,
00171 int band_num,
00172 int band_position,
00173 int offset);
00174
00175
00176 void add_dock_item(BonoboDockItem* item,
00177 BonoboDockPlacement placement,
00178 int band_num,
00179 int band_position,
00180 int offset);
00181
00182
00183 void enable_layout_config(gboolean enable);
00184
00185
00186 BonoboDock* get_dock();
00187
00188
00189 BonoboDockItem* get_dock_item_by_name(const Glib::ustring& name);
00190
00191
00193 Items::Array<Items::SubTree>& create_menus(const Items::Array<Items::SubTree>& info);
00194
00199 Items::Array<Items::Info>& insert_menus(const Glib::ustring& path, const Items::Array<Items::Info>& menuinfo);
00200
00201
00202 void remove_menus(const Glib::ustring& path, int items);
00203
00204
00205 void remove_menu_range(const Glib::ustring& path, int start, int items);
00206
00211 void install_menu_hints();
00212
00214 Items::Array<Items::Info>& create_toolbar(const Items::Array<Items::Info>& info);
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225 private:
00230 void add(Gtk::Widget&);
00231
00232 Items::Array<Items::SubTree> menus_;
00233 Items::Array<Items::Info> toolbars_;
00234
00235
00236
00237
00238 std::list< Items::Array<Items::Info> > listUIArray_;
00239
00240
00241 };
00242
00243 }
00244 }
00245
00246
00247 namespace Glib
00248 {
00254 Gnome::UI::App* wrap(GnomeApp* object, bool take_copy = false);
00255 }
00256
00257
00258 #endif
00259