Loading...
Searching...
No Matches
score Namespace Reference

Base toolkit upon which the software is built. More...

Detailed Description

Base toolkit upon which the software is built.

TODO. list in src/plugins/score-plugin-avnd/Crousti/Concepts.hpp#L139.

This namespace contains only non-domain specific classes and utilities : serialization, model-view, documents, etc.

It is split in two folders :

  • core is the internal mechanic to set-up the software : the actual widget classes, the plug-in loading code, etc.
  • score is the "public" part of the score API : this code can be used by plug-ins.

This file contains facilities to serialize an object into a QJsonObject.

This file contains base types for the events and transitions of the state machines in score.

See the documentation for explanation of the general pattern

Namespaces

namespace  gfx
 Graphics rendering pipeline for ossia score.
 

Classes

class  AboutDialog
 
class  Action
 The Action class. More...
 
struct  ActionCondition
 The ActionCondition struct. More...
 
struct  ActionContainer
 The ActionContainer struct. More...
 
class  ActionGroup
 The ActionGroup class A semantic group of actions : for instance, all the actions related to audio recording, etc. This is to be used for documentation purposes, for instance on a potential keyboard shortcut widget. More...
 
class  ActionManager
 The ActionManager class. More...
 
struct  Addon
 The Addon struct. More...
 
class  AddRemoveList
 
class  AggregateCommand
 Allows for grouping of multiple commands in a single one. More...
 
struct  any_serializer
 
struct  any_serializer_t
 
class  ApplicationComponents
 
struct  ApplicationComponentsData
 
struct  ApplicationContext
 Used to access all the application-wide state and structures. More...
 
class  ApplicationInterface
 The ApplicationInterface class. More...
 
class  ApplicationPlugin
 
class  ApplicationPlugin_QtInterface
 
class  ApplicationRegistrar
 Registers the plug-in elements. More...
 
struct  ApplicationServices
 
struct  ApplicationSettings
 Load-time settings. More...
 
class  ArrowButton
 
class  ArrowDialog
 
class  BackgroundItem
 
class  BackgroundRenderer
 
class  BackgroundRendererFactory
 
class  BackgroundRendererList
 
struct  BarSpinBox
 
class  BottomToolbarWidget
 
struct  Brush
 
struct  BrushSet
 
class  ClickableTextItem
 
class  ColorBang
 
struct  ColorRef
 A reference to a color. Used for skinning. More...
 
class  ComboBox
 
class  ComboBoxWithEnter
 Counterpart of SpinboxWithEnter: reports when the user is done with it. More...
 
struct  ComboSlider
 
class  Command
 The Command class. More...
 
class  CommandBackupFile
 Abstraction over the backup of commands. More...
 
struct  CommandData
 Utility class for the serialization and deserialization of commands. More...
 
class  CommandFactory_QtInterface
 
struct  CommandKeyHash
 
struct  CommandSpinbox
 CommandSpinbox Will update a value of the model according to the spinbox. More...
 
class  CommandStack
 
struct  CommandStackBackup
 Serialized command stack data for backup / restore. More...
 
class  CommandStackFacade
 A small abstraction layer over the score::CommandStack. More...
 
struct  CommandStore
 
class  Component
 A component adds custom data to an Entity. More...
 
class  ComponentHierarchyManager
 Manages simple hierarchies of components. More...
 
struct  Components
 
struct  ConsolidateOptions
 
class  CoreApplicationPlugin
 Base actions for the score software. More...
 
struct  CustomActionCondition
 The CustomActionCondition struct. More...
 
struct  DefaultComboImpl
 
struct  DefaultControlImpl
 
class  DefaultedGenericComponentFactoryList
 
struct  DefaultGraphicsKnobImpl
 
struct  DefaultGraphicsSliderImpl
 
struct  DefaultGraphicsSpinboxImpl
 
struct  delete_later
 
struct  Dispatcher
 
struct  Dispatcher_T
 
class  Document
 The Document class is the central part of the software. More...
 
struct  DocumentActionCondition
 The DocumentActionCondition struct. More...
 
class  DocumentBackupManager
 Handles document backup to allow restoring if there is a crash. More...
 
struct  DocumentBackups
 Manages the list of documents that can be restored after a crash. More...
 
class  DocumentBuilder
 Methods to set-up documents. More...
 
struct  DocumentContext
 
class  DocumentDelegateFactory
 Used to provide custom document types. More...
 
class  DocumentDelegateList
 
class  DocumentDelegateModel
 
class  DocumentDelegatePresenter
 
class  DocumentDelegateView
 
struct  DocumentList
 
class  DocumentManager
 Owns the documents. More...
 
struct  DocumentMetadata
 Document-wide metadata. More...
 
class  DocumentModel
 Model part of a document. More...
 
class  DocumentPlugin
 Extend a document with custom data and systems. More...
 
class  DocumentPluginFactory
 Reimplement to instantiate document plug-ins. More...
 
class  DocumentPluginFactory_T
 
class  DocumentPluginFactoryList
 
class  DocumentPresenter
 Interface between the DocumentModel and the DocumentView. More...
 
