Loading...
Searching...
No Matches
juce::LassoSource< SelectableItemType > Class Template Referenceabstract

## Detailed Description

template<class SelectableItemType>
class juce::LassoSource< SelectableItemType >

A class used by the LassoComponent to manage the things that it selects.

This allows the LassoComponent to find out which items are within the lasso, and to change the list of selected items.

See also
  LassoComponent, SelectedItemSet

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

- juce_gui_basics/mouse/juce_LassoComponent.h

## Public Member Functions

virtual | ~LassoSource ()=default
| Destructor.
virtual void | findLassoItemsInArea (Array< SelectableItemType > &itemsFound, const Rectangle< int > &area)=0
| Returns the set of items that lie within a given lassoable region.
virtual SelectedItemSet< SelectableItemType > & | getLassoSelection ()=0
| Returns the SelectedItemSet that the lasso should update.

## Constructors and Destructors

## ~LassoSource()

template<class SelectableItemType>

virtual juce::LassoSource< SelectableItemType >::~LassoSource | ( |  | ) |

virtual default

Destructor.

## Member Functions

## findLassoItemsInArea()

template<class SelectableItemType>

virtual void juce::LassoSource< SelectableItemType >::findLassoItemsInArea | ( | Array< SelectableItemType > & | itemsFound,
|  | const Rectangle< int > & | area )

pure virtual

Returns the set of items that lie within a given lassoable region.

Your implementation of this method must find all the relevant items that lie within the given rectangle. and add them to the itemsFound array.

The coordinates are relative to the top-left of the lasso component's parent component. (i.e. they are the same as the size and position of the lasso component itself).

## getLassoSelection()

template<class SelectableItemType>

virtual SelectedItemSet< SelectableItemType > & juce::LassoSource< SelectableItemType >::getLassoSelection | ( |  | ) |

pure virtual

Returns the SelectedItemSet that the lasso should update.

This set will be continuously updated by the LassoComponent as it gets dragged around, so make sure that you've got a ChangeListener attached to the set so that your UI objects will know when the selection changes and be able to update themselves appropriately.

Referenced by juce::LassoComponent< SelectableItemType >::beginLasso().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited