Class TMouse

Unit

Declaration

type TMouse = class(TObject)

Description

Encapsulates mouse input.

Hierarchy

  • TObject
  • TMouse

Overview

Methods

Public constructor Create;
Public DESTRUCTOR Destroy; override;
Public procedure ShowCursor; inline;
Public procedure HideCursor; inline;
Public function GetState: ALLEGRO_MOUSE_STATE; inline;
Public procedure GetCursorPos (out aX, aY: Integer); inline;
Public procedure SetCursor ( aCursor: ALLEGRO_BITMAPptr; aXFocus, aYFocus: Integer );
Public procedure SetCursorPos (const aX, aY: Integer); inline;
Public procedure WarpMouse; inline;

Properties

Public property NumButtons: Integer read GetNumButtons;
Public property InDisplay: Boolean read fInDisplay;
Public property OnButtonClick: TMouseNotifyEvent read fOnButtonClick write fOnButtonClick;
Public property OnButtonUp: TMouseNotifyEvent read fOnButtonUp write fOnButtonUp;
Public property OnMove: TMouseNotifyEvent read fOnMove write fOnMove;
Public property OnOutDisplay: TNotifyEvent read fOnOutDisplay write fOnOutDisplay;
Public property OnInDisplay: TNotifyEvent read fOnInDisplay write fOnInDisplay;

Description

Methods

Public constructor Create;

Constructor.

Public DESTRUCTOR Destroy; override;

Destructor.

Public procedure ShowCursor; inline;

Show mouse cursor.

Public procedure HideCursor; inline;

Hide mouse cursor.

Public function GetState: ALLEGRO_MOUSE_STATE; inline;

Returns current mouse state.

Public procedure GetCursorPos (out aX, aY: Integer); inline;

Get current mouse coordinates.

Public procedure SetCursor ( aCursor: ALLEGRO_BITMAPptr; aXFocus, aYFocus: Integer );

Set cursor bitmap.

Public procedure SetCursorPos (const aX, aY: Integer); inline;

Set cursor position.

Public procedure WarpMouse; inline;

Moves cursor to display center.

Properties

Public property NumButtons: Integer read GetNumButtons;

How many buttons has the mouse.

Public property InDisplay: Boolean read fInDisplay;

Is mouse cursor inside the display.

Public property OnButtonClick: TMouseNotifyEvent read fOnButtonClick write fOnButtonClick;

Event triggered when a mouse button is pressed.

Public property OnButtonUp: TMouseNotifyEvent read fOnButtonUp write fOnButtonUp;

Event triggered when a mouse button is released.

Public property OnMove: TMouseNotifyEvent read fOnMove write fOnMove;

Event triggered when mouse moved.

Public property OnOutDisplay: TNotifyEvent read fOnOutDisplay write fOnOutDisplay;

Event triggered when mouse moves out of the display.

Public property OnInDisplay: TNotifyEvent read fOnInDisplay write fOnInDisplay;

Event triggered when mouse moves inside of the display.


Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.