#[repr(u32)]pub enum PointerButton {
Show 32 variants
Primary = 1,
Secondary = 2,
Auxiliary = 4,
X1 = 8,
X2 = 16,
PenEraser = 32,
B7 = 64,
B8 = 128,
B9 = 256,
B10 = 512,
B11 = 1_024,
B12 = 2_048,
B13 = 4_096,
B14 = 8_192,
B15 = 16_384,
B16 = 32_768,
B17 = 65_536,
B18 = 131_072,
B19 = 262_144,
B20 = 524_288,
B21 = 1_048_576,
B22 = 2_097_152,
B23 = 4_194_304,
B24 = 8_388_608,
B25 = 16_777_216,
B26 = 33_554_432,
B27 = 67_108_864,
B28 = 134_217_728,
B29 = 268_435_456,
B30 = 536_870_912,
B31 = 1_073_741_824,
B32 = 2_147_483_648,
}
Expand description
Describes a button of a pointer input device, such as a mouse or stylus pen.
B7..B32 exist for the purpose of supporting pointer devices with large numbers of buttons. These exotic pointer buttons top out around the 24 buttons range in practice, and Windows doesn’t support more than 32 mouse buttons in most APIs, therefore 32 was chosen as the upper limit.
Variants§
Primary = 1
Primary button, commonly the left mouse button, touch contact, pen contact.
Secondary = 2
Secondary button, commonly the right mouse button, pen barrel button.
Auxiliary = 4
Auxiliary button, commonly the middle mouse button.
X1 = 8
X1 (back) Mouse.
X2 = 16
X2 (forward) Mouse.
PenEraser = 32
Pen erase button.
B7 = 64
Button 7.
B8 = 128
Button 8.
B9 = 256
Button 9.
B10 = 512
Button 10.
B11 = 1_024
Button 11.
B12 = 2_048
Button 12.
B13 = 4_096
Button 13.
B14 = 8_192
Button 14.
B15 = 16_384
Button 15.
B16 = 32_768
Button 16.
B17 = 65_536
Button 17.
B18 = 131_072
Button 18.
B19 = 262_144
Button 19.
B20 = 524_288
Button 20.
B21 = 1_048_576
Button 21.
B22 = 2_097_152
Button 22.
B23 = 4_194_304
Button 23.
B24 = 8_388_608
Button 24.
B25 = 16_777_216
Button 25.
B26 = 33_554_432
Button 26.
B27 = 67_108_864
Button 27.
B28 = 134_217_728
Button 28.
B29 = 268_435_456
Button 29.
B30 = 536_870_912
Button 30.
B31 = 1_073_741_824
Button 31.
B32 = 2_147_483_648
Button 32.
Trait Implementations§
Source§impl BitOr<PointerButton> for PointerButtons
impl BitOr<PointerButton> for PointerButtons
Source§type Output = PointerButtons
type Output = PointerButtons
|
operator.Source§fn bitor(self, rhs: PointerButton) -> Self
fn bitor(self, rhs: PointerButton) -> Self
|
operation. Read moreSource§impl BitOr for PointerButton
impl BitOr for PointerButton
Source§impl BitOrAssign<PointerButton> for PointerButtons
impl BitOrAssign<PointerButton> for PointerButtons
Source§fn bitor_assign(&mut self, rhs: PointerButton)
fn bitor_assign(&mut self, rhs: PointerButton)
|=
operation. Read moreSource§impl Clone for PointerButton
impl Clone for PointerButton
Source§fn clone(&self) -> PointerButton
fn clone(&self) -> PointerButton
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more