SHAPER 9.16.0
SketcherPrs_DimensionStyle.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef SketcherPrs_DimensionStyleListener_H
21#define SketcherPrs_DimensionStyleListener_H
22
23//#include <Events_Listener.h>
24
25#include <ModelAPI_AttributeDouble.h>
26#include <PrsDim_Dimension.hxx>
27
28#include "SketcherPrs_Tools.h"
29
30#include <Standard.hxx>
31
32#include <string>
33
41{
42public:
44 public:
45 DimensionValue(double theDoubleValue, bool theHasParameters, const std::string& theTextValue);
48 void init(const AttributeDoublePtr& theAttributeValue);
49
50 public:
53 std::string myTextValue;
54 };
55
56public:
58 Standard_EXPORT SketcherPrs_DimensionStyle();
59
61 Standard_EXPORT ~SketcherPrs_DimensionStyle();
62
66 Standard_EXPORT void updateDimensions(PrsDim_Dimension* theDimension,
67 const DimensionValue& theDimensionValue, bool theIsSuppress/* = false*/);
68
69private:
76 void updateDimensions(PrsDim_Dimension* theDimension,
77 const bool theHasParameters,
78 const std::string& theTextValue,
79 const double theDoubleValue, bool theIsSuppress/* = false*/);
80};
81
82#endif
Definition: SketcherPrs_DimensionStyle.h:43
void init(const AttributeDoublePtr &theAttributeValue)
Fills internal fields by the given attribute.
Definition: SketcherPrs_DimensionStyle.cpp:50
bool myHasParameters
true if the attribute value has used parameters
Definition: SketcherPrs_DimensionStyle.h:52
double myDoubleValue
the angle value to be shown as custom value of presentation
Definition: SketcherPrs_DimensionStyle.h:51
std::string myTextValue
the angle value depending on angle type
Definition: SketcherPrs_DimensionStyle.h:53
Definition: SketcherPrs_DimensionStyle.h:41
SketcherPrs_DimensionStyle()
Constructor.
Definition: SketcherPrs_DimensionStyle.cpp:58
void updateDimensions(PrsDim_Dimension *theDimension, const DimensionValue &theDimensionValue, bool theIsSuppress)
Visualizes the dimension text or dimension value depending on the has parameters state.
Definition: SketcherPrs_DimensionStyle.cpp:66
~SketcherPrs_DimensionStyle()
Destructor.
Definition: SketcherPrs_DimensionStyle.cpp:62