Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

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

Generated on Sun Sep 11 19:04:57 2005 for libgnomeuimm by  doxygen 1.4.4