Struct winsafe::gui::RadioButton
source · pub struct RadioButton(/* private fields */);
Available on crate feature
gui
only.Expand description
Native radio button control.
You cannot directly instantiate this object, you must use
RadioGroup
.
Implementations§
source§impl RadioButton
impl RadioButton
sourcepub fn emulate_click(&self)
pub fn emulate_click(&self)
Emulates the click event for the radio button by sending a
bm::Click
message.
sourcepub fn is_selected(&self) -> bool
pub fn is_selected(&self) -> bool
Tells if this radio button is the currently selected one by sending a
bm::GetCheck
message.
sourcepub fn select(&self, selected: bool)
pub fn select(&self, selected: bool)
Sets the this radio button as the currently selected one by sending a
bm::SetCheck
message.
sourcepub fn select_and_trigger(&self, selected: bool) -> SysResult<()>
pub fn select_and_trigger(&self, selected: bool) -> SysResult<()>
Sets the this radio button as the currently selected one by sending a
bm::SetCheck
message, then sends a
wm::Command
message to the parent, so it
can handle the event.
sourcepub fn set_text_and_resize(&self, text: &str)
pub fn set_text_and_resize(&self, text: &str)
Calls set_text
and resizes
the control to exactly fit the new text.
Trait Implementations§
source§impl Clone for RadioButton
impl Clone for RadioButton
source§fn clone(&self) -> RadioButton
fn clone(&self) -> RadioButton
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 RadioButton
impl GuiChild for RadioButton
source§impl GuiChildFocus for RadioButton
impl GuiChildFocus for RadioButton
source§fn focus(&self)
fn focus(&self)
In a raw, ordinary window, simply calls
HWND:SetFocus
. Read moresource§impl GuiNativeControl for RadioButton
impl GuiNativeControl for RadioButton
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<ButtonEvents> for RadioButton
impl GuiNativeControlEvents<ButtonEvents> for RadioButton
source§fn on(&self) -> &ButtonEvents
fn on(&self) -> &ButtonEvents
Exposes the specific control events. Read more
source§impl GuiWindow for RadioButton
impl GuiWindow for RadioButton
source§impl GuiWindowText for RadioButton
impl GuiWindowText for RadioButton
source§fn set_text(&self, text: &str)
fn set_text(&self, text: &str)
Sets the text by calling
HWND::SetWindowText
.source§fn text(&self) -> String
fn text(&self) -> String
Retrieves the text by calling
HWND::GetWindowText
.impl Send for RadioButton
Auto Trait Implementations§
impl Freeze for RadioButton
impl !RefUnwindSafe for RadioButton
impl !Sync for RadioButton
impl Unpin for RadioButton
impl !UnwindSafe for RadioButton
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