class  DocumentValidator
 Checks that a document is valid according to a list of checks to run. More...
 
class  DocumentView
 The DocumentView class shows a document. More...
 
class  DoubleSlider
 The DoubleSlider class. More...
 
struct  DoubleSpinboxWithEnter
 
struct  DragOverToolButton
 
class  dynarray_impl
 
class  dynvector_impl
 
class  EmptyItem
 
class  EmptyRectItem
 
struct  EnableActionIfDocument
 The EnableActionIfDocument struct. More...
 
class  EnableWhenDocumentIs
 
class  EnableWhenFocusedObjectIs
 
class  EnableWhenSelectionContains
 
class  Entity
 Base for complex model objects. More...
 
class  EntityList
 
class  EntityMap
 The EntityMap class. More...
 
class  EntityMapInserter
 
class  EntityMapInserter< score::Entity< T >, Ordered >
 
struct  EventVisitor
 
class  FactoryInterface_QtInterface
 
class  FactoryList_QtInterface
 
class  FileDownloader
 
struct  FilePath
 
class  FilePlacement
 Decides where each source file goes inside a project folder. More...
 
class  FileWatch
 
class  FixedTabWidget
 
struct  FlicksSpinBox
 
struct  FocusActionCondition
 The FocusActionCondition struct. More...
 
struct  FocusFacade
 
struct  FocusManager
 
class  FormLayout
 
class  FormWidget
 
class  GenericComponent
 A component that has a reference to a specific context object. More...
 
class  GenericComponentFactory
 
class  GenericComponentFactoryImpl
 
class  GenericComponentFactoryList
 
struct  GLCapabilities
 
class  GraphicsDefaultInletLayout
 
class  GraphicsDefaultLayout
 
class  GraphicsDefaultOutletLayout
 
class  GraphicsGridColumnsLayout
 
class  GraphicsGridRowsLayout
 
class  GraphicsHBoxLayout
 
class  GraphicsIORootLayout
 
class  GraphicsLayout
 
class  GraphicsSplitLayout
 
class  GraphicsTabLayout
 
class  GraphicsVBoxLayout
 
struct  GridWidget
 
struct  GUIApplicationContext
 Specializes ApplicationContext with the QMainWindow. More...
 
class  GUIApplicationInterface
 
class  GUIApplicationPlugin
 Used to extend the software with application-wide data. More...
 
class  GUIApplicationRegistrar
 
struct  GUIElements
 
class  HelperPanelDelegate
 
struct  HierarchicalMember
 
struct  HierarchicModel
 
struct  HierarchicModel< Model, Arg >
 
struct  HierarchicModel< Model, Arg, Args... >
 
class  HighResolutionTimer
 
class  HighResolutionTimerPrivate
 
class  HSeparator
 
class  IconProvider
 
struct  IdGen
 
struct  indirect_cast_map_iterator
 
struct  indirect_iterator
 
struct  indirect_map_iterator
 
struct  indirect_ptr_iterator
 
class  IndirectArray
 
class  IndirectContainer
 
class  IndirectContainerWrapper
 
class  IndirectMap
 
class  IndirectUnorderedMap
 
struct  InfiniteScroller
 
class  InteractiveLabel
 
class  InterfaceBase
 Base class for plug-in interfaces. More...
 
class  InterfaceList
 InterfaceList Default implementation of InterfaceListBase. More...
 
class  InterfaceListBase
 InterfaceListBase Interface to access factories. More...
 
class  InterfaceListMain
 
class  IntSlider
 
class  ItemBounder
 
struct  lazy_init_t
 
struct  linear_id_generator
 Generates identifiers for new objects, starting from 1. More...
 
struct  LoadedPluginVersions
 
class  LockHelper
 The LockHelper class. More...
 
struct  LogMessage
 
class  LogMessagesItemModel
 
class  MarginLess
 The MarginLess class. More...
 
class  MatchedTransition
 
class  MatchingFactory
 Utility class for making a factory interface list. More...
 
class  MaxRangeSpinBox
 The MaxRangeSpinBox class. More...
 
class  Menu
 Represents a menu in the software. More...
 
class  MenuManager
 The MenuManager class. More...
 
struct  Menus
 
class  MessagesPanelDelegate
 
class  MessagesPanelDelegateFactory
 
struct  MetaAction
 
class  MinimalApplication
 
class  MinimalGUIApplication
 
class  MissingCommandException
 The MissingCommandException class. More...
 
class  ModelMetadata
 The ModelMetadata class. More...
 
struct  NumberedEvent
 
struct  NumberedWithPath_Event
 
struct  NumStringTables
 
struct  ObjectEditor
 
class  ObjectEditorList
 
class  ObjectLocker
 The ObjectLocker class. More...
 
struct  OpenDocumentsFile
 File used for crash restore. More...
 
struct  PaintVisitor
 
class  PanelDelegate
 The PanelDelegate class. More...
 
class  PanelDelegateFactory
 Reimplement this interface to register new panels. More...
 
class  PanelDelegateFactoryList
 All the panels are registered in this interface list. More...
 
