dateedit.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEUIMM_DATEEDIT_H
00004 #define _LIBGNOMEUIMM_DATEEDIT_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 /* $Id: dateedit.hg,v 1.13 2003/05/29 17:13:42 murrayc Exp $ */
00010 
00011 /* dateedit.hg
00012  * 
00013  * Copyright (C) 1999 The Gtk-- Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <time.h>
00031 #include <gtkmm/box.h>
00032 #include <libgnomeui/gnometypebuiltins.h>
00033 #include <libgnomeui/gnome-dateedit.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GnomeDateEdit GnomeDateEdit;
00038 typedef struct _GnomeDateEditClass GnomeDateEditClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gnome
00043 {
00044 
00045 namespace UI
00046 { class DateEdit_Class; } // namespace UI
00047 
00048 } // namespace Gnome
00049 namespace Gnome
00050 {
00051 
00052 namespace UI
00053 {
00054 
00068 enum DateEditFlags
00069 {
00070   DATE_EDIT_SHOW_TIME = 1 << 0,
00071   DATE_EDIT_24_HR = 1 << 1,
00072   DATE_EDIT_WEEK_STARTS_ON_MONDAY = 1 << 2
00073 };
00074 
00076 inline DateEditFlags operator|(DateEditFlags lhs, DateEditFlags rhs)
00077   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00078 
00080 inline DateEditFlags operator&(DateEditFlags lhs, DateEditFlags rhs)
00081   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00082 
00084 inline DateEditFlags operator^(DateEditFlags lhs, DateEditFlags rhs)
00085   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00086 
00088 inline DateEditFlags operator~(DateEditFlags flags)
00089   { return static_cast<DateEditFlags>(~static_cast<unsigned>(flags)); }
00090 
00092 inline DateEditFlags& operator|=(DateEditFlags& lhs, DateEditFlags rhs)
00093   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00094 
00096 inline DateEditFlags& operator&=(DateEditFlags& lhs, DateEditFlags rhs)
00097   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00098 
00100 inline DateEditFlags& operator^=(DateEditFlags& lhs, DateEditFlags rhs)
00101   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00102 
00103 } // namespace UI
00104 
00105 } // namespace Gnome
00106 
00107 
00108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00109 namespace Glib
00110 {
00111 
00112 template <>
00113 class Value<Gnome::UI::DateEditFlags> : public Glib::Value_Flags<Gnome::UI::DateEditFlags>
00114 {
00115 public:
00116   static GType value_type() G_GNUC_CONST;
00117 };
00118 
00119 } // namespace Glib
00120 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00121 
00122 
00123 namespace Gnome
00124 {
00125 
00126 namespace UI
00127 {
00128 
00129 
00135 class DateEdit : public Gtk::HBox
00136 {
00137   public:
00138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00139   typedef DateEdit CppObjectType;
00140   typedef DateEdit_Class CppClassType;
00141   typedef GnomeDateEdit BaseObjectType;
00142   typedef GnomeDateEditClass BaseClassType;
00143 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00144 
00145   virtual ~DateEdit();
00146 
00147 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00148 
00149 private:
00150   friend class DateEdit_Class;
00151   static CppClassType dateedit_class_;
00152 
00153   // noncopyable
00154   DateEdit(const DateEdit&);
00155   DateEdit& operator=(const DateEdit&);
00156 
00157 protected:
00158   explicit DateEdit(const Glib::ConstructParams& construct_params);
00159   explicit DateEdit(GnomeDateEdit* castitem);
00160 
00161 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00162 
00163 public:
00164 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00165   static GType get_type()      G_GNUC_CONST;
00166   static GType get_base_type() G_GNUC_CONST;
00167 #endif
00168 
00170   GnomeDateEdit*       gobj()       { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
00171 
00173   const GnomeDateEdit* gobj() const { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
00174 
00175 
00176 public:
00177   //C++ methods used to invoke GTK+ virtual functions:
00178 #ifdef GLIBMM_VFUNCS_ENABLED
00179 #endif //GLIBMM_VFUNCS_ENABLED
00180 
00181 protected:
00182   //GTK+ Virtual Functions (override these to change behaviour):
00183 #ifdef GLIBMM_VFUNCS_ENABLED
00184 #endif //GLIBMM_VFUNCS_ENABLED
00185 
00186   //Default Signal Handlers::
00187 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00188   virtual void on_date_changed();
00189   virtual void on_time_changed();
00190 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00191 
00192 
00193 private:
00194 
00195   
00196 public:
00197   DateEdit(time_t, bool show_time = true, bool use_24_format = true);
00198   DateEdit(time_t the_time = 0, DateEditFlags flags = DATE_EDIT_SHOW_TIME);
00199 
00200   
00201   void set_time(time_t the_time);
00202   
00203   time_t get_time() const;
00204   
00205   void set_popup_range(int low_hour, int up_hour);
00206   
00207   void set_flags(DateEditFlags flags);
00208   
00209   DateEditFlags get_flags() const;
00210   
00211   time_t get_initial_time() const;
00212 
00213   
00219   Glib::SignalProxy0< void > signal_date_changed();
00220 
00221   
00227   Glib::SignalProxy0< void > signal_time_changed();
00228 
00229 
00230   #ifdef GLIBMM_PROPERTIES_ENABLED
00231 
00237   Glib::PropertyProxy<gulong> property_time() ;
00238 #endif //#GLIBMM_PROPERTIES_ENABLED
00239 
00240 #ifdef GLIBMM_PROPERTIES_ENABLED
00241 
00247   Glib::PropertyProxy_ReadOnly<gulong> property_time() const;
00248 #endif //#GLIBMM_PROPERTIES_ENABLED
00249 
00250   #ifdef GLIBMM_PROPERTIES_ENABLED
00251 
00257   Glib::PropertyProxy<DateEditFlags> property_dateedit_flags() ;
00258 #endif //#GLIBMM_PROPERTIES_ENABLED
00259 
00260 #ifdef GLIBMM_PROPERTIES_ENABLED
00261 
00267   Glib::PropertyProxy_ReadOnly<DateEditFlags> property_dateedit_flags() const;
00268 #endif //#GLIBMM_PROPERTIES_ENABLED
00269 
00270   #ifdef GLIBMM_PROPERTIES_ENABLED
00271 
00277   Glib::PropertyProxy<int> property_lower_hour() ;
00278 #endif //#GLIBMM_PROPERTIES_ENABLED
00279 
00280 #ifdef GLIBMM_PROPERTIES_ENABLED
00281 
00287   Glib::PropertyProxy_ReadOnly<int> property_lower_hour() const;
00288 #endif //#GLIBMM_PROPERTIES_ENABLED
00289 
00290   #ifdef GLIBMM_PROPERTIES_ENABLED
00291 
00297   Glib::PropertyProxy<int> property_upper_hour() ;
00298 #endif //#GLIBMM_PROPERTIES_ENABLED
00299 
00300 #ifdef GLIBMM_PROPERTIES_ENABLED
00301 
00307   Glib::PropertyProxy_ReadOnly<int> property_upper_hour() const;
00308 #endif //#GLIBMM_PROPERTIES_ENABLED
00309 
00310   #ifdef GLIBMM_PROPERTIES_ENABLED
00311 
00317   Glib::PropertyProxy<gulong> property_initial_time() ;
00318 #endif //#GLIBMM_PROPERTIES_ENABLED
00319 
00320 #ifdef GLIBMM_PROPERTIES_ENABLED
00321 
00327   Glib::PropertyProxy_ReadOnly<gulong> property_initial_time() const;
00328 #endif //#GLIBMM_PROPERTIES_ENABLED
00329 
00330 
00331 };
00332 
00333 } /* namespace UI */
00334 } /* namespace Gnome */
00335 
00336 
00337 namespace Glib
00338 {
00347   Gnome::UI::DateEdit* wrap(GnomeDateEdit* object, bool take_copy = false);
00348 } //namespace Glib
00349 
00350 
00351 #endif /* _LIBGNOMEUIMM_DATEEDIT_H */
00352 

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