TracktionEngine
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
engine::SelectableClass Class Reference

Represents a type of object that can be selected. More...

#include <tracktion_SelectableClass.h>

Classes

struct  AddClipboardEntryParams
 
struct  ClassInstance
 
struct  ClassInstanceBase
 
struct  DeleteSelectedParams
 
struct  SelectOtherObjectsParams
 

Public Types

enum class  Relationship {
  moveUp , moveDown , moveLeft , moveRight ,
  moveToHome , moveToEnd , selectAll
}
 

Public Member Functions

 SelectableClass ()
 
virtual ~SelectableClass ()
 
virtual juce::String getDescriptionOfSelectedGroup (const SelectableList &)
 Must return a description of this particular group of objects.
 
virtual bool canBeSelected (const Selectable &object)
 If it's possible for an object to be selected.
 
virtual bool canClassesBeSelectedAtTheSameTime (SelectableClass *otherClass)
 if it's possible for an object of this class to be selected at the same time as an object of the class passed in, this should return true.
 
virtual bool canObjectsBeSelectedAtTheSameTime (Selectable &object1, Selectable &object2)
 This is only called if canClassesBeSelectedAtTheSameTime() has already returned true for the other object.
 
virtual void addClipboardEntriesFor (AddClipboardEntryParams &)
 A class should use this to create XML clipboard entries for the given set of items.
 
virtual void deleteSelected (const DeleteSelectedParams &params)
 Deletes this set of objects.
 
virtual bool pasteClipboard (const SelectableList &currentlySelectedItems, int editViewID)
 This gives the selected items a first chance to paste the clipboard contents when the user presses ctrl-v.
 
virtual bool canCutSelected (const SelectableList &selectedObjects)
 
virtual void selectOtherObjects (const SelectOtherObjectsParams &)
 Must try to find and select objects that are related to these ones in the specified way.
 
virtual void keepSelectedObjectOnScreen (const SelectableList &currentlySelectedObjects)
 if implemented, this should do whatever is appropriate to make these objects visible - e.g.
 

Static Public Member Functions

static SelectableClassfindClassFor (const Selectable &)
 
static SelectableClassfindClassFor (const Selectable *)
 
template<typename SelectableType >
static SelectableClassfindClassFor ()
 
static bool areAllObjectsOfUniformType (const SelectableList &selectedObjects)
 

Detailed Description

Represents a type of object that can be selected.

Each Selectable must be able to provide a SelectableClass for itself, so that when there are a bunch of similar objects selected, the class object knows how to deal with them as a group.

Member Enumeration Documentation

◆ Relationship

Enumerator
moveUp 
moveDown 
moveLeft 
moveRight 
moveToHome 
moveToEnd 
selectAll 

Constructor & Destructor Documentation

◆ SelectableClass()

engine::SelectableClass::SelectableClass ( )

◆ ~SelectableClass()

virtual engine::SelectableClass::~SelectableClass ( )
virtual

Member Function Documentation

◆ findClassFor() [1/3]

static SelectableClass * engine::SelectableClass::findClassFor ( const Selectable )
static

◆ findClassFor() [2/3]

static SelectableClass * engine::SelectableClass::findClassFor ( const Selectable )
static

◆ findClassFor() [3/3]

template<typename SelectableType >
static SelectableClass * engine::SelectableClass::findClassFor ( )
static

◆ getDescriptionOfSelectedGroup()

virtual juce::String engine::SelectableClass::getDescriptionOfSelectedGroup ( const SelectableList )
virtual

Must return a description of this particular group of objects.

This will be shown on the properties panel.

◆ canBeSelected()

virtual bool engine::SelectableClass::canBeSelected ( const Selectable object)
virtual

If it's possible for an object to be selected.

Things like currently recording clips should not be selectable

◆ canClassesBeSelectedAtTheSameTime()

virtual bool engine::SelectableClass::canClassesBeSelectedAtTheSameTime ( SelectableClass otherClass)
virtual

if it's possible for an object of this class to be selected at the same time as an object of the class passed in, this should return true.

Default is only to be true if the other object is actually this one.

◆ canObjectsBeSelectedAtTheSameTime()

virtual bool engine::SelectableClass::canObjectsBeSelectedAtTheSameTime ( Selectable object1,
Selectable object2 
)
virtual

This is only called if canClassesBeSelectedAtTheSameTime() has already returned true for the other object.

Returns true by default.

◆ addClipboardEntriesFor()

virtual void engine::SelectableClass::addClipboardEntriesFor ( AddClipboardEntryParams )
virtual

A class should use this to create XML clipboard entries for the given set of items.

◆ deleteSelected()

virtual void engine::SelectableClass::deleteSelected ( const DeleteSelectedParams params)
virtual

Deletes this set of objects.

The partOfCutOperation flag is set if it's being called from SelectableManager::cutSelected()

◆ pasteClipboard()

virtual bool engine::SelectableClass::pasteClipboard ( const SelectableList currentlySelectedItems,
int  editViewID 
)
virtual

This gives the selected items a first chance to paste the clipboard contents when the user presses ctrl-v.

If it doesn't want to handle this, it should return false, and the edit object will be offered the clipboard

◆ canCutSelected()

virtual bool engine::SelectableClass::canCutSelected ( const SelectableList selectedObjects)
virtual

◆ selectOtherObjects()

virtual void engine::SelectableClass::selectOtherObjects ( const SelectOtherObjectsParams )
virtual

Must try to find and select objects that are related to these ones in the specified way.

◆ keepSelectedObjectOnScreen()

virtual void engine::SelectableClass::keepSelectedObjectOnScreen ( const SelectableList currentlySelectedObjects)
virtual

if implemented, this should do whatever is appropriate to make these objects visible - e.g.

scrolling to them, etc.

◆ areAllObjectsOfUniformType()

static bool engine::SelectableClass::areAllObjectsOfUniformType ( const SelectableList selectedObjects)
static

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