|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TPARAM_UI_CONCEPT_H
|
|
Toshihiro Shimizu |
890ddd |
#define TPARAM_UI_CONCEPT_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tparam.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <vector></vector>
|
|
Toshihiro Shimizu |
890ddd |
#include <string></string>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//***********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// TParamUIConcept definition
|
|
Toshihiro Shimizu |
890ddd |
//***********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//! Defines the User Interface Types available for a group of TParam objects.
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
A User Interface Concept is used to associate parameters to the way they should be
|
|
Toshihiro Shimizu |
890ddd |
interactively represented. For example, a TDoubleParamP may be used to represent
|
|
Toshihiro Shimizu |
890ddd |
multiple objects, such as lengths or angles; a couple of TPointParamP may represent
|
|
Toshihiro Shimizu |
890ddd |
vectors, and so on. Observe that each entry in the list is associated to a specific
|
|
Toshihiro Shimizu |
890ddd |
struct of parameter objects.
|
|
Toshihiro Shimizu |
890ddd |
\n\n
|
|
Toshihiro Shimizu |
890ddd |
The list in the Type enum provides all the interface types currently supported by Toonz.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
class TParamUIConcept
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
// Associated with each specific types are the structure the m_params member will need to hold.
|
|
Toshihiro Shimizu |
890ddd |
// The mandatory parameters are in square brackets.
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
enum Type {
|
|
Toshihiro Shimizu |
890ddd |
NONE = 0,
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
RADIUS, // Distance from a point (radius). Represented by { [TDoubleParamP], TPointParamP }
|
|
Toshihiro Shimizu |
890ddd |
WIDTH, // Width, as distance from a line with given angle. { [TDoubleParamP], TDoubleParamP }
|
|
Toshihiro Shimizu |
890ddd |
ANGLE, // An angle. { [TDoubleParamP] }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
POINT, // A Point. { [TPointParamP] }
|
|
Toshihiro Shimizu |
890ddd |
POINT_2, // A Point given its X and Y coordinates. { [2 TDoubleParamP] }
|
|
Toshihiro Shimizu |
890ddd |
VECTOR, // A Vector. { [TPointParamP], TPointParamP }
|
|
Toshihiro Shimizu |
890ddd |
POLAR, // A Vector in polar coordinates, from the origin. { [2 TDoubleParamP] }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
SIZE, // Size, shown with a rect with P00 on the origin. { [TDoubleParamP], TDoubleParamP }
|
|
Toshihiro Shimizu |
890ddd |
QUAD, // A Quadrilateral. { [4 TPointParamP] }
|
|
Toshihiro Shimizu |
890ddd |
RECT, // A Rect, with width, height and center. { [2 TDoubleParamP], TPointParamP }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DIAMOND, // A diagonally laid square. { [TDoubleParamP] }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TYPESCOUNT
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
Type m_type; //!< Concept identifier
|
|
Toshihiro Shimizu |
890ddd |
std::string m_label; //!< Name to show on editing
|
|
Toshihiro Shimizu |
890ddd |
std::vector<tparamp> m_params; //!< Associated parameters</tparamp>
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif // TPARAM_UI_CONCEPT_H
|