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

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 #include <glibmm.h>
00007 
00008 /* $Id: dateedit.hg,v 1.13 2003/05/29 17:13:42 murrayc Exp $ */
00009 
00010 /* dateedit.hg
00011  * 
00012  * Copyright (C) 1999 The Gtk-- Development Team
00013  *
00014  * This library is free software; you can redistribute it and/or
00015  * modify it under the terms of the GNU Library General Public
00016  * License as published by the Free Software Foundation; either
00017  * version 2 of the License, or (at your option) any later version.
00018  *
00019  * This library is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  * Library General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Library General Public
00025  * License along with this library; if not, write to the Free
00026  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00027  */
00028 
00029 #include <time.h>
00030 #include <gtkmm/box.h>
00031 #include <libgnomeui/gnometypebuiltins.h>
00032 #include <libgnomeui/gnome-dateedit.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GnomeDateEdit GnomeDateEdit;
00037 typedef struct _GnomeDateEditClass GnomeDateEditClass;
00038 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00039 
00040 
00041 namespace Gnome
00042 {
00043 
00044 namespace UI
00045 { class DateEdit_Class; } // namespace UI
00046 
00047 } // namespace Gnome
00048 namespace Gnome
00049 {
00050 
00051 namespace UI
00052 {
00053 
00067 enum DateEditFlags
00068 {
00069   DATE_EDIT_SHOW_TIME = 1 << 0,
00070   DATE_EDIT_24_HR = 1 << 1,
00071   DATE_EDIT_WEEK_STARTS_ON_MONDAY = 1 << 2
00072 };
00073 
00075 inline DateEditFlags operator|(DateEditFlags lhs, DateEditFlags rhs)
00076   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00077 
00079 inline DateEditFlags operator&(DateEditFlags lhs, DateEditFlags rhs)
00080   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00081 
00083 inline DateEditFlags operator^(DateEditFlags lhs, DateEditFlags rhs)
00084   { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00085 
00087 inline DateEditFlags operator~(DateEditFlags flags)
00088   { return static_cast<DateEditFlags>(~static_cast<unsigned>(flags)); }
00089 
00091 inline DateEditFlags& operator|=(DateEditFlags& lhs, DateEditFlags rhs)
00092   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00093 
00095 inline DateEditFlags& operator&=(DateEditFlags& lhs, DateEditFlags rhs)
00096   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00097 
00099 inline DateEditFlags& operator^=(DateEditFlags& lhs, DateEditFlags rhs)
00100   { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00101 
00102 } // namespace UI
00103 
00104 } // namespace Gnome
00105 
00106 
00107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00108 namespace Glib
00109 {
00110 
00111 template <>
00112 class Value<Gnome::UI::DateEditFlags> : public Glib::Value_Flags<Gnome::UI::DateEditFlags>
00113 {
00114 public:
00115   static GType value_type() G_GNUC_CONST;
00116 };
00117 
00118 } // namespace Glib
00119 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00120 
00121 
00122 namespace Gnome
00123 {
00124 
00125 namespace UI
00126 {
00127 
00128 
00134 class DateEdit : public Gtk::HBox
00135 {
00136   public:
00137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00138   typedef DateEdit CppObjectType;
00139   typedef DateEdit_Class CppClassType;
00140   typedef GnomeDateEdit BaseObjectType;
00141   typedef GnomeDateEditClass BaseClassType;
00142 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00143 
00144   virtual ~DateEdit();
00145 
00146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00147 
00148 private:
00149   friend class DateEdit_Class;
00150   static CppClassType dateedit_class_;
00151 
00152   // noncopyable
00153   DateEdit(const DateEdit&);
00154   DateEdit& operator=(const DateEdit&);
00155 
00156 protected:
00157   explicit DateEdit(const Glib::ConstructParams& construct_params);
00158   explicit DateEdit(GnomeDateEdit* castitem);
00159 
00160 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00161 
00162 public:
00163 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00164   static GType get_type()      G_GNUC_CONST;
00165   static GType get_base_type() G_GNUC_CONST;
00166 #endif
00167 
00169   GnomeDateEdit*       gobj()       { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
00170 
00172   const GnomeDateEdit* gobj() const { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
00173 
00174 
00175 public:
00176   //C++ methods used to invoke GTK+ virtual functions:
00177 
00178 protected:
00179   //GTK+ Virtual Functions (override these to change behaviour):
00180 
00181   //Default Signal Handlers::
00182   virtual void on_date_changed();
00183   virtual void on_time_changed();
00184 
00185 
00186 private:
00187 
00188   
00189 public:
00190   DateEdit(time_t, bool show_time = true, bool use_24_format = true);
00191   DateEdit(time_t the_time = 0, DateEditFlags flags = DATE_EDIT_SHOW_TIME);
00192 
00193   
00194   void set_time(time_t the_time);
00195   
00196   time_t get_time() const;
00197   
00198   void set_popup_range(int low_hour, int up_hour);
00199   
00200   void set_flags(DateEditFlags flags);
00201   
00202   DateEditFlags get_flags() const;
00203   
00204   time_t get_initial_time() const;
00205 
00206   
00211   Glib::SignalProxy0<void> signal_date_changed();
00212 
00213   
00218   Glib::SignalProxy0<void> signal_time_changed();
00219 
00220 
00226 Glib::PropertyProxy<gulong> property_time();
00227 
00233 Glib::PropertyProxy<DateEditFlags> property_dateedit_flags();
00234 
00240 Glib::PropertyProxy<int> property_lower_hour();
00241 
00247 Glib::PropertyProxy<int> property_upper_hour();
00248 
00254 Glib::PropertyProxy<gulong> property_initial_time();
00255 
00256 
00257 };
00258 
00259 } /* namespace UI */
00260 } /* namespace Gnome */
00261 
00262 namespace Glib
00263 {
00265   Gnome::UI::DateEdit* wrap(GnomeDateEdit* object, bool take_copy = false);
00266 }
00267 #endif /* _LIBGNOMEUIMM_DATEEDIT_H */
00268 

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