libgnomeuimm 2.28.0
|
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 Lesser General Public 00017 * License as published by the Free Software Foundation; either 00018 * version 2.1 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 * Lesser General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU Lesser 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 00167 00168 static GType get_base_type() G_GNUC_CONST; 00169 #endif 00170 00172 GnomeDateEdit* gobj() { return reinterpret_cast<GnomeDateEdit*>(gobject_); } 00173 00175 const GnomeDateEdit* gobj() const { return reinterpret_cast<GnomeDateEdit*>(gobject_); } 00176 00177 00178 public: 00179 //C++ methods used to invoke GTK+ virtual functions: 00180 #ifdef GLIBMM_VFUNCS_ENABLED 00181 #endif //GLIBMM_VFUNCS_ENABLED 00182 00183 protected: 00184 //GTK+ Virtual Functions (override these to change behaviour): 00185 #ifdef GLIBMM_VFUNCS_ENABLED 00186 #endif //GLIBMM_VFUNCS_ENABLED 00187 00188 //Default Signal Handlers:: 00189 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00190 virtual void on_date_changed(); 00191 virtual void on_time_changed(); 00192 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00193 00194 00195 private: 00196 00197 00198 public: 00199 DateEdit(time_t, bool show_time = true, bool use_24_format = true); 00200 DateEdit(time_t the_time = 0, DateEditFlags flags = DATE_EDIT_SHOW_TIME); 00201 00202 00203 void set_time(time_t the_time); 00204 00205 time_t get_time() const; 00206 00207 void set_popup_range(int low_hour, int up_hour); 00208 00209 void set_flags(DateEditFlags flags); 00210 00211 DateEditFlags get_flags() const; 00212 00213 time_t get_initial_time() const; 00214 00215 00221 Glib::SignalProxy0< void > signal_date_changed(); 00222 00223 00229 Glib::SignalProxy0< void > signal_time_changed(); 00230 00231 00232 #ifdef GLIBMM_PROPERTIES_ENABLED 00233 00239 Glib::PropertyProxy<gulong> property_time() ; 00240 #endif //#GLIBMM_PROPERTIES_ENABLED 00241 00242 #ifdef GLIBMM_PROPERTIES_ENABLED 00243 00249 Glib::PropertyProxy_ReadOnly<gulong> property_time() const; 00250 #endif //#GLIBMM_PROPERTIES_ENABLED 00251 00252 #ifdef GLIBMM_PROPERTIES_ENABLED 00253 00259 Glib::PropertyProxy<DateEditFlags> property_dateedit_flags() ; 00260 #endif //#GLIBMM_PROPERTIES_ENABLED 00261 00262 #ifdef GLIBMM_PROPERTIES_ENABLED 00263 00269 Glib::PropertyProxy_ReadOnly<DateEditFlags> property_dateedit_flags() const; 00270 #endif //#GLIBMM_PROPERTIES_ENABLED 00271 00272 #ifdef GLIBMM_PROPERTIES_ENABLED 00273 00279 Glib::PropertyProxy<int> property_lower_hour() ; 00280 #endif //#GLIBMM_PROPERTIES_ENABLED 00281 00282 #ifdef GLIBMM_PROPERTIES_ENABLED 00283 00289 Glib::PropertyProxy_ReadOnly<int> property_lower_hour() const; 00290 #endif //#GLIBMM_PROPERTIES_ENABLED 00291 00292 #ifdef GLIBMM_PROPERTIES_ENABLED 00293 00299 Glib::PropertyProxy<int> property_upper_hour() ; 00300 #endif //#GLIBMM_PROPERTIES_ENABLED 00301 00302 #ifdef GLIBMM_PROPERTIES_ENABLED 00303 00309 Glib::PropertyProxy_ReadOnly<int> property_upper_hour() const; 00310 #endif //#GLIBMM_PROPERTIES_ENABLED 00311 00312 #ifdef GLIBMM_PROPERTIES_ENABLED 00313 00319 Glib::PropertyProxy<gulong> property_initial_time() ; 00320 #endif //#GLIBMM_PROPERTIES_ENABLED 00321 00322 #ifdef GLIBMM_PROPERTIES_ENABLED 00323 00329 Glib::PropertyProxy_ReadOnly<gulong> property_initial_time() const; 00330 #endif //#GLIBMM_PROPERTIES_ENABLED 00331 00332 00333 }; 00334 00335 } /* namespace UI */ 00336 } /* namespace Gnome */ 00337 00338 00339 namespace Glib 00340 { 00349 Gnome::UI::DateEdit* wrap(GnomeDateEdit* object, bool take_copy = false); 00350 } //namespace Glib 00351 00352 00353 #endif /* _LIBGNOMEUIMM_DATEEDIT_H */ 00354