Gui::SoFCColorBar Class Reference

The color bar class that redirects all calls to its handled color bars. More...

#include <SoFCColorBar.h>

Public Member Functions

void customize (SoFCColorBarBase *)
 Customizes the currently active color bar. More...
 
SoFCColorBarBasegetActiveBar () const
 Returns the currently active color bar object. More...
 
App::Color getColor (float fVal) const
 Returns the associated color to the value fVal of the currently active color bar. More...
 
const char * getColorBarName () const
 Returns the name of the color bar. More...
 
float getMaxValue () const
 Returns the current maximum of the parameter range of the currently active color bar. More...
 
float getMinValue () const
 Returns the current minimum of the parameter range of the currently active color bar. More...
 
void handleEvent (SoHandleEventAction *action)
 Handles the mouse button events and checks if the user has clicked on the area of the currently active color bar. More...
 
bool isVisible (float fVal) const
 Returns the return value of the currently active color bar. More...
 
void setOutsideGrayed (bool bVal)
 Sets whether values outside the range should be in gray,. More...
 
void setRange (float fMin, float fMax, int prec=3)
 Sets the range of all color bars from the maximum fMax to the minimum fMin. More...
 
 SoFCColorBar ()
 
void triggerChange (SoFCColorBarBase *)
 Notify observers. More...
 
- Public Member Functions inherited from Gui::SoFCColorBarBase
virtual void customize (SoFCColorBarBase *)=0
 Opens a dialog to customize the current settings of the color bar. More...
 
virtual App::Color getColor (float fVal) const =0
 Returns the associated color to the value fVal. More...
 
virtual const char * getColorBarName () const =0
 Returns the name of the color bar. More...
 
virtual float getMaxValue () const =0
 Returns the current maximum of the parameter range. More...
 
virtual float getMinValue () const =0
 Returns the current minimum of the parameter range. More...
 
virtual void GLRenderBelowPath (SoGLRenderAction *action)
 
virtual bool isVisible (float fVal) const =0
 Returns always true if the color bar is in mode to show colors to arbitrary values of fVal, otherwise true is returned if fVal is within the specified parameter range, if not false is returned. More...
 
virtual void setOutsideGrayed (bool bVal)=0
 Sets whether values outside the range should be in gray,. More...
 
virtual void setRange (float fMin, float fMax, int prec=3)=0
 Sets the range of the colorbar from the maximum fMax to the minimum fMin. More...
 
virtual void triggerChange (SoFCColorBarBase *base)
 Forward a triggered change. More...
 
virtual Color getColor (float fVal) const =0
 
- Public Member Functions inherited from Base::Subject< int >
void Attach (Observer< int > *ToObserv)
 Attach an Observer Attach an Observer to the list of Observers which get called when Notify is called. More...
 
void ClearObserver ()
 Clears the list of all registered observers. More...
 
void Detach (Observer< int > *ToObserv)
 Detach an Observer Detach an Observer from the list of Observers which get called when Notify is called. More...
 
Observer< int > * Get (const char *Name)
 Get an Observer by name Get a observer by name if the observer reimplements the Name() mthode. More...
 
void Notify (int rcReason)
 Notify all Observers Send a message to all Observers attached to this subject. More...
 
 Subject ()
 A constructor. More...
 
virtual ~Subject ()
 A destructor. More...
 

Static Public Member Functions

static void finish ()
 
static void initClass ()
 
- Static Public Member Functions inherited from Gui::SoFCColorBarBase
static void finish ()
 
static void initClass ()
 

Protected Member Functions

void setViewportSize (const SbVec2s &size)
 Sets the current viewer size to all color bars to recalculate their new position. More...
 
virtual ~SoFCColorBar ()
 
- Protected Member Functions inherited from Gui::SoFCColorBarBase
float getBoundingWidth (const SbVec2s &size)
 Returns the width of the color bar and labels. More...
 
float getBounds (const SbVec2s &size, float &fMinX, float &fMinY, float &fMaxX, float &fMaxY)
 Computes the dimensions of the color bar and labels in coordinates with respect to the defined height of the camera. More...
 
void setModified ()
 Mark the object as modified. More...
 