struct  PanelStatus
 The PanelStatus struct. More...
 
struct  PathInfo
 
struct  PathRoots
 
struct  Plugin
 
class  Plugin_QtInterface
 
class  PluginWindow
 
struct  PointerLock
 Relative ("locked") mouse motion, when the platform provides it. More...
 
class  PolymorphicComponentHierarchyManager
 Manages polymorphic hierarchies of components. More...
 
struct  PositionedEvent
 
struct  PositionedEvent< Scenario::Point >
 
class  Presenter
 The Presenter class. More...
 
class  ProjectSettings
 
class  ProjectSettingsDelegateFactory_T
 
class  ProjectSettingsFactory
 The ProjectSettingsFactory class. More...
 
class  ProjectSettingsModel
 
class  PromptLineEdit
 PromptLineEdit - A QLineEdit with readline-like features. More...
 
class  PropertyCommand
 The PropertyCommand class. More...
 
class  PropertyCommand_T
 
class  QGraphicsButton
 
class  QGraphicsCheckBox
 
class  QGraphicsCombo
 
class  QGraphicsDraggablePixmap
 
class  QGraphicsEnum
 
class  QGraphicsHSVChooser
 
class  QGraphicsIntSlider
 
class  QGraphicsIntSpinbox
 
class  QGraphicsIntXYSpinboxChooser
 
class  QGraphicsKnob
 
struct  QGraphicsLineEdit
 
class  QGraphicsLogKnob
 
class  QGraphicsLogSlider
 
class  QGraphicsMultiSlider
 
class  QGraphicsMultiSliderXY
 
class  QGraphicsNoteChooser
 
class  QGraphicsPathGeneratorXY
 
class  QGraphicsPixmapButton
 
class  QGraphicsPixmapEnum
 
class  QGraphicsPixmapToggle
 
class  QGraphicsRangeSlider
 
class  QGraphicsSelectablePixmapToggle
 
class  QGraphicsSlider
 
struct  QGraphicsSliderBase
 
class  QGraphicsSpinbox
 
class  QGraphicsTextButton
 
class  QGraphicsTimeChooser
 
class  QGraphicsToggle
 
class  QGraphicsWaveformButton
 
class  QGraphicsXYChooser
 
class  QGraphicsXYSpinboxChooser
 
class  QGraphicsXYZChooser
 
class  QGraphicsXYZSpinboxChooser
 
class  QuantificationWidget
 
struct  random_id_generator
 Generates random identifiers for new objects. More...
 
class  RangeWidget
 Editor for a pair (start, end), the QWidget counterpart of score::QGraphicsRangeSlider. More...
 
class  ReactiveLabel
 
class  RectItem
 
class  RectSplitter
 
class  RectWidget
 
class  RecursiveWatch
 
class  ResizeableItem
 
struct  RestorableDocument
 
struct  RightClickImpl
 
class  SearchLineEdit
 
struct  SecondSpinBox
 
struct  SelectionActionCondition
 The SelectionActionCondition struct. More...
 
class  SelectionDispatcher
 The SelectionDispatcher class. More...
 
class  SelectionStack
 The SelectionStack class. More...
 
class  SerializableDocumentPlugin
 Document plug-in with serializable data. More...
 
class  SerializableInterface
 Generic serialization method for abstract classes. More...
 
class  Settings
 Application-wide user settings registering and handling. More...
 
class  SettingsCommand
 A Command class that modifies a parameter given its trait class. More...
 
class  SettingsCommandBase
 Base class for commands to be used with the Settings system. More...
 
class  SettingsCommandDispatcher
 
class  SettingsDelegateFactory
 The SettingsDelegateFactory class. More...
 
class  SettingsDelegateFactory_T
 
class  SettingsDelegateModel
 
class  SettingsDelegatePresenter
 
class  SettingsDelegateView
 
struct  SettingsParameterMetadata
 
class  SettingsPresenter
 
class  SettingsView
 
class  SimpleTextItem
 
struct  SizeVisitor
 
class  Skin
 
struct  SliderWrapper
 
struct  SpeedSlider
 
class  SpinBox
 The SpinBox class. More...
 
class  SpinBox< double >
 
class  SpinBox< float >
 
struct  SpinboxWithEnter
 
class  StartScreen
 
struct  StartScreenLink
 
class  StateAwareTransition
 
struct  StaticPropertyCommand
 
struct  StaticPropertyCommand< AvndJit::Model::p_script >
 
struct  StaticPropertyCommand< Faust::FaustEffectModel::p_script >
 
struct  StaticPropertyCommand< Gfx::CSF::Model::p_compute >
 
struct  StaticPropertyCommand< Gfx::Filter::Model::p_program >
 
struct  StaticPropertyCommand< Gfx::GeometryFilter::Model::p_script >
 
struct  StaticPropertyCommand< Gfx::RenderPipeline::Model::p_program >
 
struct  StaticPropertyCommand< Gfx::VSA::Model::p_vertex >
 
struct  StaticPropertyCommand< Jit::BytebeatModel::p_script >
 
