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 {
34 struct data;
35
36 public:
38
43
45
50 virtual date_time_picker_format format() const noexcept;
56
59 virtual date_time max_date() const noexcept;
63 virtual date_time_picker& max_date(date_time value);
64
67 virtual date_time min_date() const noexcept;
71 virtual date_time_picker& min_date(date_time value);
72
75 virtual date_time value() const noexcept;
78 virtual date_time_picker& value(date_time value);
80
82
86 static date_time_picker create();
90 static date_time_picker create(const drawing::point& location);
95 static date_time_picker create(const drawing::point& location, const drawing::size& size);
101 static date_time_picker create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
105 static date_time_picker create(const xtd::date_time& value);
110 static date_time_picker create(const xtd::date_time& value, const drawing::point& location);
116 static date_time_picker create(const xtd::date_time& value, const drawing::point& location, const drawing::size& size);
123 static date_time_picker create(const xtd::date_time& value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
128 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date);
134 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location);
141 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location, const drawing::size& size);
149 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::string& name);
155 static date_time_picker create(const xtd::date_time& value, const xtd::date_time& min_date, const xtd::date_time& max_date);
162 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);
170 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);
179 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::string& name);
189 static date_time_picker create(const control& parent);
196 static date_time_picker create(const control& parent, const drawing::point& location);
203 static date_time_picker create(const control& parent, const drawing::point& location, const drawing::size& size);
210 static date_time_picker create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
215 static date_time_picker create(const control& parent, const xtd::date_time& value);
223 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location);
231 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location, const drawing::size& size);
239 static date_time_picker create(const control& parent, const xtd::date_time& value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
245 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date);
254 static date_time_picker create(const control& parent, const xtd::date_time& value, const xtd::date_time& max_date, const drawing::point& location);
263 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);
272 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::string& name);
279 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);
289 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);
299 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);
309 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::string& name);
311
313
325
326 protected:
328
330 forms::create_params create_params() const noexcept override;
331 drawing::color default_back_color() const noexcept override;
332 drawing::color default_fore_color() const noexcept override;
334
336
342 xtd::uptr<xtd::object> clone() const override;
343
346 virtual void on_close_up(const event_args& e);
349 virtual void on_drop_down(const event_args& e);
352 virtual void on_value_changed(const event_args& e);
353
354 void on_handle_created(const event_args& e) override;
355 void wnd_proc(message& message) override;
357
358 private:
359 void wm_nottify_control(message& message);
360 void wm_nottify_control_closeup(message& message);
361 void wm_nottify_control_dropdown(message& message);
362 void wm_nottify_control_datetimechange(message& message);
363
364 xtd::sptr<data> data_;
365 };
366 }
367}
Contains xtd::forms::application class.
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.h:85
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:81
Encapsulates the information needed when creating a control.
Definition create_params.h:29
Represents a picker control that displays available date time along with controls.
Definition date_time_picker.h:33
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:28
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
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
size_t size
Represents a size of any object in bytes.
Definition size.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
date_time_picker_format
Specifies the date and time format the date_time_picker control displays.
Definition date_time_picker_format.h:22
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.