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 #ifdef GLIBMM_VFUNCS_ENABLED
00117 #endif //GLIBMM_VFUNCS_ENABLED
00118 
00119 protected:
00120   //GTK+ Virtual Functions (override these to change behaviour):
00121 #ifdef GLIBMM_VFUNCS_ENABLED
00122 #endif //GLIBMM_VFUNCS_ENABLED
00123 
00124   //Default Signal Handlers::
00125 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00126 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00127 
00128 
00129 private:
00130 
00131   
00132 public:
00133   App(const Glib::ustring& name);
00134 
00139   App(const Glib::ustring& appname, const Glib::ustring& title);
00140 
00141 /*** From gnome-app.h ***/
00143   
00144   void set_menus(Gtk::MenuBar& menubar);
00145 
00147   
00148   void set_toolbar(Gtk::Toolbar& toolbar);
00149 
00150   
00151   void set_statusbar(Gtk::Widget& statusbar);
00152 
00157   void set_statusbar_custom(Gtk::Container& container, Gtk::Widget& statusbar);
00158 
00160   
00161   void set_contents(Gtk::Widget& contents);
00162 
00163   
00164   void add_toolbar(Gtk::Toolbar& toolbar,
00165                      const Glib::ustring& name,
00166                      BonoboDockItemBehavior behavior,
00167                      BonoboDockPlacement placement,
00168                      int band_num,
00169                      int band_position,
00170                      int offset);
00171 
00172   
00173   Gtk::Widget* add_docked(Gtk::Widget& widget,
00174                      const Glib::ustring& name,
00175                      BonoboDockItemBehavior behavior,
00176                      BonoboDockPlacement placement,
00177                      int band_num,
00178                      int band_position,
00179                      int offset);
00180   //TODO:
00181   
00182   void add_dock_item(BonoboDockItem* item,
00183                                  BonoboDockPlacement placement,
00184                                  int band_num,
00185                                  int band_position,
00186                                  int offset);
00187 
00188   
00189   void enable_layout_config(gboolean enable);
00190 
00191   
00192   BonoboDock* get_dock();
00193 
00194   
00195   BonoboDockItem* get_dock_item_by_name(const Glib::ustring& name);
00196     
00197  
00199    Items::Array<Items::SubTree>& create_menus(const Items::Array<Items::SubTree>& info);
00200 
00205    Items::Array<Items::Info>& insert_menus(const Glib::ustring& path, const Items::Array<Items::Info>& menuinfo);
00206 
00207   
00208   void remove_menus(const Glib::ustring& path, int items);
00209 
00210   
00211   void remove_menu_range(const Glib::ustring& path, int start, int items);
00212 
00217    void install_menu_hints();
00218 
00220    Items::Array<Items::Info>& create_toolbar(const Items::Array<Items::Info>& info);
00221 
00222 
00223 // These are probably not necessary.
00224 // Please tell us if you find any example of their use.
00225 //   static void install_appbar_menu_hints    (const AppBar& app,
00226 //                                             UIInfoTree& menuinfo);
00227 //   static void install_statusbar_menu_hints (const Gtk::Statusbar& bar,
00228 //                                             UIInfoTree& menuinfo);
00229 
00230 
00231 private:
00236   void add(Gtk::Widget&);
00237   
00238   Items::Array<Items::SubTree> menus_;
00239   Items::Array<Items::Info> toolbars_;
00240 
00241   //To store dynamically-added Items::Info,
00242   //because GNOME does not make its own copy of some data.
00243   // e.g. see insert_menus().
00244   std::list< Items::Array<Items::Info> > listUIArray_;
00245 
00246 
00247 };
00248 
00249 } /* namespace UI */
00250 } /* namespace Gnome */
00251 
00252 
00253 namespace Glib
00254 {
00263   Gnome::UI::App* wrap(GnomeApp* object, bool take_copy = false);
00264 } //namespace Glib
00265 
00266 
00267 #endif /* _LIBGNOMEUIMM_APP_H */
00268 

Generated on Fri Sep 14 10:42:53 2007 for libgnomeuimm by  doxygen 1.5.3