FLImaging 6.5.8.1
GUIPropertyItemSliderDualHandle.h
1#pragma once
2#include "GUIPropertyItemSliderBase.h"
3
13namespace FLImaging
14{
16 namespace GUI
17 {
18 class CGUISliderOwnerDrawnBase;
19
28 {
29 friend class CGUIPropertyGridPropertySliderDualHandle;
30
31 public:
41 CGUIPropertyItemSliderDualHandle(ESliderTemplateType eTemplateType = ESliderTemplateType_Int32);
42
50
66 virtual bool SetPropertyCallbackMin(CPropertyCallback* pFunc, bool bAutoDestroy = true);
67
79 virtual CPropertyCallback* GetPropertyCallbackMin() const;
80
96 virtual bool SetPropertyCallbackMax(CPropertyCallback* pFunc, bool bAutoDestroy = true);
97
109 virtual CPropertyCallback* GetPropertyCallbackMax() const;
110
124 virtual bool SetValueMin(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true);
125
139 virtual bool SetValueMax(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true);
140
156 virtual bool SetValue(Base::CFLString<wchar_t> strValueMin, Base::CFLString<wchar_t> strValueMax, bool bInvokeCallback = true);
157
169 virtual bool SetBufferValueMin(const Base::CFLString<wchar_t>& strValue);
170
182 virtual bool SetBufferValueMax(const Base::CFLString<wchar_t>& strValue);
183
197 virtual bool SetBufferValue(const Base::CFLString<wchar_t>& strValueMin, const Base::CFLString<wchar_t>& strValueMax);
198
209
220 virtual void GetValue(Base::CFLString<wchar_t>& strMin, Base::CFLString<wchar_t>& strMax) const;
221
232
243
254
265
277 virtual bool SetOrigValueMin(const Base::CFLString<wchar_t>& strValue);
278
290 virtual bool SetOrigValueMax(const Base::CFLString<wchar_t>& strValue);
291
301 virtual void SetDefaultValueMin(const Base::CFLString<wchar_t>& strDefaultValue);
302
312 virtual void SetDefaultValueMax(const Base::CFLString<wchar_t>& strDefaultValue);
313
325 virtual void SetDefaultValue(const Base::CFLString<wchar_t>& strDefaultValueMin, const Base::CFLString<wchar_t>& strDefaultValueMax);
326
337
348
358 virtual void ShowSlider(bool bShow);
359
369 virtual bool IsSliderVisible() const;
370
382 virtual void SetLabel(const Base::CFLString<wchar_t>& strMinLabel, const Base::CFLString<wchar_t>& strMaxLabel);
383
393 virtual void SetMinLabel(const Base::CFLString<wchar_t>& strLabel);
394
404 virtual void SetMaxLabel(const Base::CFLString<wchar_t>& strLabel);
405
416
427
439 virtual void SetLabelRatio(float f32MinRatio = 0.f, float f32MaxRatio = 0.f);
440
450 virtual void SetMinLabelRatio(float f32Ratio = 0.f);
451
461 virtual void SetMaxLabelRatio(float f32Ratio = 0.f);
462
472 virtual float GetMinLabelRatio() const;
473
483 virtual float GetMaxLabelRatio() const;
484
496 virtual const CResult SetHandleSlideTogether(bool bSet = true);
497
508 virtual bool IsHandleSlidingTogether() const;
509
510
511 virtual CMFCPropertyGridProperty* CreateGridProperty() override;
512 virtual bool Save(const Base::CFLString<wchar_t>& strFilePath) const override;
513 virtual bool Save(Base::CFLArray<Base::CFLString<wchar_t>>& flaData) const override;
514 virtual bool Load(const Base::CFLString<wchar_t>& strFilePath) override;
515 virtual bool Load(const Base::CFLArray<Base::CFLString<wchar_t>>& flaData) override;
516
517 private:
518 virtual bool SetValue(Base::CFLString<wchar_t> strValue, bool bInvokeCallback = true) override;
519 virtual bool SetBufferValue(Base::CFLString<wchar_t> strValue) override;
520 virtual Base::CFLString<wchar_t> GetValue() const override;
521 virtual Base::CFLString<wchar_t> GetBufferValue() const override;
522 virtual Base::CFLString<wchar_t> GetPrevBufferValue() const override;
523 virtual bool SetOrigValue(const Base::CFLString<wchar_t>& strValue) override;
524 virtual void SetDefaultValue(const Base::CFLString<wchar_t>& strDefaultValue) override;
525 virtual Base::CFLString<wchar_t> GetDefaultValue() const override;
526 virtual bool SetPropertyCallback(CPropertyCallback* pFunc, bool bAutoDestroy = true)override;
527 virtual CPropertyCallback* GetPropertyCallback() const override;
528
529 protected:
530 SVariant m_varValueMin;
531 SVariant m_varValueMax;
532
533 Base::CFLString<wchar_t> m_strDefaultValueMin;
534 Base::CFLString<wchar_t> m_strDefaultValueMax;
535
536 Base::CFLString<wchar_t> m_strInitialValueMin;
537 Base::CFLString<wchar_t> m_strInitialValueMax;
538
539 Base::CFLString<wchar_t> m_strBufferValueMin;
540 Base::CFLString<wchar_t> m_strBufferValueMax;
541
542 Base::CFLString<wchar_t> m_strPrevBufferValueMin;
543 Base::CFLString<wchar_t> m_strPrevBufferValueMax;
544
545 Base::CFLString<wchar_t> m_strLabelMin;
546 Base::CFLString<wchar_t> m_strLabelMax;
547
548 bool m_bDrawSlider;
549 bool m_bHandleSlidingTogether;
550 float m_f32LabelMinRatio;
551 float m_f32LabelMaxRatio;
552
553 CPropertyCallback* m_pPropertyCallbackMin;
554 CPropertyCallback* m_pPropertyCallbackMax;
555 bool m_bPropertyCallbackMinAutoDestroy;
556 bool m_bPropertyCallbackMaxAutoDestroy;
557 };
558 }
559}
560
Template type array class.
Definition RangeTree.h:19
Template type string class.
Definition INIUtilities.h:20
FLImaging module execution result object.
Definition ResultsDef.h:1514
A base class of slider property item class.
Definition GUIPropertyItemSliderBase.h:28
A slider property item class with dual handles.
Definition GUIPropertyItemSliderDualHandle.h:28
virtual void ShowSlider(bool bShow)
Sets whether the slider is visible or not.
virtual bool SetPropertyCallbackMin(CPropertyCallback *pFunc, bool bAutoDestroy=true)
Sets the callback function to be executed when the minimum value is set.
virtual bool SetPropertyCallbackMax(CPropertyCallback *pFunc, bool bAutoDestroy=true)
Sets the callback function to be executed when the maximum value is set.
virtual bool SetOrigValueMax(const Base::CFLString< wchar_t > &strValue)
Sets the original maximum value of this.
virtual Base::CFLString< wchar_t > GetValueMin() const
Retrieves the minimum value of this.
virtual ~CGUIPropertyItemSliderDualHandle()
Destructor for CGUIPropertyItemSliderDualHandle class.
virtual float GetMinLabelRatio() const
Retrieves the label ratio for the minimum value of the slider.
virtual bool SetValue(Base::CFLString< wchar_t > strValueMin, Base::CFLString< wchar_t > strValueMax, bool bInvokeCallback=true)
Sets the minimum and maximum value for the slider from a string.
virtual bool Save(Base::CFLArray< Base::CFLString< wchar_t > > &flaData) const override
Function to record the value of this in INI data array.
CGUIPropertyItemSliderDualHandle(ESliderTemplateType eTemplateType=ESliderTemplateType_Int32)
Constructor for CGUIPropertyItemSliderDualHandle class.
virtual CPropertyCallback * GetPropertyCallbackMin() const
Retrieves the callback function associated with setting the minimum value.
virtual void SetMinLabel(const Base::CFLString< wchar_t > &strLabel)
Sets the label for the minimum value of the slider.
virtual void SetMaxLabelRatio(float f32Ratio=0.f)
Sets the label ratio for the maximum value of the slider.
virtual void SetMaxLabel(const Base::CFLString< wchar_t > &strLabel)
Sets the label for the maximum value of the slider.
virtual Base::CFLString< wchar_t > GetMinLabel() const
Retrieves the label for the minimum value of the slider.
virtual void SetDefaultValue(const Base::CFLString< wchar_t > &strDefaultValueMin, const Base::CFLString< wchar_t > &strDefaultValueMax)
Sets the default maximum value of this.
virtual Base::CFLString< wchar_t > GetMaxLabel() const
Retrieves the label for the maximum value of the slider.
virtual Base::CFLString< wchar_t > GetBufferValueMin() const
Retrieves the minimum buffer value of this.
virtual bool SetBufferValue(const Base::CFLString< wchar_t > &strValueMin, const Base::CFLString< wchar_t > &strValueMax)
Sets the minimum and maximum buffer value of this.
virtual bool Save(const Base::CFLString< wchar_t > &strFilePath) const override
Saves the value of this to an ini file.
virtual void SetLabelRatio(float f32MinRatio=0.f, float f32MaxRatio=0.f)
Sets the label ratios for the minimum and maximum values of the slider.
virtual bool Load(const Base::CFLArray< Base::CFLString< wchar_t > > &flaData) override
Loads the value of this from a string array.
virtual Base::CFLString< wchar_t > GetValueMax() const
Retrieves the maximum value of this.
virtual Base::CFLString< wchar_t > GetPrevBufferValueMin() const
Retrieves the previous minimum buffer value of this.
virtual bool SetBufferValueMin(const Base::CFLString< wchar_t > &strValue)
Sets the minimum buffer value of this.
virtual bool IsHandleSlidingTogether() const
Returns whether the slider handles (thumbs) move together upon collision or stop at their positions.
virtual void SetMinLabelRatio(float f32Ratio=0.f)
Sets the label ratio for the minimum value of the slider.
virtual bool SetValueMin(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true)
Sets the minimum value for the slider from a string.
virtual bool IsSliderVisible() const
Retrieves whether the slider is visible or not.
virtual void SetLabel(const Base::CFLString< wchar_t > &strMinLabel, const Base::CFLString< wchar_t > &strMaxLabel)
Sets the labels for the minimum and maximum values of the slider.
virtual const CResult SetHandleSlideTogether(bool bSet=true)
Sets whether the slider handles (thumbs) should stop upon collision or move together....
virtual bool SetValueMax(Base::CFLString< wchar_t > strValue, bool bInvokeCallback=true)
Sets the maximum value for the slider from a string.
virtual Base::CFLString< wchar_t > GetDefaultValueMax() const
Retrieves the default maximum value of this.
virtual void SetDefaultValueMin(const Base::CFLString< wchar_t > &strDefaultValue)
Sets the default minimum value of this.
virtual CMFCPropertyGridProperty * CreateGridProperty() override
Creates and returns a new grid property associated with this.
virtual void SetDefaultValueMax(const Base::CFLString< wchar_t > &strDefaultValue)
Sets the default maximum value of this.
virtual bool Load(const Base::CFLString< wchar_t > &strFilePath) override
Loads the value of this from an ini file.
virtual Base::CFLString< wchar_t > GetDefaultValueMin() const
Retrieves the default minimum value of this.
virtual float GetMaxLabelRatio() const
Retrieves the label ratio for the maximum value of the slider.
virtual CPropertyCallback * GetPropertyCallbackMax() const
Retrieves the callback function associated with setting the maximum value.
virtual bool SetOrigValueMin(const Base::CFLString< wchar_t > &strValue)
Sets the original minimum value of this.
virtual bool SetBufferValueMax(const Base::CFLString< wchar_t > &strValue)
Sets the maximum buffer value of this.
virtual Base::CFLString< wchar_t > GetBufferValueMax() const
Retrieves the maximum buffer value of this.
virtual Base::CFLString< wchar_t > GetPrevBufferValueMax() const
Retrieves the previous maximum buffer value of this.
ESliderTemplateType
Template type of slider.
Definition GUIDefinitions.h:9926