xtd 0.2.0
Loading...
Searching...
No Matches
date_time_picker.h
Go to the documentation of this file.
1
4#pragma once
5#include "application.h"
6#include "control.h"
8#include <xtd/chrono>
9#include <xtd/date_time>
10
12namespace xtd {
14 namespace forms {
32 struct data;
33
34 public:
36
41
43
48 virtual date_time_picker_format format() const noexcept;
54
57 virtual date_time max_date() const noexcept;
61 virtual date_time_picker& max_date(date_time value);
62
65 virtual date_time min_date() const noexcept;
69 virtual date_time_picker& min_date(date_time value);
70
73 virtual date_time value() const noexcept;
76 virtual date_time_picker& value(date_time value);
78
80
84 static date_time_picker create();
88 static date_time_picker create(const drawing::point& location);
93 static date_time_picker create(const drawing::point& location, const drawing::size& size);
99 static date_time_picker create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
103 static date_time_picker create(const xtd::date_time& value);
108 static date_time_picker create(const xtd::date_time& value, const drawing::point& location);
114 static date_time_picker create(const xtd::date_time& value, const drawing::point& location, const drawing::size& size);
121 static date_time_picker create(const xtd::date_time& value, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
126 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date);
132 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location);
139 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size);
147 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
153 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date);
160 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location);
168 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size);
177 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
187 static date_time_picker create(const control& parent);
194 static date_time_picker create(const control& parent, const drawing::point& location);
201 static date_time_picker create(const control& parent, const drawing::point& location, const drawing::size& size);
208 static date_time_picker create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
213 static date_time_picker create(const control& parent, const xtd::date_time& value);
221 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location);
229 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location, const drawing::size& size);
237 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
243 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date);
252 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location);
261 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size);
270 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
277 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date);
287 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location);
297 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size);
307 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
309
311
323
324 protected:
326
328 forms::create_params create_params() const noexcept override;
329 drawing::color default_back_color() const noexcept override;
330 drawing::color default_fore_color() const noexcept override;
332
334
340 std::unique_ptr<xtd::object> clone() const override;
341
344 virtual void on_close_up(const event_args& e);
347 virtual void on_drop_down(const event_args& e);
350 virtual void on_value_changed(const event_args& e);
351
352 void on_handle_created(const event_args& e) override;
353 void wnd_proc(message& message) override;
355
356 private:
357 void wm_nottify_control(message& message);
358 void wm_nottify_control_closeup(message& message);
359 void wm_nottify_control_dropdown(message& message);
360 void wm_nottify_control_datetimechange(message& message);
361
362 std::shared_ptr<data> data_;
363 };
364 }
365}
Contains xtd::forms::application class.
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.h:79
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Represents a picker control that displays available date time along with controls.
Definition date_time_picker.h:31
virtual date_time_picker_format format() const noexcept
Gets the format of the date and time displayed in the control.
date_time_picker()
Initializes a new instance of the date_time_picker class.
Implements a Windows message.
Definition message.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains xtd::forms::date_time_picker_format enum class.
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
date_time_picker_format
Specifies the date and time format the date_time_picker control displays.
Definition date_time_picker_format.h:20
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::control class.