FLImaging
7.8.25.3
Toggle main menu visibility
FLImagingFoundation
FLImagingGUI
GUISliderOwnerDrawn.h
1
#pragma once
2
#include "GUISliderOwnerDrawnBase.h"
3
4
namespace
FLImaging
5
{
6
namespace
GUI
7
{
8
template
<
typename
T>
9
class
FL_EXPORT CGUISliderOwnerDrawn :
public
CGUISliderOwnerDrawnBase
10
{
11
public
:
25
CGUISliderOwnerDrawn(CWnd* pParentWnd, EOrientation eOrientation = EOrientation_Horizontal);
26
34
virtual
~CGUISliderOwnerDrawn();
35
47
virtual
const
CResult CalcSliderRegion(CRect* pRect)
override
;
48
58
virtual
void
Draw(CDC* pDC)
const override
;
59
71
void
SetRangeMin(T tMin,
bool
bRedraw =
false
);
72
84
void
SetRangeMax(T tMax,
bool
bRedraw =
false
);
85
99
void
SetRange(T tMin, T tMax,
bool
bRedraw =
false
);
100
110
T GetRangeMax()
const
;
111
121
T GetRangeMin()
const
;
122
134
void
GetRange(T& tMin, T& tMax)
const
;
135
147
void
SetUnit(T tUnit,
bool
bRedraw =
false
);
148
157
T GetUnit()
const
;
158
174
void
SetExponentialBase(T tExponentialBase = 10,
bool
bRedraw =
false
);
175
185
T GetExponentialBase()
const
;
186
200
void
SetValue(T tValue,
bool
bRedraw,
bool
bSendMessage =
true
);
201
213
void
IncreaseValue(T tValue,
bool
bRedraw);
214
226
void
DecreaseValue(T tValue,
bool
bRedraw);
227
239
void
IncreaseTick(int32_t i32Tick,
bool
bRedraw);
240
252
void
DecreaseTick(int32_t i32Tick,
bool
bRedraw);
253
265
void
IncreasePos(int32_t i32PosDelta,
bool
bRedraw);
266
278
void
DecreasePos(int32_t i32PosDelta,
bool
bRedraw);
279
289
T GetValue()
const
;
290
302
int32_t GetPosByValue(T tValue)
const
;
303
315
T GetValueByPos(int32_t i32Pos)
const
;
316
324
virtual
void
UpdateSlider()
override
;
325
337
T GetRemainder(T tValue)
const
;
338
350
virtual
void
OnMouseWheel(
const
CPoint& ptPoint,
bool
bUpWheel);
351
virtual
void
OnLButtonUp(
const
CPoint& ptPoint)
override
;
352
virtual
void
OnMouseMove(
const
CPoint& ptPoint)
override
;
353
354
protected
:
355
virtual
void
SetPos(int32_t i32Pos,
bool
bSetValue,
bool
bSendMsg,
bool
bRedraw)
override
;
356
virtual
void
RecalculateLayoutMetrics()
override
;
357
358
protected
:
359
T m_tRangeMin;
// Range min
360
T m_tRangeMax;
// Range max
361
mutable
T m_tValue;
// current value
362
T m_tUnit;
363
T m_tExponentialBase;
364
};
365
}
366
}
FLImaging::GUI
Definition
D2DObject.h:12
FLImaging
Generated on
for FLImaging by
1.17.0