struct  StaticPropertyCommand< Jit::JitEffectModel::p_script >
 
struct  StaticPropertyCommand< JS::ProcessModel::p_program >
 
struct  StaticPropertyCommand< YSFX::ProcessModel::p_script >
 
struct  StringConstants
 
class  SubtypeVariant
 Tools to build a variant type from classes in a same hierarchy. More...
 
class  TaskPool
 
struct  TemplatedSpinBox
 The TemplatedSpinBox class. More...
 
struct  TemplatedSpinBox< double >
 
struct  TemplatedSpinBox< float >
 
struct  TemplatedSpinBox< int >
 
class  TextItem
 
class  ThreadPool
 
class  Timers
 
class  TimeSignatureWidget
 
class  TimeSpinBox
 
class  TitleBar
 
struct  ToggleButton
 
class  Toolbar
 
class  ToolbarManager
 The ToolbarManager class. More...
 
struct  TreeViewExpandState
 
struct  TypeInField
 One field of a type-in box: "x", "min", "hue"... More...
 
class  UndoApplicationPlugin
 The UndoApplicationPlugin class. More...
 
class  UndoListWidget
 
class  UndoPanelDelegate
 
class  UndoPanelDelegateFactory
 
class  ValidityChecker
 Implement validation checks on the document. More...
 
class  ValidityCheckerList
 
struct  ValueAssigner
 
struct  ValueAssigner< float >
 
struct  ValueAssigner< int >
 
struct  ValueAssigner< ossia::value >
 
struct  ValueDoubleSlider
 
struct  ValueLogDoubleSlider
 
struct  ValueSlider
 
class  VariantBasedNode
 The VariantBasedNode class. More...
 
class  Version
 Represents the version of a plug-in. More...
 
class  View
 The main display of the application. More...
 
class  VisibilityNotifying
 
struct  VolumeSlider
 
class  VSeparator
 
struct  ZipEntry
 One file to put in an archive. More...
 
class  ZoomItem
 

Typedefs

using JsonWriter = ossia::json_writer
 
using GlobalSettingsPresenter = SettingsDelegatePresenter< SettingsDelegateModel >
 
using ActionGroupKey = StringKey< ActionGroup >
 
using ActionKey = StringKey< Action >
 
using ActionConditionKey = StringKey< score::ActionCondition >
 
template<typename T1 , typename T2 >
using enable_if_base_of = std::enable_if< std::is_base_of< T1, T2 >::value, void * >
 
using FindCommandKey = std::pair< CommandGroupKey, CommandKey >
 
using MaybeDocument = const score::DocumentContext *
 
template<typename Component >
using ComponentHierarchy = ComponentHierarchyManager< Component, typename Component::model_t, typename Component::component_t >
 
template<typename Component , bool HasOwnership = true>
using PolymorphicComponentHierarchy = PolymorphicComponentHierarchyManager< Component, typename Component::model_t, typename Component::component_t, typename Component::component_factory_list_t, HasOwnership >
 
template<typename Model >
using HierarchicalComponents = HierarchicalMember< Model, score::Components, &Model::components >
 
using InterfaceKey = UuidKey< InterfaceBase >
 
using ProjectSettingsPresenter = SettingsDelegatePresenter< ProjectSettingsModel >
 
using ProjectSettingsView = SettingsDelegateView< ProjectSettingsModel >
 
using PluginKey = UuidKey< Plugin >
 
using SettingsDelegateFactoryList = InterfaceList< score::SettingsDelegateFactory >
 
template<typename T >
using sp = SettingsParameterMetadata< T >
 
using GlobalSettingsView = SettingsDelegateView< SettingsDelegateModel >
 
using uuid_t = uuids::uuid
 
using any_map = ossia::any_map
 
using any_serializer_map = score::hash_map< std::string, std::unique_ptr< any_serializer > >
 
using Press_Event = NumberedEvent< 1 >
 
using Move_Event = NumberedEvent< 2 >
 
using Release_Event = NumberedEvent< 3 >
 
using Cancel_Event = NumberedEvent< 4 >
 
using Shift_Event = NumberedEvent< 5 >
 
using Press_Transition = MatchedTransition< Press_Event >
 
using Move_Transition = MatchedTransition< Move_Event >
 
using Release_Transition = MatchedTransition< Release_Event >
 
using Cancel_Transition = MatchedTransition< Cancel_Event >
 
using ShiftTransition = MatchedTransition< Shift_Event >
 
using comparable_function = std::shared_ptr< std::function< void()> >
 
using id_generator = score::linear_id_generator
 
template<class Key , class T >
using hash_map = ossia::hash_map< Key, T >
 
using ZipProgress = std::function< bool(int, int)>
 Called with (files written, total). Return false to abort the archive.
 

Enumerations

enum  Modifier_tagme { Click = 100 , Move = 200 , Release = 300 }
 
enum class  FileKind {
  Unknown , Audio , Video , Image ,
  Midi , Model3D , Shader , Script ,
  Data , Folder , Plugin
}
 
enum class  CopyMode { Copy , Symlink , Hardlink }
 How a collected file is materialized in the project folder. More...
 
enum  TimeMode { Bars , Seconds , Flicks }
 

Functions

const ApplicationContextAppContext ()
 
const GUIApplicationContextGUIAppContext ()
 
const ApplicationComponentsAppComponents ()
 
void setQApplicationMetadata ()
 
template<typename RedoFun >
void loadCommandStack (const score::ApplicationComponents &components, DataStreamWriter &writer, score::CommandStack &stack, RedoFun redo_fun)
 
QString newProcessedFilePath (const QString &sourceFile, const QDir &destination)
 Obtains a new file name in the project folder to save a processed file.
 
Id< score::DocumentModelgetStrongId (const std::vector< score::Document * > &v)
 
ApplicationServicesAppServices () noexcept
 
QBrush bangFill (const QPalette &fallback, bool lit)
 The fill of a bang: the circle an impulse gets.
 
void retargetInputMethod (QObject *target) noexcept
 Point the platform input method at target.
 
void watchSceneInputMethod (QGraphicsScene &scene)
 Keep the platform input method in sync with the scene's focus item.
 
QPointer< QGraphicsProxyWidget > & currentRightClickWidget ()
 The one type-in box a right-click may have open.
 
void closeRightClickWidget ()
 Takes down whatever right-click box is open, if any.
 
QGraphicsProxyWidget * showTypeInBox (QGraphicsScene &scene, QPointF scenePos, const std::vector< TypeInField > &fields, std::function< void(int, double)> onChanged, std::function< void()> onFinished)
 The type-in box a right-click raises over a control with more than one number in it.
 
QString toNumber (double v) noexcept
 
QString toNumber (int v) noexcept
 
template<typename T >
double operator* (double lhs, const ValueAssigner< T > &rhs) noexcept
 
template<typename T >
T & component (const score::Components &c)
 component Fetch a Component from Components by type
 
template<typename T >
T * findComponent (const score::Components &c) noexcept
 findComponent Tryies to fetch a Component from Components by type.
 
template<typename T >
auto id (const Path< T > &path)
 
SCORE_LIB_BASE_EXPORT QString addonArchitecture ()
 addonArchitecture
 
template<typename DocPlugin >
auto & addDocumentPlugin (score::Document &doc)
 
void debug_types (const InterfaceBase *orig, const InterfaceBase *repl) noexcept
 
std::vector< Plugin_QtInterface * > & staticPlugins ()
 
template<typename T , typename Model >
void setupDefaultSettings (QSettings &set, const T &tuple, Model &model)
 
score::hash_map< std::string, std::unique_ptr< any_serializer > > & anySerializers ()
 The serializers for types that go in ossia::any should fit in here.
 
template<typename Obj , std::size_t N>
bool parseJsonField (const Obj &obj, const char(&key)[N], QString &out)
 Read one field of a JSON object, or leave out alone.
 
template<typename Obj , std::size_t N>
bool parseJsonField (const Obj &obj, const char(&key)[N], bool &out)
 
template<typename T >
bool parseJsonNumber (double d, T &out) noexcept
 
template<typename Obj , std::size_t N, typename T >
requires ( (std::is_arithmetic_v<T> || std::is_enum_v<T>) && !std::is_same_v<T, bool>)
bool parseJsonField (const Obj &obj, const char(&key)[N], T &out)
 
template<typename Obj , std::size_t N>
bool parseJsonField (const Obj &obj, const char(&key)[N], QSize &out)
 
template<typename Object >
auto unmarshall (const JSONReader &obj)
 
const StringConstantsStringConstant ()
 
template<typename T >
void serialize_dyn_impl (DataStream::Serializer &v, const T &t)
 
template<typename T >
void serialize_dyn_impl (JSONObject::Serializer &v, const T &t)
 
template<typename TheClass >
void serialize_dyn (const VisitorVariant &vis, const TheClass &s)
 
template<typename TheClass >
TheClass & deserialize_dyn (const VisitorVariant &vis, TheClass &s)
 
template<typename TheClass >
TheClass deserialize_dyn (const VisitorVariant &vis)
 
template<typename Functor >
auto deserialize_dyn (const VisitorVariant &vis, Functor &&fun)
 
template<typename Type , typename Object >
auto marshall (const Object &obj)
 marshall Serializes a single object
 
template<typename Object >
auto unmarshall (const rapidjson::Value &obj)
 
template<typename Object >
auto unmarshall (const QByteArray &arr)
 
template<typename Transition , typename SourceState , typename TargetState , typename... Args>
Transition * make_transition (SourceState source, TargetState dest, Args &&... args)
 
std::pair< int, int > availableCudaDevice () noexcept
 
bool availableCudaToolkitDylibs (int major, int minor) noexcept
 
void setCursorPos (QPointF pos) noexcept
 
void moveCursorPos (QPointF pos) noexcept
 
QPoint globalPos (QMouseEvent *event)
 
QPointF globalPos (QWidget *viewport, QGraphicsSceneMouseEvent *event)
 
void hideCursor (bool hasCursor)
 
void showCursor ()
 
