Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::glui::FloatMinMaxPropertyWidget Class Reference

glui property widget for a float minmax property using glui::RangeSlider More...

#include <floatminmaxpropertywidget.h>

+ Inheritance diagram for inviwo::glui::FloatMinMaxPropertyWidget:

Public Member Functions

virtual std::string getClassIdentifier () const override
 
 FloatMinMaxPropertyWidget (FloatMinMaxProperty &property, Processor &processor, Renderer &uiRenderer, const ivec2 &extent=ivec2(100, 24), UIOrientation orientation=UIOrientation::Horizontal)
 
virtual void updateFromProperty () override
 
virtual void onSetVisible (Property *property, bool visible) override
 
virtual void onSetDisplayName (Property *property, const std::string &displayName) override
 
virtual void onSetReadOnly (Property *property, bool readonly) override
 
- Public Member Functions inherited from inviwo::glui::RangeSlider
 RangeSlider (const std::string &label, const ivec2 &value, int minValue, int maxValue, int minSeparation, Processor &processor, Renderer &uiRenderer, const ivec2 &extent=ivec2(100, 24), UIOrientation orientation=UIOrientation::Horizontal)
 
void set (const ivec2 &value)
 
void set (const ivec2 &value, int minValue, int maxValue, int minSeparation)
 
const ivec2 & get () const
 
void setStart (int start)
 
void setEnd (int stop)
 
int getMinValue () const
 
int getMaxValue () const
 
void setMinSeparation (int sep)
 
int getMinSeparation () const
 
double getHandleWidth () const
 
void setShowGroove (bool show)
 
bool getShowGroove () const
 
void setFlipped (bool flipped)
 
bool getFlipped () const
 
- Public Member Functions inherited from inviwo::glui::Element
 Element (const std::string &label, Processor &processor, Renderer &uiRenderer, UIOrientation orientation=UIOrientation::Horizontal)
 
void setVisible (bool visible=true)
 
bool isVisible () const
 
void setEnabled (bool enable=true)
 
bool isEnabled () const
 
void setLabel (const std::string &str)
 
const std::string & getLabel () const
 
void setFontSize (int size)
 
int getFontSize () const
 
void setLabelBold (bool bold)
 
bool isLabelBold () const
 
void setLabelVisible (bool visible=true)
 
bool isLabelVisible () const
 
void setScalingFactor (double factor)
 
double getScalingFactor () const
 
void setOrientation (UIOrientation orientation)
 
UIOrientation getOrientation () const
 
bool isDirty () const
 
void setWidgetExtent (const ivec2 &extent)
 sets the extent of the widget
 
const ivec2 & getWidgetExtent () const
 
void setWidgetExtentScaled (const ivec2 &extent)
 sets the extent of the widget
 
ivec2 getWidgetExtentScaled () const
 returns the true widget extent including scaling
 
const ivec2 & getExtent ()
 return extent of the element, including both widget and label, and considering scaling
 
void render (const ivec2 &origin, const size2_t &canvasDim)
 render the widget and its label at the given position
 
void setHoverState (bool enable)
 
bool isHovered () const
 
void setPushedState (bool pushed)
 
bool isPushed () const
 
void setChecked (bool checked)
 
bool isChecked () const
 
void setAction (const std::function< void()> &action)
 sets the callback action when the user releases the mouse button
 
void setPickingEventAction (std::function< void(PickingEvent *e)> pickingAction)
 
- Public Member Functions inherited from inviwo::PropertyWidget
 PropertyWidget (Property *property)
 
 PropertyWidget (const PropertyWidget &)
 
 PropertyWidget (PropertyWidget &&)
 
PropertyWidgetoperator= (const PropertyWidget &)
 
PropertyWidgetoperator= (PropertyWidget &&)
 
virtual ~PropertyWidget ()
 
virtual PropertyEditorWidgetgetEditorWidget () const
 
virtual bool hasEditorWidget () const
 
virtual PropertygetProperty ()
 
- Public Member Functions inherited from inviwo::PropertyObserver
virtual void onSetIdentifier (Property *property, const std::string &identifier)
 
virtual void onSetSemantics (Property *property, const PropertySemantics &semantics)
 
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Static Public Attributes

