Struct native_windows_gui::Frame
source · [−]pub struct Frame {
pub handle: ControlHandle,
}
Expand description
A frame is a rectangle containing children controls. Frame is implemented as a custom control.
Requires the frame
feature.
Builder parameters:
parent
: Required. The frame parent container.size
: The frame size.position
: The frame position.enabled
: If the frame children can be used by the user.flags
: A combination of the FrameFlags values.ex_flags
: A combination of win32 window extended flags. Unlikeflags
, ex_flags must be used straight from winapi
Control events:
MousePress(_)
: Generic mouse press events on the buttonOnMouseMove
: Generic mouse mouse eventOnMouseWheel
: Generic mouse wheel event
Fields
handle: ControlHandle
Implementations
sourceimpl Frame
impl Frame
pub fn builder() -> FrameBuilder
sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Returns true if the control user can interact with the control, return false otherwise
sourcepub fn set_enabled(&self, v: bool)
pub fn set_enabled(&self, v: bool)
Enable or disable the control
sourcepub fn visible(&self) -> bool
pub fn visible(&self) -> bool
Returns true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
sourcepub fn set_visible(&self, v: bool)
pub fn set_visible(&self, v: bool)
Show or hide the control to the user
sourcepub fn set_position(&self, x: i32, y: i32)
pub fn set_position(&self, x: i32, y: i32)
Sets the position of the button in the parent window
sourcepub fn class_name(&self) -> &'static str
pub fn class_name(&self) -> &'static str
Winapi class name used during control creation
sourcepub fn forced_flags(&self) -> u32
pub fn forced_flags(&self) -> u32
Winapi flags required by the control
Trait Implementations
sourceimpl From<&Frame> for ControlHandle
impl From<&Frame> for ControlHandle
sourceimpl From<&mut Frame> for ControlHandle
impl From<&mut Frame> for ControlHandle
sourceimpl PartialEq<ControlHandle> for Frame
impl PartialEq<ControlHandle> for Frame
sourcefn eq(&self, other: &ControlHandle) -> bool
fn eq(&self, other: &ControlHandle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialEq<Frame> for ControlHandle
impl PartialEq<Frame> for ControlHandle
sourceimpl PartialEq<Frame> for Frame
impl PartialEq<Frame> for Frame
impl Eq for Frame
impl StructuralEq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more