25 #ifndef JUCE_LASSOCOMPONENT_H_INCLUDED
26 #define JUCE_LASSOCOMPONENT_H_INCLUDED
38 template <
class SelectableItemType>
95 template <
class SelectableItemType>
119 jassert (lassoSource !=
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();
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
void setSize(int newWidth, int newHeight)
Definition: juce_Component.cpp:1206
virtual void findLassoItemsInArea(Array< SelectableItemType > &itemsFound, const Rectangle< int > &area)=0
void endLasso()
Definition: juce_LassoComponent.h:174
virtual void drawLasso(Graphics &, Component &lassoComp)=0
Definition: juce_LassoComponent.h:39
bool isCommandDown() const noexcept
Definition: juce_ModifierKeys.h:66
LookAndFeel & getLookAndFeel() const noexcept
Definition: juce_Component.cpp:2120
Definition: juce_Point.h:39
Component * getParentComponent() const noexcept
Definition: juce_Component.h:762
Definition: juce_LassoComponent.h:195
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
Definition: juce_LassoComponent.h:194
static bool JUCE_CALLTYPE isMouseButtonDownAnywhere() noexcept
Definition: juce_Component.cpp:2979
const ModifierKeys mods
Definition: juce_MouseEvent.h:110
const Rectangle< int > & getBounds() const noexcept
Definition: juce_Component.h:301
void removeValuesIn(const OtherArrayType &otherArray)
Definition: juce_Array.h:910
bool isShiftDown() const noexcept
Definition: juce_ModifierKeys.h:97
void clear()
Definition: juce_core.h:201
void setBounds(int x, int y, int width, int height)
Definition: juce_Component.cpp:1100
Definition: juce_Array.h:60
Definition: juce_GraphicsContext.h:42
Point< int > getPosition() const noexcept
Definition: juce_MouseEvent.cpp:94
virtual void setVisible(bool shouldBeVisible)
Definition: juce_Component.cpp:511
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