25 #ifndef JUCE_LASSOCOMPONENT_H_INCLUDED 26 #define JUCE_LASSOCOMPONENT_H_INCLUDED 38 template <
class SelectableItemType>
95 template <
class SelectableItemType>
119 jassert (lassoSource !=
nullptr);
120 jassert (getParentComponent() !=
nullptr);
122 source = lassoSource;
124 if (lassoSource !=
nullptr)
145 if (source !=
nullptr)
151 source->findLassoItemsInArea (itemsInLasso, getBounds());
156 itemsInLasso.
addArray (originalSelection);
164 itemsInLasso.
addArray (originalMinusNew);
177 originalSelection.clear();
194 lassoFillColourId = 0x1000440,
195 lassoOutlineColourId = 0x1000441,
202 getLookAndFeel().drawLasso (g, *
this);
207 jassert (isMouseButtonDownAnywhere());
211 bool hitTest (
int,
int)
override {
return false; }
223 #endif // JUCE_LASSOCOMPONENT_H_INCLUDED bool hitTest(int, int) override
Definition: juce_LassoComponent.h:211
void dragLasso(const MouseEvent &e)
Definition: juce_LassoComponent.h:143
virtual void findLassoItemsInArea(Array< SelectableItemType > &itemsFound, const Rectangle< int > &area)=0
void endLasso()
Definition: juce_LassoComponent.h:174
Definition: juce_LassoComponent.h:39
bool isCommandDown() const noexcept
Definition: juce_ModifierKeys.h:66
virtual ~LassoSource()
Definition: juce_LassoComponent.h:43
bool isAltDown() const noexcept
Definition: juce_ModifierKeys.h:109
void beginLasso(const MouseEvent &e, LassoSource< SelectableItemType > *lassoSource)
Definition: juce_LassoComponent.h:116
virtual SelectedItemSet< SelectableItemType > & getLassoSelection()=0
Definition: juce_Rectangle.h:36
LassoComponent()
Definition: juce_LassoComponent.h:101
void addArray(const Type *elementsToAdd, int numElementsToAdd)
Definition: juce_Array.h:597
Definition: juce_Component.h:33
const ModifierKeys mods
Definition: juce_MouseEvent.h:110
void removeValuesIn(const OtherArrayType &otherArray)
Definition: juce_Array.h:910
bool isShiftDown() const noexcept
Definition: juce_ModifierKeys.h:97
Definition: juce_Array.h:60
Definition: juce_GraphicsContext.h:42
Point< int > getPosition() const noexcept
Definition: juce_MouseEvent.cpp:94
Definition: juce_SelectedItemSet.h:43
#define nullptr
Definition: juce_CompilerSupport.h:151
Definition: juce_MouseEvent.h:36
Point< int > getMouseDownPosition() const noexcept
Definition: juce_MouseEvent.cpp:97
ColourIds
Definition: juce_LassoComponent.h:192
Definition: juce_LassoComponent.h:96
void paint(Graphics &g) override
Definition: juce_LassoComponent.h:200