Copyright © 2001-2023 MultiMedia Soft

TracksBoard.MouseActionRectangleGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the identifier of the rectangle on which a mouse action occurred.

 

This method can be usually invoked from within the handler function of the TracksBoardMouseNotification event, whose xPos and yPos parameters represent the point where the mouse action occurred.

 

Position and size of various rectangles can be obtained through the TracksBoard.RectangleGet method.

 

For details about the use of the TracksBoard refer to the How to use the TracksBoard to visually compose songs tutorial.

For further details about methods of the TracksBoard refer to the TracksBoard object section.

 

 

Syntax

 

[Visual Basic]

control.TracksBoard.MouseActionRectangleGet (

xPos as Long,

yPos as Long,

ByRef nRectangle as enumTracksBoardRectangles,

ByRef nTrack as Integer,

ByRef nItemUniqueId as Long,

ByRef nVolumePointIndex as Long

) as enumErrorCodes


 

[C++]

short control.TracksBoard.MouseActionRectangleGet (

long xPos,

long yPos,

short *nRectangle,

short *nTrack,

long *nItemUniqueId,

long *nVolumePointIndex

);


 

 

 

Parameter

Description

 

 

xPos

Horizontal position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification.

yPos

Vertical position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

nRectangle

Reference that, on return from the method call, will contain the identifier of the rectangle

Supported values are the following:

Mnemonic value

Value

Meaning

TRACKSBOARD_RECT_TOTAL

0

Total rectangle of the TracksBoard's window

TRACKSBOARD_RECT_ALL_TRACKS

1

Rectangle containing all of the tracks

TRACKSBOARD_RECT_SINGLE_TRACK

2

Rectangle of a single track; the nTrack parameter to obtain the zero-based index of the track on which the mouse action was performed

TRACKSBOARD_RECT_SB_TOP

3

Top horizontal scrollbar rectangle

TRACKSBOARD_RECT_SB_BOTTOM

4

Bottom horizontal scrollbar rectangle

TRACKSBOARD_RECT_SB_RIGHT

5

Right vertical scrollbar rectangle

TRACKSBOARD_RECT_RULER_LEFT

6

Left ruler rectangle

TRACKSBOARD_RECT_RULER_RIGHT

7

Right ruler rectangle

TRACKSBOARD_RECT_RULER_TOP

8

Top ruler rectangle

TRACKSBOARD_RECT_RULER_BOTTOM

9

Bottom ruler rectangle

TRACKSBOARD_RECT_SELECTION

10

Selected rectangle

TRACKSBOARD_RECT_PLAYBACK_LINE

11

Play head line rectangle

TRACKSBOARD_RECT_SINGLE_ITEM

12

Single item rectangle; use the nItemUniqueId parameter to obtain the unique identification number of the item on which the mouse action occurred.

 

The unique identification number is assigned to the sound item after being generated by one of the following methods:

TracksBoard.ItemClone when an existing item has been cloned

TRACKSBOARD_RECT_SINGLE_VOLUME_POINT

13

Single volume point rectangle; use the nItemUniqueId parameter to obtain the unique identification number of the item on which the mouse action occurred.and the nVolumePointIndex parameter to obtain the zero-based index of the volume point on which the mouse action occurred

 

The unique identification number is assigned to the sound item after being generated by one of the following methods:

TracksBoard.ItemClone when an existing item has been cloned

 

The total number of volume points available for the given item can be obtained through the TracksBoard.ItemVolumePointCountGet method

nTrack

Reference that, on return from the method call, will contain the zero-based index of the track on which the mouse action was eventually performed

nItemUniqueId

Reference that, on return from the method call, will contain the unique identifier of the sound item on which the mouse action was eventually performed

nVolumePointIndex

Reference that, on return from the method call, will contain the zero-based index of the volume point on which the mouse action occurred

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful