TracktionEngine
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
tracktion::engine::SelectableClass Class Reference

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

Classes

struct  AddClipboardEntryParams
 
struct  ClassInstance
 
struct  ClassInstanceBase
 
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. More...
 
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. More...
 
virtual bool canObjectsBeSelectedAtTheSameTime (Selectable &object1, Selectable &object2)
 This is only called if canClassesBeSelectedAtTheSameTime() has already returned true for the other object. More...
 
virtual void addClipboardEntriesFor (AddClipboardEntryParams &)
 A class should use this to create XML clipboard entries for the given set of items. More...
 
virtual void deleteSelected (const SelectableList &, bool partOfCutOperation)
 Deletes this set of objects. More...
 
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. More...
 
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. More...
 
virtual void keepSelectedObjectOnScreen (const SelectableList &currentlySelectedObjects)
 if implemented, this should do whatever is appropriate to make these objects visible - e.g. More...
 

Static Public Member Functions

static SelectableClassfindClassFor (const Selectable &)
 
static SelectableClassfindClassFor (const Selectable *)
 
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()

tracktion::engine::SelectableClass::SelectableClass ( )

◆ ~SelectableClass()

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

Member Function Documentation

◆ findClassFor() [1/2]

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

◆ findClassFor() [2/2]

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

◆ getDescriptionOfSelectedGroup()

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

Must return a description of this particular group of objects.

This will be shown on the properties panel.

◆ canClassesBeSelectedAtTheSameTime()

virtual bool tracktion::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 tracktion::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 tracktion::engine::SelectableClass::addClipboardEntriesFor ( AddClipboardEntryParams )
virtual

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

◆ deleteSelected()

virtual void tracktion::engine::SelectableClass::deleteSelected ( const SelectableList ,
bool  partOfCutOperation 
)
virtual

Deletes this set of objects.

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

◆ pasteClipboard()

virtual bool tracktion::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 tracktion::engine::SelectableClass::canCutSelected ( const SelectableList selectedObjects)
virtual

◆ selectOtherObjects()

virtual void tracktion::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 tracktion::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 tracktion::engine::SelectableClass::areAllObjectsOfUniformType ( const SelectableList selectedObjects)
static

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