Struct winsafe::gui::MonthCalendar
source · pub struct MonthCalendar(/* private fields */);
Available on crate feature
gui
only.Expand description
Native month calendar control.
Implementations§
source§impl MonthCalendar
impl MonthCalendar
sourcepub fn new(parent: &impl GuiParent, opts: MonthCalendarOpts) -> Self
pub fn new(parent: &impl GuiParent, opts: MonthCalendarOpts) -> Self
Instantiates a new MonthCalendar
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 MonthCalendar
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 MonthCalendar
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 MonthCalendar
in an event closure.
sourcepub fn date(&self) -> SYSTEMTIME
pub fn date(&self) -> SYSTEMTIME
Retrieves the currently selected date by sending a
mcm::GetCurSel
message.
sourcepub fn set_date(&self, st: &SYSTEMTIME)
pub fn set_date(&self, st: &SYSTEMTIME)
Sets the currently selected date by sending a
mcm::SetCurSel
message.
Trait Implementations§
source§impl Clone for MonthCalendar
impl Clone for MonthCalendar
source§fn clone(&self) -> MonthCalendar
fn clone(&self) -> MonthCalendar
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 MonthCalendar
impl GuiChild for MonthCalendar
source§impl GuiChildFocus for MonthCalendar
impl GuiChildFocus for MonthCalendar
source§fn focus(&self)
fn focus(&self)
In a raw, ordinary window, simply calls
HWND:SetFocus
. Read moresource§impl GuiNativeControl for MonthCalendar
impl GuiNativeControl for MonthCalendar
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<MonthCalendarEvents> for MonthCalendar
impl GuiNativeControlEvents<MonthCalendarEvents> for MonthCalendar
source§fn on(&self) -> &MonthCalendarEvents
fn on(&self) -> &MonthCalendarEvents
Exposes the specific control events. Read more
source§impl GuiWindow for MonthCalendar
impl GuiWindow for MonthCalendar
impl Send for MonthCalendar
Auto Trait Implementations§
impl Freeze for MonthCalendar
impl !RefUnwindSafe for MonthCalendar
impl !Sync for MonthCalendar
impl Unpin for MonthCalendar
impl !UnwindSafe for MonthCalendar
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