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 
00179 protected:
00180   //GTK+ Virtual Functions (override these to change behaviour):
00181 
00182   //Default Signal Handlers::
00183   virtual void on_date_changed();
00184   virtual void on_time_changed();
00185 
00186 
00187 private:
00188 
00189   
00190 public:
00191   DateEdit(time_t, bool show_time = true, bool use_24_format = true);
00192   DateEdit(time_t the_time = 0, DateEditFlags flags = DATE_EDIT_SHOW_TIME);
00193 
00194   
00195   void set_time(time_t the_time);
00196   
00197   time_t get_time() const;
00198   
00199   void set_popup_range(int low_hour, int up_hour);
00200   
00201   void set_flags(DateEditFlags flags);
00202   
00203   DateEditFlags get_flags() const;
00204   
00205   time_t get_initial_time() const;
00206 
00207   
00208   Glib::SignalProxy0< void > signal_date_changed();
00209 
00210   
00211   Glib::SignalProxy0< void > signal_time_changed();
00212 
00213 
00220   Glib::PropertyProxy<gulong> property_time() ;
00221 
00228   Glib::PropertyProxy_ReadOnly<gulong> property_time() const;
00229 
00236   Glib::PropertyProxy<DateEditFlags> property_dateedit_flags() ;
00237 
00244   Glib::PropertyProxy_ReadOnly<DateEditFlags> property_dateedit_flags() const;
00245 
00252   Glib::PropertyProxy<int> property_lower_hour() ;
00253 
00260   Glib::PropertyProxy_ReadOnly<int> property_lower_hour() const;
00261 
00268   Glib::PropertyProxy<int> property_upper_hour() ;
00269 
00276   Glib::PropertyProxy_ReadOnly<int> property_upper_hour() const;
00277 
00284   Glib::PropertyProxy<gulong> property_initial_time() ;
00285 
00292   Glib::PropertyProxy_ReadOnly<gulong> property_initial_time() const;
00293 
00294 
00295 };
00296 
00297 } /* namespace UI */
00298 } /* namespace Gnome */
00299 
00300 
00301 namespace Glib
00302 {
00308   Gnome::UI::DateEdit* wrap(GnomeDateEdit* object, bool take_copy = false);
00309 } //namespace Glib
00310 
00311 
00312 #endif /* _LIBGNOMEUIMM_DATEEDIT_H */
00313 

Generated on Fri Mar 17 09:41:37 2006 for libgnomeuimm by  doxygen 1.4.6