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
/*!
Shinya Kitaoka 120a6e
  A User Interface Concept is used to associate parameters to the way they
Shinya Kitaoka 120a6e
should be
Shinya Kitaoka 120a6e
  interactively represented. For example, a TDoubleParamP may be used to
Shinya Kitaoka 120a6e
represent
Shinya Kitaoka 120a6e
  multiple objects, such as lengths or angles; a couple of TPointParamP may
Shinya Kitaoka 120a6e
represent
Shinya Kitaoka 120a6e
  vectors, and so on. Observe that each entry in the list is associated to a
Shinya Kitaoka 120a6e
specific
Toshihiro Shimizu 890ddd
  struct of parameter objects.
Toshihiro Shimizu 890ddd
\n\n
Shinya Kitaoka 120a6e
  The list in the Type enum provides all the interface types currently supported
Shinya Kitaoka 120a6e
by Toonz.
Toshihiro Shimizu 890ddd
*/
Shinya Kitaoka 120a6e
class TParamUIConcept {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  // Associated with each specific types are the structure the m_params member
Shinya Kitaoka 120a6e
  // will need to hold.
Shinya Kitaoka 120a6e
  // The mandatory parameters are in square brackets.
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  enum Type {
Shinya Kitaoka 120a6e
    NONE = 0,
Toshihiro Shimizu 890ddd
shun-iwasawa 00ed45
    RADIUS,   // Distance from a point (radius). Represented by     {
shun-iwasawa 00ed45
              // [TDoubleParamP], TPointParamP }
shun-iwasawa 00ed45
    WIDTH,    // Width, as distance from a line with given angle.   {
shun-iwasawa 00ed45
              // [TDoubleParamP], TDoubleParamP }
shun-iwasawa 00ed45
    ANGLE,    // An angle.                                          {
shun-iwasawa 00ed45
              // [TDoubleParamP] }
shun-iwasawa 00ed45
    ANGLE_2,  // An angle range defined with start and end angles.
shun-iwasawa 00ed45
              // { [2 TDoubleParamP], TDoubleParamP }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
    POINT,    // A Point.                                           {
Shinya Kitaoka 120a6e
              // [TPointParamP] }
Shinya Kitaoka 120a6e
    POINT_2,  // A Point given its X and Y coordinates.             { [2
Shinya Kitaoka 120a6e
              // TDoubleParamP] }
Shinya Kitaoka 120a6e
    VECTOR,   // A Vector.                                          {
Shinya Kitaoka 120a6e
              // [TPointParamP], TPointParamP }
Shinya Kitaoka 120a6e
    POLAR,    // A Vector in polar coordinates, from the origin.    { [2
Shinya Kitaoka 120a6e
              // TDoubleParamP] }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
    SIZE,  // Size, shown with a rect with P00 on the origin.    {
Shinya Kitaoka 120a6e
           // [TDoubleParamP], TDoubleParamP }
Shinya Kitaoka 120a6e
    QUAD,  // A Quadrilateral.                                   { [4
Shinya Kitaoka 120a6e
           // TPointParamP] }
Shinya Kitaoka 120a6e
    RECT,  // A Rect, with width, height and center.             { [2
Shinya Kitaoka 120a6e
           // TDoubleParamP], TPointParamP }
Toshihiro Shimizu 890ddd
shun-iwasawa 5903e5
    DIAMOND,       // A diagonally laid square.                          {
shun-iwasawa 5903e5
                   // [TDoubleParamP] }
shun-iwasawa 5903e5
    LINEAR_RANGE,  // A band-like range between two points.
shun-iwasawa 5903e5
                   // { [2 TPointParamP] }
shun-iwasawa 888af2
    COMPASS,       // a line widget pointing toward some point. [TPointParamP]
shun-iwasawa 888af2
    COMPASS_SPIN,  // ... with guides in rotational direction.
shun-iwasawa 255f14
shun-iwasawa af8f7a
    RAINBOW_WIDTH,
shun-iwasawa af8f7a
Shinya Kitaoka 120a6e
    TYPESCOUNT
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  Type m_type;                    //!< Concept identifier
Shinya Kitaoka 120a6e
  std::string m_label;            //!< Name to show on editing
Shinya Kitaoka 120a6e
  std::vector<tparamp> m_params;  //!< Associated parameters</tparamp>
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // TPARAM_UI_CONCEPT_H