template<typename T >
void clearAndDeleteLater (T &container, delete_later< T > &storage) noexcept
 
template<typename T >
auto clearAndDeleteLater (T &container) noexcept
 
std::optional< ossia::dylib_loader > try_load_library (const char *name) noexcept
 dlopen a library, reporting absence instead of throwing.
 
std::optional< ossia::dylib_loader > try_load_library (std::vector< std::string_view > names) noexcept
 Loads the first of names that can be found.
 
QString addUniqueSuffix (const QString &fileName)
 
QString locateFilePath (const QString &filename) noexcept
 
QString locateFilePath (const QString &filename, const score::DocumentContext &ctx) noexcept
 
QString relativizeFilePath (const QString &filename, const score::DocumentContext &ctx) noexcept
 
bool fast_contains (std::string_view data, std::string_view pattern)
 
bool fileContains (QFile &f, std::string_view pattern)
 
QString pickerStartFolder (const QString &current, const score::DocumentContext &ctx) noexcept
 
QString pickerStartFolder (const QString &current) noexcept
 
QByteArray mapAsByteArray (QFile &f) noexcept
 
std::string_view mapAsStringView (QFile &f) noexcept
 
std::string readFileAsString (QFile &f) noexcept
 
QString readFileAsQString (QFile &f) noexcept
 
QStringList list_ipv4_for_connecting () noexcept
 
QStringList list_ipv4_for_listening () noexcept
 
bool detectSystemEnrolment ()
 
bool isProjectRelativePath (const QString &path) noexcept
 True if the path is one of the tokens score understands as a root.
 
bool isLibraryRelativePath (const QString &path) noexcept
 
FileKind guessFileKind (const QString &path) noexcept
 
QString mediaSubfolder (FileKind k) noexcept
 Name of the project sub-folder collected files of that kind go into.
 
PathRoots pathRoots (const score::DocumentContext &ctx) noexcept
 Roots of a live document.
 
QString locateFilePath (const QString &filename, const PathRoots &roots) noexcept
 
bool isUnderFolder (const QString &path, const QString &root) noexcept
 
QString relativizeFilePath (const QString &filename, const PathRoots &roots) noexcept
 
QString sanitizeFileName (const QString &name) noexcept
 
bool sameFileContents (const QString &lhs, const QString &rhs) noexcept
 
bool materializeFile (const QString &source, const QString &destination, CopyMode mode, QString &error)
 
QString pickerStartFolder (const QString &current, const PathRoots &roots, const QString &userDocuments, const QString &workingDir) noexcept
 
void for_all_files (std::string_view root, std::function< void(std::string_view)> f)
 
template<typename Map >
void optimize_hash_map (Map &map)
 
template<typename T >
indirect_iterator< T > make_indirect_iterator (const T &it) noexcept
 
template<typename T >
indirect_ptr_iterator< T > make_indirect_ptr_iterator (const T &it)
 
template<typename T >
indirect_map_iterator< T > make_indirect_map_iterator (const T &it)
 
template<typename CastTo , typename T >
indirect_cast_map_iterator< T, CastTo > make_indirect_cast_map_iterator (const T &it)
 
template<typename T >
auto wrap_indirect (T &container)
 
bool writeZipArchive (const QString &destination, const std::vector< ZipEntry > &entries, int level, QString &error, const ZipProgress &progress={})
 Write entries into a zip archive at destination.
 
void setCursor (Qt::CursorShape c)
 setCursor sets the cursor safely.
 
SCORE_LIB_BASE_EXPORT const QPalette & transparentPalette ()
 
void setHelp (QWidget *widg, const QString &shorttxt, const QString &txt)
 
void setHelp (QAction *widg, const QString &shorttxt, const QString &txt)
 
void setHelp (QWidget *widg, const QString &txt)
 
void setHelp (QAction *widg, const QString &txt)
 
void installDragImageWorkaround ()
 Keep Qt's temporary drag-image element out of sight.
 
void setItemViewDragPixmap (QDrag &drag, QAbstractItemView &view, const QStyleOptionViewItem &option, const QModelIndexList &indexes)
 Give a QDrag the drag image QAbstractItemView::startDrag would have made.
 
int question (QWidget *parent, const QString &title, const QString &text)
 
int information (QWidget *parent, const QString &title, const QString &text)
 
int warning (QWidget *parent, const QString &title, const QString &text)
 
QImage get_image (QString str, QString svg={})
 
QPixmap get_pixmap (QString str, QString svg={})
 
QCursor get_cursor (QString str, double hotspot_x, double hostpot_y)
 
void setGlobalTimeMode (TimeMode mode)
 

Variables

thread_local char g_file_search_buffer [16384]
 
std::array< QString, 5 > arrow_name
 
TimeMode globalTimeMode = TimeMode::Bars
 

Enumeration Type Documentation

◆ CopyMode

enum class score::CopyMode
strong

How a collected file is materialized in the project folder.

Enumerator
Copy 

An independent copy.

The only mode that survives archiving.

Symlink 

A symbolic link to the original.

Cheap, but not portable.

Hardlink 

A hard link.

