libgnomeuimm  2.28.0
dateedit.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMEUIMM_DATEEDIT_H
4 #define _LIBGNOMEUIMM_DATEEDIT_H
5 
6 
7 #include <glibmm.h>
8 
9 /* $Id: dateedit.hg,v 1.13 2003/05/29 17:13:42 murrayc Exp $ */
10 
11 /* dateedit.hg
12  *
13  * Copyright (C) 1999 The Gtk-- Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Lesser General Public
17  * License as published by the Free Software Foundation; either
18  * version 2.1 of the License, or (at your option) any later version.
19  *
20  * This library is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23  * Lesser General Public License for more details.
24  *
25  * You should have received a copy of the GNU Lesser General Public
26  * License along with this library; if not, write to the Free
27  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28  */
29 
30 #include <time.h>
31 #include <gtkmm/box.h>
32 #include <libgnomeui/gnometypebuiltins.h>
33 #include <libgnomeui/gnome-dateedit.h>
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GnomeDateEdit GnomeDateEdit;
38 typedef struct _GnomeDateEditClass GnomeDateEditClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 namespace Gnome
43 {
44 
45 namespace UI
46 { class DateEdit_Class; } // namespace UI
47 
48 } // namespace Gnome
49 namespace Gnome
50 {
51 
52 namespace UI
53 {
54 
69 {
71  DATE_EDIT_24_HR = 1 << 1,
73 };
74 
77  { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
78 
81  { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
82 
85  { return static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
86 
89  { return static_cast<DateEditFlags>(~static_cast<unsigned>(flags)); }
90 
93  { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
94 
97  { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
98 
101  { return (lhs = static_cast<DateEditFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
102 
103 } // namespace UI
104 
105 } // namespace Gnome
106 
107 
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 namespace Glib
110 {
111 
112 template <>
113 class Value<Gnome::UI::DateEditFlags> : public Glib::Value_Flags<Gnome::UI::DateEditFlags>
114 {
115 public:
116  static GType value_type() G_GNUC_CONST;
117 };
118 
119 } // namespace Glib
120 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
121 
122 
123 namespace Gnome
124 {
125 
126 namespace UI
127 {
128 
129 
135 class DateEdit : public Gtk::HBox
136 {
137  public:
138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
139  typedef DateEdit CppObjectType;
140  typedef DateEdit_Class CppClassType;
141  typedef GnomeDateEdit BaseObjectType;
142  typedef GnomeDateEditClass BaseClassType;
143 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
144 
145  virtual ~DateEdit();
146 
147 #ifndef DOXYGEN_SHOULD_SKIP_THIS
148 
149 private:
150  friend class DateEdit_Class;
151  static CppClassType dateedit_class_;
152 
153  // noncopyable
154  DateEdit(const DateEdit&);
155  DateEdit& operator=(const DateEdit&);
156 
157 protected:
158  explicit DateEdit(const Glib::ConstructParams& construct_params);
159  explicit DateEdit(GnomeDateEdit* castitem);
160 
161 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
162 
163 public:
164 #ifndef DOXYGEN_SHOULD_SKIP_THIS
165  static GType get_type() G_GNUC_CONST;
166 
167 
168  static GType get_base_type() G_GNUC_CONST;
169 #endif
170 
172  GnomeDateEdit* gobj() { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
173 
175  const GnomeDateEdit* gobj() const { return reinterpret_cast<GnomeDateEdit*>(gobject_); }
176 
177 
178 public:
179  //C++ methods used to invoke GTK+ virtual functions:
180 #ifdef GLIBMM_VFUNCS_ENABLED
181 #endif //GLIBMM_VFUNCS_ENABLED
182 
183 protected:
184  //GTK+ Virtual Functions (override these to change behaviour):
185 #ifdef GLIBMM_VFUNCS_ENABLED
186 #endif //GLIBMM_VFUNCS_ENABLED
187 
188  //Default Signal Handlers::
189 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
190  virtual void on_date_changed();
191  virtual void on_time_changed();
192 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
193 
194 
195 private:
196 
197 
198 public:
199  DateEdit(time_t, bool show_time = true, bool use_24_format = true);
200  DateEdit(time_t the_time = 0, DateEditFlags flags = DATE_EDIT_SHOW_TIME);
201 
202 
203  void set_time(time_t the_time);
204 
205  time_t get_time() const;
206 
207  void set_popup_range(int low_hour, int up_hour);
208 
209  void set_flags(DateEditFlags flags);
210 
211  DateEditFlags get_flags() const;
212 
213  time_t get_initial_time() const;
214 
215 
221  Glib::SignalProxy0< void > signal_date_changed();
222 
223 
229  Glib::SignalProxy0< void > signal_time_changed();
230 
231 
232  #ifdef GLIBMM_PROPERTIES_ENABLED
233 
239  Glib::PropertyProxy<gulong> property_time() ;
240 #endif //#GLIBMM_PROPERTIES_ENABLED
241 
242 #ifdef GLIBMM_PROPERTIES_ENABLED
243 
249  Glib::PropertyProxy_ReadOnly<gulong> property_time() const;
250 #endif //#GLIBMM_PROPERTIES_ENABLED
251 
252  #ifdef GLIBMM_PROPERTIES_ENABLED
253 
259  Glib::PropertyProxy<DateEditFlags> property_dateedit_flags() ;
260 #endif //#GLIBMM_PROPERTIES_ENABLED
261 
262 #ifdef GLIBMM_PROPERTIES_ENABLED
263 
269  Glib::PropertyProxy_ReadOnly<DateEditFlags> property_dateedit_flags() const;
270 #endif //#GLIBMM_PROPERTIES_ENABLED
271 
272  #ifdef GLIBMM_PROPERTIES_ENABLED
273 
279  Glib::PropertyProxy<int> property_lower_hour() ;
280 #endif //#GLIBMM_PROPERTIES_ENABLED
281 
282 #ifdef GLIBMM_PROPERTIES_ENABLED
283 
289  Glib::PropertyProxy_ReadOnly<int> property_lower_hour() const;
290 #endif //#GLIBMM_PROPERTIES_ENABLED
291 
292  #ifdef GLIBMM_PROPERTIES_ENABLED
293 
299  Glib::PropertyProxy<int> property_upper_hour() ;
300 #endif //#GLIBMM_PROPERTIES_ENABLED
301 
302 #ifdef GLIBMM_PROPERTIES_ENABLED
303 
309  Glib::PropertyProxy_ReadOnly<int> property_upper_hour() const;
310 #endif //#GLIBMM_PROPERTIES_ENABLED
311 
312  #ifdef GLIBMM_PROPERTIES_ENABLED
313 
319  Glib::PropertyProxy<gulong> property_initial_time() ;
320 #endif //#GLIBMM_PROPERTIES_ENABLED
321 
322 #ifdef GLIBMM_PROPERTIES_ENABLED
323 
329  Glib::PropertyProxy_ReadOnly<gulong> property_initial_time() const;
330 #endif //#GLIBMM_PROPERTIES_ENABLED
331 
332 
333 };
334 
335 } /* namespace UI */
336 } /* namespace Gnome */
337 
338 
339 namespace Glib
340 {
349  Gnome::UI::DateEdit* wrap(GnomeDateEdit* object, bool take_copy = false);
350 } //namespace Glib
351 
352 
353 #endif /* _LIBGNOMEUIMM_DATEEDIT_H */
354