xtd 0.2.0
date_time_picker.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "application.hpp"
6#include "control.hpp"
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;
64
67 virtual date_time min_date() const noexcept;
72
75 virtual date_time value() const noexcept;
80
82
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);
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);
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);
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);
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);
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);
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);
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.hpp:85
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:21
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::string & name() const noexcept
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
void wnd_proc(message &message) override
Processes Windows messages.
virtual void on_value_changed(const event_args &e)
Raises the date_time_picker::value_changed event.
drawing::color default_fore_color() const noexcept override
Gets the default foreground color of the control.
drawing::color default_back_color() const noexcept override
Gets the default background color of the control.
virtual void on_close_up(const event_args &e)
Raises the date_time_picker::close_up event.
virtual date_time_picker_format format() const noexcept
Gets the format of the date and time displayed in the control.
virtual date_time value() const noexcept
Gets the date/time value assigned to the control.
static date_time_picker create()
A factory to create an xtd::forms::date_time_picker.
virtual date_time max_date() const noexcept
Gets the maximum date and time that can be selected in the control.
date_time_picker()
Initializes a new instance of the date_time_picker class.
virtual void on_drop_down(const event_args &e)
Raises the date_time_picker::drop_down event.
virtual date_time min_date() const noexcept
Gets the minimum date and time that can be selected in the control.
event< date_time_picker, event_handler > drop_down
Occurs when the drop-down calendar is shown.
Definition date_time_picker.hpp:320
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
event< date_time_picker, event_handler > value_changed
Occurs when the value of the value property changes.
Definition date_time_picker.hpp:323
event< date_time_picker, event_handler > close_up
Occurs when the drop-down calendar is dismissed and disappears.
Definition date_time_picker.hpp:317
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
Contains xtd::forms::control control.
Contains xtd::forms::date_time_picker_format enum class.
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
date_time_picker_format
Specifies the date and time format the date_time_picker control displays.
Definition date_time_picker_format.hpp:22
@ e
The E key.
Definition keys.hpp:207
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Implements a Windows message.
Definition message.hpp:33