Same filesystem only.

◆ FileKind

enum class score::FileKind
strong

Category of an external file referenced by a document. Drives the sub-folder a collected file is copied into.

Function Documentation

◆ addonArchitecture()

SCORE_LIB_BASE_EXPORT QString score::addonArchitecture ( )

addonArchitecture

Returns
Architecture for the system score is compiled for.

◆ bangFill()

QBrush score::bangFill ( const QPalette &  fallback,
bool  lit 
)

The fill of a bang: the circle an impulse gets.

Shared by score::QGraphicsButton in the node view and the device explorer's tree rows and address panel.

Falls back to the palette when the skin has no brushes to give – a no-GUI application context leaves them default-constructed.

Parameters
litThe pressed state.

◆ component()

template<typename T >
T & score::component ( const score::Components c)

component Fetch a Component from Components by type

Returns
The component.

The component must have a member static const constexpr bool is_unique = true in order to use this function.

This guarantees that there will be a single component of a given type in the Components.

◆ currentRightClickWidget()

QPointer< QGraphicsProxyWidget > & score::currentRightClickWidget ( )

The one type-in box a right-click may have open.

Right-clicking a second control – or the same one twice – used to leave the first box floating over the scene with nobody owning it: it is parented to the scene, not to the control, so nothing took it down.

A QPointer, so that a box torn down by its own control leaves nothing dangling here.

◆ findComponent()

template<typename T >
T * score::findComponent ( const score::Components c)
noexcept

findComponent Tryies to fetch a Component from Components by type.

This works similarly to components ; instead of aborting, it returns a null pointer if the component does not exist.

See also
components

◆ guessFileKind()

FileKind score::guessFileKind ( const QString &  path)
noexcept

Guess a file's kind from its extension. Never fails: unknown extensions map to FileKind::Unknown.

◆ installDragImageWorkaround()

void score::installDragImageWorkaround ( )

Keep Qt's temporary drag-image element out of sight.

No-op outside of WebAssembly. Idempotent, and safe to call before the platform plugin has built its shadow root.

◆ isUnderFolder()

bool score::isUnderFolder ( const QString &  path,
const QString &  folder 
)
noexcept

True when path is folder itself or lives below it. Both must be absolute. Used as the containment guard by everything that writes or deletes inside a project.

◆ locateFilePath() [1/3]

SCORE_LIB_BASE_EXPORT QString score::locateFilePath ( const QString &  filename)
noexcept

Same, for callers that run before any document exists – a –script file is read while the application is still starting up. <LIBRARY>: is a settings lookup and resolves fine; <PROJECT>: and relative paths have no document to resolve against and are returned untouched.

◆ locateFilePath() [2/3]

QString score::locateFilePath ( const QString &  filename,
const PathRoots roots 
)
noexcept

Resolve a stored path (absolute, document-relative, <PROJECT>: or <LIBRARY>:-prefixed) into an absolute one.

◆ locateFilePath() [3/3]

SCORE_LIB_BASE_EXPORT QString score::locateFilePath ( const QString &  filename,
const score::DocumentContext ctx 
)
noexcept

Will also look where the save file is located. TODO in the future also look in a "common" library folder.

◆ marshall()

template<typename Type , typename Object >
auto score::marshall ( const Object &  obj)

marshall Serializes a single object

Parameters
objThe object to serialize.

This will create the relevant serialization datatype for Type. For instance, a QByteArray if it is DataStream and a QJSonObject if it is JSONObject

◆ materializeFile()

bool score::materializeFile ( const QString &  source,
const QString &  destination,
CopyMode  mode,
QString &  error 
)

Create destination (and its parent folders) from source according to mode. Returns false and fills error on failure; never overwrites an existing destination.

◆ newProcessedFilePath()

QString score::newProcessedFilePath ( const QString &  sourceFile,
const QDir &  destination 
)

Obtains a new file name in the project folder to save a processed file.

e.g. if the source file is /tmp/foo.wav, the output may be

/home/myself/Documents/My score project/Processed/foo-0003.wav

◆ parseJsonField()

template<typename Obj , std::size_t N>
bool score::parseJsonField ( const Obj &  obj,
const char(&)  key[N],
QString &  out 
)

Read one field of a JSON object, or leave out alone.

rapidjson's operator[] and GetString/GetInt/GetDouble are RAPIDJSON_ASSERT: an absent key, or one holding the wrong type, aborts rather than failing. These check presence and type first and report whether the field was usable, which is what a settings object arriving from a script or a saved document needs.

◆ parseJsonNumber()

template<typename T >
bool score::parseJsonNumber ( double  d,
T &  out 
)
noexcept

Narrowing a double that does not fit the destination is undefined, so the range is part of the type check.

◆ pickerStartFolder() [1/3]

SCORE_LIB_BASE_EXPORT QString score::pickerStartFolder ( const QString &  current)
noexcept

Same, outside of any document (application settings): the library, the user's documents folder, or the working directory.

◆ pickerStartFolder() [2/3]

QString score::pickerStartFolder ( const QString &  current,
const PathRoots roots,
const QString &  userDocuments,
const QString &  workingDir 
)
noexcept

Where a file / folder picker should open for a control whose current value is current (absolute, document-relative, <PROJECT>: or <LIBRARY>:-prefixed, or empty). In order: the folder of the current file (or the current folder itself) if it exists, the document's folder, the library, the user's documents folder, the working directory - the first one that exists. Never empty.

◆ pickerStartFolder() [3/3]

SCORE_LIB_BASE_EXPORT QString score::pickerStartFolder ( const QString &  current,
const score::DocumentContext ctx 
)
noexcept

Where a file / folder picker should open for a control of this document whose current value is current: see the PathRoots overload.

◆ relativizeFilePath() [1/2]

QString score::relativizeFilePath ( const QString &  filename,
const PathRoots roots 
)
noexcept

Turn an absolute path into a <PROJECT>: / <LIBRARY>: one when it lives under one of the roots. Paths that are already prefixed, or that live elsewhere, come back unchanged.

◆ relativizeFilePath() [2/2]

SCORE_LIB_BASE_EXPORT QString score::relativizeFilePath ( const QString &  filename,
const score::DocumentContext ctx 
)
noexcept

Will try to convert an absolute path in a relative path from the document's point of view

◆ retargetInputMethod()

void score::retargetInputMethod ( QObject *  target)
noexcept

Point the platform input method at target.

target is the object that should receive keyboard input – for a graphics scene, the QGraphicsView. Passing nullptr falls back to QGuiApplication::focusObject(), which is only correct when the target's window is already the focus window.

No-op outside of WebAssembly. Must be called synchronously from the code handling the user gesture.

◆ sameFileContents()

bool score::sameFileContents ( const QString &  lhs,
const QString &  rhs 
)
noexcept

Byte-exact comparison. Two paths pointing at the same file compare equal without being read.

◆ sanitizeFileName()

QString score::sanitizeFileName ( const QString &  name)
noexcept

Rewrite name into something creatable on every filesystem score runs on: no reserved characters, no Windows device names, no trailing dot or space, and short enough to survive a deep destination folder. Any directory part is dropped: the result is a single path component.

◆ setItemViewDragPixmap()

void score::setItemViewDragPixmap ( QDrag &  drag,
QAbstractItemView &  view,
const QStyleOptionViewItem &  option,
const QModelIndexList &  indexes 
)

Give a QDrag the drag image QAbstractItemView::startDrag would have made.

Renders the dragged indices through the view's item delegate, the way the default startDrag implementation does. Views that override startDrag and do not set a pixmap otherwise leave QDrag::pixmap() null, which the platform plugin is then free to fill in with whatever it likes.

◆ showTypeInBox()

QGraphicsProxyWidget * score::showTypeInBox ( QGraphicsScene &  scene,
QPointF  scenePos,
const std::vector< TypeInField > &  fields,
std::function< void(int, double)>  onChanged,
std::function< void()>  onFinished 
)

The type-in box a right-click raises over a control with more than one number in it.

A single spin box can be closed on QAbstractSpinBox::editingFinished, which is what DefaultGraphicsSliderImpl does. Several of them cannot: that signal is also emitted when the focus merely leaves a box, and moving from x to y is such a focus-out. Closing on it made every field but the first unreachable – clicking y took the whole box down.

The box goes away when the focus leaves it as a whole, which is the proxy item losing the scene focus. QApplication::focusWidget() cannot answer that question: a widget embedded in a QGraphicsProxyWidget never becomes the application's focus widget, the view stays it whatever is typed into.

Parameters
onChanged(field index, value), as a field is typed into.
onFinishedonce per field actually edited, when that edit is done: the release that turns the ongoing command into one undo step.

The box registers itself as the one currentRightClickWidget(), so raising any other takes it down.

◆ try_load_library()

std::optional< ossia::dylib_loader > score::try_load_library ( const char *  name)
inlinenoexcept

dlopen a library, reporting absence instead of throwing.

ossia::dylib_loader only signals failure by throwing from its constructor, which makes it unusable as a direct member of the optional-dependency loaders: a function-try-block around a constructor rethrows when it falls off the end of the handler, so the "unavailable" flag those loaders check is never reached and the exception escapes their instance() accessor instead.

◆ watchSceneInputMethod()

void score::watchSceneInputMethod ( QGraphicsScene &  scene)

Keep the platform input method in sync with the scene's focus item.

No-op outside of WebAssembly.

◆ writeZipArchive()

bool score::writeZipArchive ( const QString &  destination,
const std::vector< ZipEntry > &  entries,
int  level,
QString &  error,
const ZipProgress progress = {} 
)

Write entries into a zip archive at destination.

Aborting or failing leaves no half-written archive behind: the archive is built next to the destination and only moved into place once complete.

level is 0 (store) to 9 (smallest). Media is already compressed, so the default is deliberately low – spending minutes to shave a percent off a folder of video is not a trade anyone wants.

Variable Documentation

◆ arrow_name

std::array<QString, 5> score::arrow_name
Initial value:
= {
"",
"up",
"down",
"left",
"right"
}