pcl::visualization::MouseEvent Class Reference

`#include <pcl/visualization/mouse_event.h>`

## Public Types

enum | Type { MouseMove = 1, MouseButtonPress, MouseButtonRelease, MouseScrollDown, MouseScrollUp, MouseDblClick }
enum | MouseButton { NoButton = 0, LeftButton, MiddleButton, RightButton, VScroll }

## Public Member Functions

| MouseEvent (const Type &type, const MouseButton &button, unsigned int x, unsigned int y, bool alt, bool ctrl, bool shift, bool selection_mode=false)
| Constructor. More...
const Type & | getType () const
void | setType (const Type &type)
| Sets the mouse event type. More...
const MouseButton & | getButton () const
void | setButton (const MouseButton &button)
| Set the button that caused the event. More...
unsigned int | getX () const
unsigned int | getY () const
unsigned int | getKeyboardModifiers () const
bool | getSelectionMode () const

## Protected Attributes

Type | type_
MouseButton | button_
unsigned int | pointer_x_
unsigned int | pointer_y_
unsigned int | key_state_
bool | selection_mode_

## Detailed Description

Definition at line 48 of file mouse_event.h.

## Member Enumeration Documentation

## MouseButton

enum pcl::visualization::MouseEvent::MouseButton

Enumerator
NoButton |
LeftButton |
MiddleButton |
RightButton |
VScroll |

Definition at line 61 of file mouse_event.h.

## Type

enum pcl::visualization::MouseEvent::Type

Enumerator
MouseMove |
MouseButtonPress |
MouseButtonRelease |
MouseScrollDown |
MouseScrollUp |
MouseDblClick |

Definition at line 51 of file mouse_event.h.

## Constructor & Destructor Documentation

## MouseEvent()

pcl::visualization::MouseEvent::MouseEvent | ( | const Type & | type,
|  | const MouseButton & | button,
|  | unsigned int | x,
|  | unsigned int | y,
|  | bool | alt,
|  | bool | ctrl,
|  | bool | shift,
|  | bool | selection_mode = `false`
| ) |  |

inline

Constructor.

Parameters

  [in] | type | event type
  [in] | button | The Button that causes the event
  [in] | x | x position of mouse pointer at that time where event got fired
  [in] | y | y position of mouse pointer at that time where event got fired
  [in] | alt | whether the ALT key was pressed at that time where event got fired
  [in] | ctrl | whether the CTRL key was pressed at that time where event got fired
  [in] | shift | whether the Shift key was pressed at that time where event got fired
  [in] | selection_mode | whether we are in selection mode

Definition at line 140 of file mouse_event.h.

References pcl::visualization::KeyboardEvent::Alt, pcl::visualization::KeyboardEvent::Ctrl, key_state_, and pcl::visualization::KeyboardEvent::Shift.

## Member Function Documentation

## getButton()

const MouseEvent::MouseButton & pcl::visualization::MouseEvent::getButton | ( |  | ) | const

inline

Returns
  the Button that caused the action

Definition at line 174 of file mouse_event.h.

References button_.

## getKeyboardModifiers()

unsigned int pcl::visualization::MouseEvent::getKeyboardModifiers | ( |  | ) | const

inline

Returns
  returns the keyboard modifiers state at that time where the event got fired

Definition at line 198 of file mouse_event.h.

References key_state_.

## getSelectionMode()

bool pcl::visualization::MouseEvent::getSelectionMode | ( |  | ) | const

inline

Returns
  selection mode status

Definition at line 204 of file mouse_event.h.

References selection_mode_.

## getType()

const MouseEvent::Type & pcl::visualization::MouseEvent::getType | ( |  | ) | const

inline

Returns
  type of mouse event

Definition at line 162 of file mouse_event.h.

References type_.

## getX()

unsigned int pcl::visualization::MouseEvent::getX | ( |  | ) | const

inline

Returns
  the x position of the mouse pointer at that time where the event got fired

Definition at line 186 of file mouse_event.h.

References pointer_x_.

## getY()

unsigned int pcl::visualization::MouseEvent::getY | ( |  | ) | const

inline

Returns
  the y position of the mouse pointer at that time where the event got fired

Definition at line 192 of file mouse_event.h.

References pointer_y_.

## setButton()

void pcl::visualization::MouseEvent::setButton | ( | const MouseButton & | button | ) |

inline

Set the button that caused the event.

Definition at line 180 of file mouse_event.h.

References button_.

## setType()

void pcl::visualization::MouseEvent::setType | ( | const Type & | type | ) |

inline

Sets the mouse event type.

Definition at line 168 of file mouse_event.h.

References type_.

## Member Data Documentation

## button_

MouseButton pcl::visualization::MouseEvent::button_

protected

Definition at line 133 of file mouse_event.h.

Referenced by getButton(), and setButton().

## key_state_

unsigned int pcl::visualization::MouseEvent::key_state_

protected

Definition at line 136 of file mouse_event.h.

Referenced by getKeyboardModifiers(), and MouseEvent().

## pointer_x_

unsigned int pcl::visualization::MouseEvent::pointer_x_

protected

Definition at line 134 of file mouse_event.h.

Referenced by getX().

## pointer_y_

unsigned int pcl::visualization::MouseEvent::pointer_y_

protected

Definition at line 135 of file mouse_event.h.

Referenced by getY().

## selection_mode_

bool pcl::visualization::MouseEvent::selection_mode_

protected

Definition at line 137 of file mouse_event.h.

Referenced by getSelectionMode().

## type_

Type pcl::visualization::MouseEvent::type_

protected

Definition at line 132 of file mouse_event.h.

Referenced by getType(), and setType().

The documentation for this class was generated from the following file:

- /build/pcl-OilVEB/pcl-1.8.1+dfsg1/visualization/include/pcl/visualization/mouse_event.h