Go to the documentation of this file.
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
void dragLasso(const MouseEvent &e)
Definition: juce_LassoComponent.h:143
void endLasso()
Definition: juce_LassoComponent.h:174
#define nullptr
Definition: juce_CompilerSupport.h:151
virtual SelectedItemSet< SelectableItemType > & getLassoSelection()=0
void paint(Graphics &g) override
Definition: juce_LassoComponent.h:200
bool hitTest(int, int) override
Definition: juce_LassoComponent.h:211
static bool JUCE_CALLTYPE isMouseButtonDownAnywhere() noexcept
Definition: juce_Component.cpp:2979
Point< int > getMouseDownPosition() const noexcept
Definition: juce_MouseEvent.cpp:97
bool isAltDown() const noexcept
Definition: juce_ModifierKeys.h:109
Definition: juce_LassoComponent.h:96
Definition: juce_GraphicsContext.h:42
virtual void setVisible(bool shouldBeVisible)
Definition: juce_Component.cpp:511
bool isShiftDown() const noexcept
Definition: juce_ModifierKeys.h:97
@ lassoOutlineColourId
Definition: juce_LassoComponent.h:195
@ lassoFillColourId
Definition: juce_LassoComponent.h:194
LassoComponent()
Definition: juce_LassoComponent.h:101
void removeValuesIn(const OtherArrayType &otherArray)
Definition: juce_Array.h:910
Point< int > getPosition() const noexcept
Definition: juce_MouseEvent.cpp:94
LookAndFeel & getLookAndFeel() const noexcept
Definition: juce_Component.cpp:2120
void addArray(const Type *elementsToAdd, int numElementsToAdd)
Definition: juce_Array.h:597
const Rectangle< int > & getBounds() const noexcept
Definition: juce_Component.h:301
bool isCommandDown() const noexcept
Definition: juce_ModifierKeys.h:66
Definition: juce_Component.h:33
void setSize(int newWidth, int newHeight)
Definition: juce_Component.cpp:1206
ColourIds
Definition: juce_LassoComponent.h:192
void clear()
Definition: juce_Array.h:200
virtual void drawLasso(Graphics &, Component &lassoComp)=0
Definition: juce_SelectedItemSet.h:43
Component * getParentComponent() const noexcept
Definition: juce_Component.h:762
Definition: juce_MouseEvent.h:36
virtual void findLassoItemsInArea(Array< SelectableItemType > &itemsFound, const Rectangle< int > &area)=0
void beginLasso(const MouseEvent &e, LassoSource< SelectableItemType > *lassoSource)
Definition: juce_LassoComponent.h:116
Definition: juce_LassoComponent.h:39
const ModifierKeys mods
Definition: juce_MouseEvent.h:110
virtual ~LassoSource()
Definition: juce_LassoComponent.h:43
void setBounds(int x, int y, int width, int height)
Definition: juce_Component.cpp:1100