Struct qt_core::MouseButton

source ·
pub struct MouseButton(/* private fields */);
Expand description

This enum type describes the different mouse buttons.

C++ enum: Qt::MouseButton.

C++ documentation:

This enum type describes the different mouse buttons.

Note: Some models of multi-button mice are pre-configured with high-numbered Buttons emulating keyboard sequences, for use in specific games. In order for these Buttons to be seen as actual 'Mouse Buttons', the device must be re-configured (using the vendor's configuration tool).

The MouseButtons type is a typedef for QFlags<MouseButton>. It stores an OR combination of MouseButton values.

See also KeyboardModifier and Modifier.

Implementations§

source§

impl MouseButton

source

pub fn to_int(&self) -> c_int

source§

impl MouseButton

source

pub const NoButton: MouseButton = _

The button state does not refer to any button (see QMouseEvent::button()). (C++ enum variant: NoButton = 0)

source

pub const LeftButton: MouseButton = _

The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.) (C++ enum variant: LeftButton = 1)

source

pub const RightButton: MouseButton = _

The right button. (C++ enum variant: RightButton = 2)

source

pub const MidButton: MouseButton = _

The middle button. (C++ enum variant: MidButton = 4)

source

pub const MiddleButton: MouseButton = _

The middle button. (C++ enum variant: MiddleButton = 4)

source

pub const BackButton: MouseButton = _

The ‘Back’ button. (Typically present on the ‘thumb’ side of a mouse with extra buttons. This is NOT the tilt wheel.) (C++ enum variant: BackButton = 8)

source

pub const XButton1: MouseButton = _

The ‘Back’ Button. (C++ enum variant: XButton1 = 8)

source

pub const ExtraButton1: MouseButton = _

The ‘Back’ Button. (C++ enum variant: ExtraButton1 = 8)

source

pub const ForwardButton: MouseButton = _

The ‘Forward’ Button. (Typically present beside the ‘Back’ button, and also pressed by the thumb.) (C++ enum variant: ForwardButton = 16)

source

pub const XButton2: MouseButton = _

The ’Forward Button. (C++ enum variant: XButton2 = 16)

source

pub const ExtraButton2: MouseButton = _

The ‘Forward’ Button. (C++ enum variant: ExtraButton2 = 16)

source

pub const TaskButton: MouseButton = _

The ‘Task’ Button. (C++ enum variant: TaskButton = 32)

source

pub const ExtraButton3: MouseButton = _

The ‘Task’ Button. (C++ enum variant: ExtraButton3 = 32)

source

pub const ExtraButton4: MouseButton = _

The 7th non-wheel Mouse Button. (C++ enum variant: ExtraButton4 = 64)

source

pub const ExtraButton5: MouseButton = _

The 8th non-wheel Mouse Button. (C++ enum variant: ExtraButton5 = 128)

source

pub const ExtraButton6: MouseButton = _

The 9th non-wheel Mouse Button. (C++ enum variant: ExtraButton6 = 256)

source

pub const ExtraButton7: MouseButton = _

The 10th non-wheel Mouse Button. (C++ enum variant: ExtraButton7 = 512)

source

pub const ExtraButton8: MouseButton = _

The 11th non-wheel Mouse Button. (C++ enum variant: ExtraButton8 = 1024)

source

pub const ExtraButton9: MouseButton = _

The 12th non-wheel Mouse Button. (C++ enum variant: ExtraButton9 = 2048)

source

pub const ExtraButton10: MouseButton = _

The 13th non-wheel Mouse Button. (C++ enum variant: ExtraButton10 = 4096)

source

pub const ExtraButton11: MouseButton = _

The 14th non-wheel Mouse Button. (C++ enum variant: ExtraButton11 = 8192)

source

pub const ExtraButton12: MouseButton = _

The 15th non-wheel Mouse Button. (C++ enum variant: ExtraButton12 = 16384)

source

pub const ExtraButton13: MouseButton = _

The 16th non-wheel Mouse Button. (C++ enum variant: ExtraButton13 = 32768)

source

pub const ExtraButton14: MouseButton = _

The 17th non-wheel Mouse Button. (C++ enum variant: ExtraButton14 = 65536)

source

pub const ExtraButton15: MouseButton = _

The 18th non-wheel Mouse Button. (C++ enum variant: ExtraButton15 = 131072)

source

pub const ExtraButton16: MouseButton = _

The 19th non-wheel Mouse Button. (C++ enum variant: ExtraButton16 = 262144)

source

pub const ExtraButton17: MouseButton = _

The 20th non-wheel Mouse Button. (C++ enum variant: ExtraButton17 = 524288)

source

pub const ExtraButton18: MouseButton = _

The 21st non-wheel Mouse Button. (C++ enum variant: ExtraButton18 = 1048576)

source

pub const ExtraButton19: MouseButton = _

The 22nd non-wheel Mouse Button. (C++ enum variant: ExtraButton19 = 2097152)

source

pub const ExtraButton20: MouseButton = _

The 23rd non-wheel Mouse Button. (C++ enum variant: ExtraButton20 = 4194304)

source

pub const ExtraButton21: MouseButton = _

The 24th non-wheel Mouse Button. (C++ enum variant: ExtraButton21 = 8388608)

source

pub const ExtraButton22: MouseButton = _

The 25th non-wheel Mouse Button. (C++ enum variant: ExtraButton22 = 16777216)

source

pub const ExtraButton23: MouseButton = _

The 26th non-wheel Mouse Button. (C++ enum variant: ExtraButton23 = 33554432)

source

pub const ExtraButton24: MouseButton = _

The 27th non-wheel Mouse Button. (C++ enum variant: ExtraButton24 = 67108864)

source

pub const AllButtons: MouseButton = _

This value corresponds to a mask of all possible mouse buttons. Use to set the ‘acceptedButtons’ property of a MouseArea to accept ALL mouse buttons. (C++ enum variant: AllButtons = 134217727)

source

pub const MaxMouseButton: MouseButton = _

C++ enum variant: MaxMouseButton = 67108864

source

pub const MouseButtonMask: MouseButton = _

C++ enum variant: MouseButtonMask = -1

Trait Implementations§

source§

impl<T: Into<QFlags<MouseButton>>> BitOr<T> for MouseButton

§

type Output = QFlags<MouseButton>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: T) -> QFlags<MouseButton>

Performs the | operation. Read more
source§

impl Clone for MouseButton

source§

fn clone(&self) -> MouseButton

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MouseButton

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<MouseButton> for QFlags<MouseButton>

source§

fn from(value: MouseButton) -> Self

Converts to this type from the input type.
source§

impl From<MouseButton> for c_int

source§

fn from(value: MouseButton) -> Self

Converts to this type from the input type.
source§

impl From<i32> for MouseButton

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for MouseButton

source§

fn eq(&self, other: &MouseButton) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for MouseButton

source§

impl Eq for MouseButton

source§

impl StructuralEq for MouseButton

source§

impl StructuralPartialEq for MouseButton

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.