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

applet.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBPANELAPPLETMM_APPLET_H
00004 #define _LIBPANELAPPLETMM_APPLET_H
00005 
00006 #include <glibmm.h>
00007 
00008 /* Copyright 2003 libpanelappletmm Development Team
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Library General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Library General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Library General Public
00021  * License along with this library; if not, write to the Free
00022  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00023  */
00024 
00025 
00026 #include <panel-applet.h>
00027 #include <panel-applet-gconf.h>
00028 
00029 #include <libpanelappletmm/enums.h>
00030 #include <gtkmm/eventbox.h>
00031 
00032 #include <glibmm.h>
00033 
00034 #include <gdkmm/color.h>
00035 #include <gdkmm/pixmap.h>
00036 
00037 #include <gconfmm/value.h>
00038 
00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00040 typedef struct _PanelApplet PanelApplet;
00041 typedef struct _PanelAppletClass PanelAppletClass;
00042 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00043 
00044 
00045 namespace Gnome
00046 {
00047 
00048 namespace Panel
00049 { class Applet_Class; } // namespace Panel
00050 
00051 } // namespace Gnome
00052 namespace Gnome
00053 {
00054 
00055 namespace Panel
00056 {
00057 
00058 
00059 class Applet : public Gtk::EventBox
00060 {
00061   public:
00062 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00063   typedef Applet CppObjectType;
00064   typedef Applet_Class CppClassType;
00065   typedef PanelApplet BaseObjectType;
00066   typedef PanelAppletClass BaseClassType;
00067 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00068 
00069   virtual ~Applet();
00070 
00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00072 
00073 private:
00074   friend class Applet_Class;
00075   static CppClassType applet_class_;
00076 
00077   // noncopyable
00078   Applet(const Applet&);
00079   Applet& operator=(const Applet&);
00080 
00081 protected:
00082   explicit Applet(const Glib::ConstructParams& construct_params);
00083   explicit Applet(PanelApplet* castitem);
00084 
00085 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00086 
00087 public:
00088 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00089   static GType get_type()      G_GNUC_CONST;
00090   static GType get_base_type() G_GNUC_CONST;
00091 #endif
00092 
00094   PanelApplet*       gobj()       { return reinterpret_cast<PanelApplet*>(gobject_); }
00095 
00097   const PanelApplet* gobj() const { return reinterpret_cast<PanelApplet*>(gobject_); }
00098 
00099 
00100 public:
00101   //C++ methods used to invoke GTK+ virtual functions:
00102 
00103 protected:
00104   //GTK+ Virtual Functions (override these to change behaviour):
00105 
00106   //Default Signal Handlers::
00107   virtual void on_change_orientation(AppletOrient orient);
00108   virtual void on_change_size(int size);
00109   virtual void on_change_background(AppletBackgroundType type, const Gdk::Color & color, const Glib::RefPtr<const Gdk::Pixmap>& pixmap);
00110   virtual void on_move_focus_out_of_applet(Gtk::DirectionType direction);
00111 
00112 
00113 private:
00114 
00115   
00116 public:
00117  
00118 
00119   Applet();
00120 
00121   
00122   Glib::SignalProxy1< void,AppletOrient > signal_change_orientation();
00123 
00124   
00125   Glib::SignalProxy1< void,int > signal_change_size();
00126 
00127   
00128   Glib::SignalProxy3< void,AppletBackgroundType,const Gdk::Color &,const Glib::RefPtr<const Gdk::Pixmap>& > signal_change_background();
00129 
00130   
00131   Glib::SignalProxy1< void,Gtk::DirectionType > signal_move_focus_out_of_applet();
00132 
00133 
00134   AppletOrient get_orientation() const;
00135   
00136   int get_size() const;
00137   
00138   bool get_locked_down() const;
00139  
00140   //color and pixmap are output variables. TODO: Document this method properly, as if it had been wrapped automaticaly
00141   AppletBackgroundType get_background(Gdk::Color& color, Glib::RefPtr<Gdk::Pixmap>& pixmap) const;
00142   
00143 
00144   Glib::ustring get_preferences_key() const;
00145   
00146   void add_preferences(const Glib::ustring& schema_dir);
00147   
00148   AppletFlags get_flags() const;
00149   
00150   void set_flags(AppletFlags flags);
00151 
00152   void set_size_hints(const Glib::ArrayHandle<int>& size_hints, int base_size);
00153 
00154   
00155   BonoboControl* get_control();
00156   
00157   const BonoboControl* get_control() const;
00158   
00159   BonoboUIComponent* get_popup_component();
00160   
00161   const BonoboUIComponent* get_popup_component() const;
00162   
00163   void setup_menu(const Glib::ArrayHandle<Glib::ustring>& xml, const BonoboUIVerb* verb_list, gpointer user_data);
00164   
00165   void setup_menu(const Glib::ustring& xml, const BonoboUIVerb* verb_list, gpointer user_data);
00166   
00167   void setup_menu(const Glib::ustring& opt_datadir, const Glib::ustring& file, const Glib::ustring& opt_app_name, const BonoboUIVerb* verb_list, gpointer user_data);
00168   
00169   
00170   Glib::ustring gconf_get_full_key(const Glib::ustring& key) const;
00171   
00172   void gconf_set(const Glib::ustring& key, bool the_bool);
00173   
00174   void gconf_set(const Glib::ustring& key, int the_int);
00175   
00176   void gconf_set(const Glib::ustring& key, const Glib::ustring& the_string);
00177   
00178   void gconf_set(const Glib::ustring& key, double the_float);
00179   
00180   void gconf_set(const Glib::ustring& key, const Gnome::Conf::Value& value);
00181   
00182   
00183   bool gconf_get_bool(const Glib::ustring& key) const;
00184   
00185   int gconf_get_int(const Glib::ustring& key) const;
00186   
00187   Glib::ustring gconf_get_string(const Glib::ustring& key) const;
00188   
00189   double gconf_get_float(const Glib::ustring& key) const;
00190   
00191   Gnome::Conf::Value gconf_get_value(const Glib::ustring& key) const;
00192 
00193   //TODO: there has to be a way to do a template function for this, right? -Bryan
00194   //Maybe - look in gconfmm for similar stuff, or even reimplement it if these are convenience functions. murrayc.
00195   void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueBool& list);
00196   void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueInt& list);
00197   void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueString& list);
00198   void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueFloat& list);
00199 
00200   Gnome::Conf::SListHandle_ValueBool   gconf_get_bool_list(const Glib::ustring& key) const;
00201   Gnome::Conf::SListHandle_ValueInt    gconf_get_int_list(const Glib::ustring& key) const;
00202   Gnome::Conf::SListHandle_ValueString gconf_get_string_list(const Glib::ustring& key) const;
00203   Gnome::Conf::SListHandle_ValueFloat  gconf_get_float_list(const Glib::ustring& key) const;
00204 
00209   Glib::PropertyProxy<Glib::ustring> property_name() ;
00210 
00215   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
00216 
00221   Glib::PropertyProxy<int> property_width_request() ;
00222 
00227   Glib::PropertyProxy_ReadOnly<int> property_width_request() const;
00228 
00233   Glib::PropertyProxy<int> property_height_request() ;
00234 
00239   Glib::PropertyProxy_ReadOnly<int> property_height_request() const;
00240 
00245   Glib::PropertyProxy<bool> property_visible() ;
00246 
00251   Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
00252 
00257   Glib::PropertyProxy<bool> property_sensitive() ;
00258 
00263   Glib::PropertyProxy_ReadOnly<bool> property_sensitive() const;
00264 
00269   Glib::PropertyProxy<bool> property_app_paintable() ;
00270 
00275   Glib::PropertyProxy_ReadOnly<bool> property_app_paintable() const;
00276 
00281   Glib::PropertyProxy<bool> property_can_focus() ;
00282 
00287   Glib::PropertyProxy_ReadOnly<bool> property_can_focus() const;
00288 
00293   Glib::PropertyProxy<bool> property_has_focus() ;
00294 
00299   Glib::PropertyProxy_ReadOnly<bool> property_has_focus() const;
00300 
00305   Glib::PropertyProxy<bool> property_is_focus() ;
00306 
00311   Glib::PropertyProxy_ReadOnly<bool> property_is_focus() const;
00312 
00317   Glib::PropertyProxy<bool> property_can_default() ;
00318 
00323   Glib::PropertyProxy_ReadOnly<bool> property_can_default() const;
00324 
00329   Glib::PropertyProxy<bool> property_has_default() ;
00330 
00335   Glib::PropertyProxy_ReadOnly<bool> property_has_default() const;
00336 
00341   Glib::PropertyProxy<bool> property_receives_default() ;
00342 
00347   Glib::PropertyProxy_ReadOnly<bool> property_receives_default() const;
00348 
00353   Glib::PropertyProxy_ReadOnly<bool> property_composite_child() const;
00354 
00355 
00360   Glib::PropertyProxy<bool> property_no_show_all() ;
00361 
00366   Glib::PropertyProxy_ReadOnly<bool> property_no_show_all() const;
00367 
00372   Glib::PropertyProxy<int> property_border_width() ;
00373 
00378   Glib::PropertyProxy_ReadOnly<int> property_border_width() const;
00379 
00384   Glib::PropertyProxy<bool> property_visible_window() ;
00385 
00390   Glib::PropertyProxy_ReadOnly<bool> property_visible_window() const;
00391 
00396   Glib::PropertyProxy<bool> property_above_child() ;
00397 
00402   Glib::PropertyProxy_ReadOnly<bool> property_above_child() const;
00403 
00408   Glib::PropertyProxy<Gtk::Style> property_style() ;
00409 
00414   Glib::PropertyProxy_ReadOnly<Gtk::Style> property_style() const;
00415 
00420   Glib::PropertyProxy<Glib::Object> property_parent() ;
00421 
00426   Glib::PropertyProxy_ReadOnly<Glib::Object> property_parent() const;
00427 
00432   Glib::PropertyProxy_WriteOnly<Glib::Object> property_child() ;
00433 
00438   Glib::PropertyProxy_ReadOnly<Glib::Object> property_child() const;
00439 
00440 
00441 };
00442 
00443 } // namespace Panel
00444 } // namespace Gnome
00445 
00446 
00447 namespace Glib
00448 {
00454   Gnome::Panel::Applet* wrap(PanelApplet* object, bool take_copy = false);
00455 }
00456 #endif /* _LIBPANELAPPLETMM_APPLET_H */
00457 

Generated on Fri Oct 8 17:43:12 2004 for libpanelappletmm by  doxygen 1.3.9