FLImaging 7.3.3.3
GUISlider.h
1#pragma once
2#include <afxwin.h>
3#include "GUISliderStyled.h"
4
5namespace FLImaging
6{
7 namespace GUI
8 {
9 class FL_EXPORT CGUISlider : public CGUISliderStyled
10 {
11 public:
12 CGUISlider();
13 virtual ~CGUISlider();
14
15 protected:
16 int32_t m_i32Pos;
17 int32_t m_i32Min;
18 int32_t m_i32Max;
19 int32_t m_i32Value;
20 int32_t m_i32Unit;
21 double m_f64UnitMin;
22 int32_t m_i32MaxPos;
23
24 CToolTipCtrl m_ToolTip;
25 Base::CFLString<wchar_t> m_strToolTipText;
26
27 public:
28 virtual void OnPosChanged();
29
30 virtual BOOL Create(_In_ DWORD dwStyle, _In_ const RECT& rect, _In_ CWnd* pParentWnd, _In_ UINT nID);
31
32 // Sets the minimum position for the slider in the trackbar control.
33 void SetRangeMin(_In_ int nMin, _In_ BOOL bRedraw = FALSE);
34
35 // Sets the maximum position for the slider in the trackbar control.
36 void SetRangeMax(_In_ int nMax, _In_ BOOL bRedraw = FALSE);
37
38 // Sets the minimum and maximum positions for the slider in the trackbar control.
39 void SetRange(_In_ int nMin, _In_ int nMax, _In_ BOOL bRedraw = FALSE);
40
41 // Sets the current logical position of the slider in the trackbar control.
42 virtual void SetPos(_In_ int nPos);
43
44 // Retrieves the maximum position for the slider in the trackbar control.
45 int GetRangeMax() const;
46
47 // Retrieves the minimum position for the slider in the trackbar control.
48 int GetRangeMin() const;
49
50 // Retrieves the minimum and maximum positions for the slider in the trackbar control.
51 void GetRange(int& nMin, int& nMax) const;
52
59 void SetUnit(int32_t i32Unit, BOOL bRedraw = FALSE);
60
66 int32_t GetUnit() const;
67
73 void SetValue(int32_t i32Value);
74
80 int32_t GetValue();
81
88 int32_t GetPosByValue(int32_t i32Value)const;
89
96 int32_t GetValueByPos(int32_t i32Pos)const;
97
98 void ShowTooltip(bool bShow);
99 bool IsTooltipVisible() const;
100
101 DECLARE_MESSAGE_MAP()
102 public:
103 afx_msg void OnPaint();
104 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
105 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
106 virtual BOOL PreTranslateMessage(MSG* pMsg);
107 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
108 afx_msg void OnNMReleasedcapture(NMHDR* pNMHDR, LRESULT* pResult);
109 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
110 void OnNeedText(NMHDR* pnmh, LRESULT* pResult);
111 afx_msg void OnDestroy();
112 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
113
114 bool m_bShowTooltip;
115};
116 }
117}
Definition D2DObject.h:12
@ SetRange
Set range.
Definition DefinitionsGUIViewGraph.h:1328