virtual void setViewportSize (const SbVec2s &size)=0
 Sets the current viewer size to recalculate the new position. More...
 
 SoFCColorBarBase ()
 
virtual ~SoFCColorBarBase ()
 
- Protected Member Functions inherited from App::ValueFloatToRGB
 ValueFloatToRGB ()=default
 
virtual ~ValueFloatToRGB ()=default
 

Additional Inherited Members

- Public Types inherited from Base::Subject< int >
typedef int MessageType
 
typedef Observer< intObserverType
 
typedef Subject< intSubjectType
 

Detailed Description

The color bar class that redirects all calls to its handled color bars.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ SoFCColorBar()

SoFCColorBar::SoFCColorBar ( )

Constructor.

◆ ~SoFCColorBar()

SoFCColorBar::~SoFCColorBar ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ customize()

void SoFCColorBar::customize ( SoFCColorBarBase child)
virtual

Customizes the currently active color bar.

Implements Gui::SoFCColorBarBase.

References Gui::SoFCColorBarBase::customize().

Referenced by Gui::SoFCColorBarProxyObject::customEvent().

◆ finish()

void SoFCColorBar::finish ( void  )
static

Referenced by drafttaskpanels.task_circulararray.TaskPanelCircularArray::accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::accept(), drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), draftguitools.gui_arcs.Arc::action(), draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_beziers.CubicBezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_fillets.Fillet::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_move.Move::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_polygons.Polygon::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_rotate.Rotate::action(), draftguitools.gui_scale.Scale::action(), draftguitools.gui_selectplane.Draft_SelectPlane::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_split.Split::action(), draftguitools.gui_stretch.Stretch::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_trimex.Trimex::action(), draftguitools.gui_subelements.SubelementHighlight::action(), draftguitools.gui_clone.Clone::Activated(), draftguitools.gui_dimensions.Dimension::Activated(), draftguitools.gui_downgrade.Downgrade::Activated(), draftguitools.gui_draft2sketch.Draft2Sketch::Activated(), draftguitools.gui_edit.Edit::Activated(), draftguitools.gui_facebinders.Facebinder::Activated(), draftguitools.gui_join.Join::Activated(), draftguitools.gui_shape2dview.Shape2DView::Activated(), draftguitools.gui_subelements.SubelementHighlight::Activated(), draftguitools.gui_upgrade.Upgrade::Activated(), draftguitools.gui_wire2spline.WireToBSpline::Activated(), draftguitools.gui_selectplane.Draft_SelectPlane::checkSelection(), DraftGui.DraftToolBar::checkSpecialChars(), draftguitools.gui_points.Point::click(), draftguitools.gui_labels.Label::create(), draftguitools.gui_ellipses.Ellipse::createObject(), draftguitools.gui_rectangles.Rectangle::createObject(), draftguitools.gui_shapestrings.ShapeString::createObject(), draftguitools.gui_texts.Text::createObject(), draftviewproviders.view_text.ViewProviderText::createObject(), draftguitools.gui_stretch.Stretch::doStretch(), draftguitools.gui_arcs.Arc::drawArc(), draftguitools.gui_polygons.Polygon::drawPolygon(), DraftGui.DraftToolBar::escape(), Gui::SoFCDB::finish(), draftguitools.gui_move.Move::get_object_selection(), draftguitools.gui_rotate.Rotate::get_object_selection(), draftguitools.gui_scale.Scale::get_object_selection(), draftguitools.gui_arcs.Arc_3Points::getPoint(), draftguitools.gui_edit.Edit::keyPressed(), draftguitools.gui_dimensions.Dimension::numericInput(), draftguitools.gui_trimex.Trimex::numericRadius(), draftguitools.gui_fillets.Fillet::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAlign(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAuto(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickCenter(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickFront(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickMove(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickPrevious(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickSide(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickTop(), draftguitools.gui_array_simple.Array::proceed(), draftguitools.gui_clone.Clone::proceed(), draftguitools.gui_downgrade.Downgrade::proceed(), draftguitools.gui_draft2sketch.Draft2Sketch::proceed(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_facebinders.Facebinder::proceed(), draftguitools.gui_join.Join::proceed(), draftguitools.gui_patharray.PathArray::proceed(), draftguitools.gui_pathtwistedarray.PathTwistedArray::proceed(), draftguitools.gui_pointarray.PointArray::proceed(), draftguitools.gui_shape2dview.Shape2DView::proceed(), draftguitools.gui_subelements.SubelementHighlight::proceed(), draftguitools.gui_trimex.Trimex::proceed(), draftguitools.gui_upgrade.Upgrade::proceed(), draftguitools.gui_split.Split::proceed(), draftguitools.gui_selectplane.Draft_SelectPlane::reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray::reject(), and draftguitools.gui_edit.Edit::setTrackers().

◆ getActiveBar()

SoFCColorBarBase * SoFCColorBar::getActiveBar ( ) const

Returns the currently active color bar object.

Referenced by Gui::SoFCColorBarProxyObject::customEvent(), getColor(), getMaxValue(), getMinValue(), handleEvent(), and isVisible().

◆ getColor()

◆ getColorBarName()

const char * Gui::SoFCColorBar::getColorBarName ( ) const
virtual

Returns the name of the color bar.

Implements Gui::SoFCColorBarBase.

◆ getMaxValue()

float SoFCColorBar::getMaxValue ( ) const
virtual

Returns the current maximum of the parameter range of the currently active color bar.

Implements Gui::SoFCColorBarBase.

References getActiveBar(), and Gui::SoFCColorBarBase::getMaxValue().

Referenced by InspectionGui::ViewProviderInspection::attach(), MeshGui::ViewProviderMeshCurvature::attach(), and FemGui::ViewProviderFemPostObject::attach().

◆ getMinValue()

float SoFCColorBar::getMinValue ( ) const
virtual

Returns the current minimum of the parameter range of the currently active color bar.

Implements Gui::SoFCColorBarBase.

References getActiveBar(), and Gui::SoFCColorBarBase::getMinValue().

Referenced by InspectionGui::ViewProviderInspection::attach(), MeshGui::ViewProviderMeshCurvature::attach(), and FemGui::ViewProviderFemPostObject::attach().

◆ handleEvent()

void SoFCColorBar::handleEvent ( SoHandleEventAction *  action)

Handles the mouse button events and checks if the user has clicked on the area of the currently active color bar.

References getActiveBar(), and draftutils.gui_utils::select().

◆ initClass()

void SoFCColorBar::initClass ( void  )
static

Referenced by Gui::SoFCDB::init().

◆ isVisible()

bool SoFCColorBar::isVisible ( float  fVal) const
virtual

Returns the return value of the currently active color bar.

Implements Gui::SoFCColorBarBase.

References getActiveBar(), and Gui::SoFCColorBarBase::isVisible().

Referenced by ArchVRM.Renderer::removeHidden(), and InspectionGui::ViewProviderInspection::setDistances().

◆ setOutsideGrayed()

void SoFCColorBar::setOutsideGrayed ( bool  bVal)
virtual

Sets whether values outside the range should be in gray,.

Implements Gui::SoFCColorBarBase.

Referenced by InspectionGui::ViewProviderInspection::onChanged().

◆ setRange()

void SoFCColorBar::setRange ( float  fMin,
float  fMax,
int  prec = 3 
)
virtual

Sets the range of all color bars from the maximum fMax to the minimum fMin.

prec indicates the post decimal positions, prec should be in between 0 and 6.

Implements Gui::SoFCColorBarBase.

Referenced by InspectionGui::ViewProviderInspection::attach(), MeshGui::ViewProviderMeshCurvature::attach(), FemGui::ViewProviderFemPostObject::attach(), FemGui::ViewProviderFemPostObject::setRangeOfColorBar(), and InspectionGui::ViewProviderInspection::updateData().

◆ setViewportSize()

void SoFCColorBar::setViewportSize ( const SbVec2s &  size)
protectedvirtual

Sets the current viewer size to all color bars to recalculate their new position.

Implements Gui::SoFCColorBarBase.

◆ triggerChange()

void SoFCColorBar::triggerChange ( SoFCColorBarBase )
virtual

Notify observers.

Reimplemented from Gui::SoFCColorBarBase.

References Base::Subject< int >::Notify().


The documentation for this class was generated from the following files: