tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
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...

#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

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.

Definition at line 20 of file tracktion_SelectableClass.h.


Class Documentation

◆ tracktion::engine::SelectableClass::DeleteSelectedParams

struct tracktion::engine::SelectableClass::DeleteSelectedParams

Definition at line 69 of file tracktion_SelectableClass.h.

Class Members
SelectableList items
bool partOfCutOperation
SelectionManager * selectionManager

◆ tracktion::engine::SelectableClass::SelectOtherObjectsParams

struct tracktion::engine::SelectableClass::SelectOtherObjectsParams

Definition at line 97 of file tracktion_SelectableClass.h.

Class Members
SelectableList currentlySelectedItems
int editViewID
bool keepExistingItemsSelected
Relationship relationship
SelectionManager & selectionManager

Member Enumeration Documentation

◆ Relationship

enum class tracktion::engine::SelectableClass::Relationship
strong

Definition at line 90 of file tracktion_SelectableClass.h.

Constructor & Destructor Documentation

◆ SelectableClass()

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

Definition at line 239 of file tracktion_SelectionManager.cpp.

◆ ~SelectableClass()

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

Definition at line 240 of file tracktion_SelectionManager.cpp.

Member Function Documentation

◆ addClipboardEntriesFor()

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

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

Definition at line 324 of file tracktion_SelectionManager.cpp.

◆ areAllObjectsOfUniformType()

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

Definition at line 354 of file tracktion_SelectionManager.cpp.

◆ canBeSelected()

bool tracktion::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

Definition at line 322 of file tracktion_SelectionManager.cpp.

◆ canClassesBeSelectedAtTheSameTime()

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.

Definition at line 331 of file tracktion_SelectionManager.cpp.

◆ canCutSelected()

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

Definition at line 349 of file tracktion_SelectionManager.cpp.

◆ canObjectsBeSelectedAtTheSameTime()

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.

Definition at line 336 of file tracktion_SelectionManager.cpp.

◆ deleteSelected()

void tracktion::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()

Definition at line 323 of file tracktion_SelectionManager.cpp.

◆ findClassFor() [1/2]

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

Definition at line 257 of file tracktion_SelectionManager.cpp.

◆ findClassFor() [2/2]

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

Definition at line 295 of file tracktion_SelectionManager.cpp.

◆ getDescriptionOfSelectedGroup()

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

Must return a description of this particular group of objects.

This will be shown on the properties panel.

Definition at line 301 of file tracktion_SelectionManager.cpp.

◆ keepSelectedObjectOnScreen()

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.

Definition at line 345 of file tracktion_SelectionManager.cpp.

◆ pasteClipboard()

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

Definition at line 326 of file tracktion_SelectionManager.cpp.

◆ selectOtherObjects()

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.

Definition at line 341 of file tracktion_SelectionManager.cpp.


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