FLImaging 6.5.8.1
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 BOOL m_bCursorOnWnd;
17 BOOL m_bLButtonDown;
18
19 int32_t m_i32Pos;
20 int32_t m_i32Min;
21 int32_t m_i32Max;
22 int32_t m_i32Value;
23 int32_t m_i32Unit;
24 double m_f64UnitMin;
25 int32_t m_i32MaxPos;
26
27 CToolTipCtrl m_ToolTip;
28 Base::CFLString<wchar_t> m_strToolTipText;
29
30 public:
31 virtual void OnPosChanged();
32
33 virtual BOOL Create(_In_ DWORD dwStyle, _In_ const RECT& rect, _In_ CWnd* pParentWnd, _In_ UINT nID);
34
35 // Sets the minimum position for the slider in the trackbar control.
36 void SetRangeMin(_In_ int nMin, _In_ BOOL bRedraw = FALSE);
37
38 // Sets the maximum position for the slider in the trackbar control.
39 void SetRangeMax(_In_ int nMax, _In_ BOOL bRedraw = FALSE);
40
41 // Sets the minimum and maximum positions for the slider in the trackbar control.
42 void SetRange(_In_ int nMin, _In_ int nMax, _In_ BOOL bRedraw = FALSE);
43
44 // Sets the current logical position of the slider in the trackbar control.
45 virtual void SetPos(_In_ int nPos);
46
47 // Retrieves the maximum position for the slider in the trackbar control.
48 int GetRangeMax() const;
49
50 // Retrieves the minimum position for the slider in the trackbar control.
51 int GetRangeMin() const;
52
53 // Retrieves the minimum and maximum positions for the slider in the trackbar control.
54 void GetRange(int& nMin, int& nMax) const;
55
62 void SetUnit(int32_t i32Unit, BOOL bRedraw = FALSE);
63
69 int32_t GetUnit() const;
70
76 void SetValue(int32_t i32Value);
77
83 int32_t GetValue();
84
91 int32_t GetPosByValue(int32_t i32Value)const;
92
99 int32_t GetValueByPos(int32_t i32Pos)const;
100
101 void ShowTooltip(bool bShow);
102 bool IsTooltipVisible() const;
103
104 DECLARE_MESSAGE_MAP()
105 public:
106 afx_msg void OnPaint();
107 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
108 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
109 virtual BOOL PreTranslateMessage(MSG* pMsg);
110 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
111 afx_msg void OnNMReleasedcapture(NMHDR* pNMHDR, LRESULT* pResult);
112 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
113 void OnNeedText(NMHDR* pnmh, LRESULT* pResult);
114 afx_msg void OnDestroy();
115 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
116
117 bool m_bShowTooltip;
118};
119 }
120}
@ SetRange
그래프 뷰의 표시 범위 지정