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