app.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEUIMM_APP_H
00004 #define _LIBGNOMEUIMM_APP_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*-
00010 /* $Id: app.hg,v 1.18 2003/08/27 18:03:20 murrayc Exp $ */
00011 
00012 /* app.hg, app.h for libgnomeuimm
00013  * 
00014  * Copyright (C) 2000 The Gtk-- Development Team
00015  * Copyright (C) 1998 EMC Capital Management Inc.
00016  * Developed by Havoc Pennington <hp@pobox.com>
00017  *
00018  * Copyright (C) 1999 The Gtk-- Development Team
00019  *
00020  * This library is free software; you can redistribute it and/or
00021  * modify it under the terms of the GNU Library General Public
00022  * License as published by the Free Software Foundation; either
00023  * version 2 of the License, or (at your option) any later version.
00024  *
00025  * This library is distributed in the hope that it will be useful,
00026  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00027  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00028  * Library General Public License for more details.
00029  *
00030  * You should have received a copy of the GNU Library General Public
00031  * License along with this library; if not, write to the Free
00032  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00033  */
00034 
00035 #include <gtkmm/window.h>
00036 //#include <bonobomm/widgets/dock.h>
00037 #include <libgnomeuimm/app-helper.h>
00038 #include <libgnomeuimm/types.h>
00039 #include <libgnomeuimm/ui-items-stock.h>
00040 
00041 
00042 //#include <libgnome/gnome-i18n.h>
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 /* DOXYGEN_SHOULD_SKIP_THIS */
00051 
00052 
00053 namespace Gnome
00054 {
00055 
00056 namespace UI
00057 { class App_Class; } // namespace UI
00058 
00059 } // namespace Gnome
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 /* DOXYGEN_SHOULD_SKIP_THIS */
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   // noncopyable
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 /* DOXYGEN_SHOULD_SKIP_THIS */
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   //C++ methods used to invoke GTK+ virtual functions:
00116 
00117 protected:
00118   //GTK+ Virtual Functions (override these to change behaviour):
00119 
00120   //Default Signal Handlers::
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 /*** From gnome-app.h ***/
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   //TODO:
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 // These are probably not necessary.
00218 // Please tell us if you find any example of their use.
00219 //   static void install_appbar_menu_hints    (const AppBar& app,
00220 //                                             UIInfoTree& menuinfo);
00221 //   static void install_statusbar_menu_hints (const Gtk::Statusbar& bar,
00222 //                                             UIInfoTree& menuinfo);
00223 
00224 
00225 private:
00230   void add(Gtk::Widget&);
00231   
00232   Items::Array<Items::SubTree> menus_;
00233   Items::Array<Items::Info> toolbars_;
00234 
00235   //To store dynamically-added Items::Info,
00236   //because GNOME does not make its own copy of some data.
00237   // e.g. see insert_menus().
00238   std::list< Items::Array<Items::Info> > listUIArray_;
00239 
00240 
00241 };
00242 
00243 } /* namespace UI */
00244 } /* namespace Gnome */
00245 
00246 
00247 namespace Glib
00248 {
00254   Gnome::UI::App* wrap(GnomeApp* object, bool take_copy = false);
00255 } //namespace Glib
00256 
00257 
00258 #endif /* _LIBGNOMEUIMM_APP_H */
00259 

Generated on Fri Aug 4 04:56:14 2006 for libgnomeuimm by  doxygen 1.4.7