static const std::string classIdentifier
 
- Static Public Attributes inherited from inviwo::glui::RangeSlider
static const std::string classIdentifier
 

Additional Inherited Members

- Public Types inherited from inviwo::glui::Element
enum class  UIState { Normal , Pressed , Checked }
 
- Protected Member Functions inherited from inviwo::glui::RangeSlider
virtual void renderWidget (const ivec2 &origin, const size2_t &canvasDim) override
 
const ivec2 & getPreviousValue () const
 
double convertDeltaToSlider (dvec2 delta) const
 transform mouse movements from pixel to normalized slider range while also considering the slider orientation
 
- Protected Member Functions inherited from inviwo::glui::Element
void triggerAction ()
 updates the UI state and triggers the callback action set by setAction(). This function is called when the user releases the mouse button.
 
void setMouseMoveAction (const std::function< bool(const dvec2 &)> &action)
 set callback function for handling mouse movements based on a delta position. This callback gets called on mouse move events.
 
bool moveAction (const dvec2 &delta)
 gets called on mouse move events
 
void updateExtent ()
 
void updateLabelPos ()
 
void updateLabel ()
 
virtual void updateState ()
 is called before the action is triggered to update the internal UI state
 
void renderLabel (const ivec2 &origin, const size2_t &canvasDim)
 
void handlePickingEvent (PickingEvent *e)
 
TextRenderergetCurrentTextRenderer () const
 set up text renderer for rendering the label using current settings, i.e. font size, widget scaling, and whether it should be rendered bold
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 
- Static Protected Member Functions inherited from inviwo::glui::Element
static vec4 adjustColor (const vec4 &color)
 
- Protected Attributes inherited from inviwo::glui::Element
std::function< void()> action_
 
std::function< bool(const dvec2 &)> moveAction_
 is called by mouseMoved()
 
std::function< void(PickingEvent *e)> pickingAction_
 
bool hovered_
 
bool pushed_
 
bool checked_
 
bool visible_
 
bool enabled_
 
bool boldLabel_
 
bool labelVisible_
 
int labelFontSize_
 
UIOrientation orientation_
 
ivec2 extent_ = ivec2(0)
 
ivec2 widgetPos_ = ivec2(0)
 
ivec2 widgetExtent_ = ivec2(0)
 
ivec2 labelPos_ = ivec2(0)
 
ivec2 labelExtent_ = ivec2(0)
 
double scalingFactor_
 
std::string labelStr_
 
bool labelDirty_
 
std::shared_ptr< Texture2DlabelTexture_
 
Processorprocessor_
 
RendereruiRenderer_
 
PickingMapper pickingMapper_
 
size_t currentPickingID_
 
- Protected Attributes inherited from inviwo::PropertyWidget
Propertyproperty_ = nullptr
 
- Protected Attributes inherited from inviwo::Observer
std::unordered_set< ObservableInterface * > observables_
 

Detailed Description

glui property widget for a float minmax property using glui::RangeSlider

Member Function Documentation

◆ getClassIdentifier()

virtual std::string inviwo::glui::FloatMinMaxPropertyWidget::getClassIdentifier ( ) const
overridevirtual

Reimplemented from inviwo::glui::RangeSlider.

◆ onSetDisplayName()

virtual void inviwo::glui::FloatMinMaxPropertyWidget::onSetDisplayName ( Property * property,
const std::string & displayName )
overridevirtual

Reimplemented from inviwo::PropertyObserver.

◆ onSetReadOnly()

virtual void inviwo::glui::FloatMinMaxPropertyWidget::onSetReadOnly ( Property * property,
bool readonly )
overridevirtual

Reimplemented from inviwo::PropertyObserver.

◆ onSetVisible()

virtual void inviwo::glui::FloatMinMaxPropertyWidget::onSetVisible ( Property * property,
bool visible )
overridevirtual

Reimplemented from inviwo::PropertyObserver.

◆ updateFromProperty()

virtual void inviwo::glui::FloatMinMaxPropertyWidget::updateFromProperty ( )
overridevirtual

Implement this function to update the widget after the property has been modified.

Implements inviwo::PropertyWidget.


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