HDK
|
#include <OpenColorAppHelpers.h>
Public Member Functions | |
virtual size_t | getNumColorSpaces () const noexcept=0 |
Access to the color spaces (or roles). More... | |
virtual const char * | getName (size_t idx) const noexcept=0 |
virtual const char * | getUIName (size_t idx) const noexcept=0 |
virtual size_t | getIndexFromName (const char *name) const noexcept=0 |
virtual size_t | getIndexFromUIName (const char *name) const noexcept=0 |
virtual const char * | getDescription (size_t idx) const noexcept=0 |
virtual const char * | getFamily (size_t idx) const noexcept=0 |
virtual size_t | getNumHierarchyLevels (size_t idx) const noexcept=0 |
virtual const char * | getHierarchyLevel (size_t idx, size_t i) const noexcept=0 |
virtual const char * | getNameFromUIName (const char *uiName) const noexcept=0 |
Get the color space name from the UI name. More... | |
virtual const char * | getUINameFromName (const char *name) const noexcept=0 |
Get the color space UI name from the name. More... | |
ColorSpaceMenuHelper (const ColorSpaceMenuHelper &)=delete | |
ColorSpaceMenuHelper & | operator= (const ColorSpaceMenuHelper &)=delete |
virtual | ~ColorSpaceMenuHelper ()=default |
Do not use (needed only for pybind11). More... | |
Static Public Member Functions | |
static ColorSpaceMenuHelperRcPtr | Create (ConstColorSpaceMenuParametersRcPtr parameters) |
Protected Member Functions | |
ColorSpaceMenuHelper ()=default | |
Helper class to create menus for the content of a config.
Menu can list color spaces, roles, named transforms. Each entry has a name, a UI name, a description, and a family. Family can also be accessed as hierarchy levels; levels are created by splitting the family using the 'family separator'. Hierarchy levels are meant to be used as sub-menus.
The UI name is what is intended to be put in application menus seen by the end-user. However, please note that the UI name is not guaranteed to remain stable between releases and so if applications need to save something it should be the 'name' rather than the 'UI name'. Currently, the only difference between the 'name' and 'UI name' is for roles.
The overall ordering of items is: color spaces, named transforms, roles, and additional color spaces. The display color spaces will either come before or after the other color spaces based on where that block of spaces appears in the config. The order of items returned by the menu helper preserves the order of items in the config itself for each type of elements, thus preserving the intent of the config author. For example, if you call getName at idx and idx+1, the name returned at idx+1 will be from farther down in the config than the one at idx as long as both are of the same type. (An application may ask for only the items in one of those blocks if it wants to handle them separately.) If the application makes use of hierarchical menus, that will obviously impose a different order on what the user sees in the menu. Though even with hierarchical menus, applications should try to preserve config ordering (which is equivalent to index ordering) for items within the same sub-menu.
Definition at line 214 of file OpenColorAppHelpers.h.
|
delete |
|
virtualdefault |
Do not use (needed only for pybind11).
|
protecteddefault |
|
static |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get the index of the element of a given name. Return (size_t)-1 name if NULL or empty, or if no element with that name is found.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get the color space (or role) name used in the config for this menu item. Will be empty if the index is out of range.
|
pure virtualnoexcept |
Get the color space name from the UI name.
|
pure virtualnoexcept |
Access to the color spaces (or roles).
|
pure virtualnoexcept |
Hierarchy levels are created from the family string. It is split into levels using the 'family separator'.
|
pure virtualnoexcept |
Get the name to use in the menu UI. This might be different from the config name, for example in the case of roles. Will be empty if the index is out of range.
|
pure virtualnoexcept |
Get the color space UI name from the name.
|
delete |