Struct winsafe::gui::DateTimePicker
source · pub struct DateTimePicker(/* private fields */);
Available on crate feature
gui
only.Expand description
Native date and time picker control.
Implementations§
source§impl DateTimePicker
impl DateTimePicker
sourcepub fn new(parent: &impl GuiParent, opts: DateTimePickerOpts) -> Self
pub fn new(parent: &impl GuiParent, opts: DateTimePickerOpts) -> Self
Instantiates a new DateTimePicker
object, to be created on the parent
window with
HWND::CreateWindowEx
.
§Panics
Panics if the parent window was already created – that is, you cannot
dynamically create a DateTimePicker
in an event closure.
sourcepub fn new_dlg(
parent: &impl GuiParent,
ctrl_id: u16,
resize_behavior: (Horz, Vert)
) -> Self
pub fn new_dlg( parent: &impl GuiParent, ctrl_id: u16, resize_behavior: (Horz, Vert) ) -> Self
Instantiates a new DateTimePicker
object, to be loaded from a dialog
resource with
HWND::GetDlgItem
.
§Panics
Panics if the parent dialog was already created – that is, you cannot
dynamically create a DateTimePicker
in an event closure.
sourcepub fn date(&self, st: &mut SYSTEMTIME)
pub fn date(&self, st: &mut SYSTEMTIME)
Retrieves the currently selected date by sending a
dtm::GetSystemTime
message.
sourcepub fn set_date(&self, st: &SYSTEMTIME)
pub fn set_date(&self, st: &SYSTEMTIME)
Sets the currently selected date by sending a
dtm::SetSystemTime
message.
Trait Implementations§
source§impl Clone for DateTimePicker
impl Clone for DateTimePicker
source§fn clone(&self) -> DateTimePicker
fn clone(&self) -> DateTimePicker
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl GuiChild for DateTimePicker
impl GuiChild for DateTimePicker
source§impl GuiChildFocus for DateTimePicker
impl GuiChildFocus for DateTimePicker
source§fn focus(&self)
fn focus(&self)
In a raw, ordinary window, simply calls
HWND:SetFocus
. Read moresource§impl GuiNativeControl for DateTimePicker
impl GuiNativeControl for DateTimePicker
source§fn on_subclass(&self) -> &WindowEvents
fn on_subclass(&self) -> &WindowEvents
Exposes the subclass events. If at least one event exists, the control
will be
subclassed. Read more
source§impl GuiNativeControlEvents<DateTimePickerEvents> for DateTimePicker
impl GuiNativeControlEvents<DateTimePickerEvents> for DateTimePicker
source§fn on(&self) -> &DateTimePickerEvents
fn on(&self) -> &DateTimePickerEvents
Exposes the specific control events. Read more
source§impl GuiWindow for DateTimePicker
impl GuiWindow for DateTimePicker
impl Send for DateTimePicker
Auto Trait Implementations§
impl !RefUnwindSafe for DateTimePicker
impl !Sync for DateTimePicker
impl Unpin for DateTimePicker
impl !UnwindSafe for DateTimePicker
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more