xref: /aosp_15_r20/external/lzma/CPP/Windows/Control/Trackbar.h (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1*f6dc9357SAndroid Build Coastguard Worker // Windows/Control/Trackbar.h
2*f6dc9357SAndroid Build Coastguard Worker 
3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_WINDOWS_CONTROL_TRACKBAR_H
4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_WINDOWS_CONTROL_TRACKBAR_H
5*f6dc9357SAndroid Build Coastguard Worker 
6*f6dc9357SAndroid Build Coastguard Worker #include "../Window.h"
7*f6dc9357SAndroid Build Coastguard Worker 
8*f6dc9357SAndroid Build Coastguard Worker namespace NWindows {
9*f6dc9357SAndroid Build Coastguard Worker namespace NControl {
10*f6dc9357SAndroid Build Coastguard Worker 
11*f6dc9357SAndroid Build Coastguard Worker class CTrackbar: public CWindow
12*f6dc9357SAndroid Build Coastguard Worker {
13*f6dc9357SAndroid Build Coastguard Worker public:
14*f6dc9357SAndroid Build Coastguard Worker   void SetRange(int minimum, int maximum, bool redraw = true)
15*f6dc9357SAndroid Build Coastguard Worker     { SendMsg(TBM_SETRANGE, BoolToBOOL(redraw), MAKELONG(minimum, maximum)); }
16*f6dc9357SAndroid Build Coastguard Worker   void SetPos(int pos, bool redraw = true)
17*f6dc9357SAndroid Build Coastguard Worker     { SendMsg(TBM_SETPOS, BoolToBOOL(redraw), pos); }
SetTicFreq(int freq)18*f6dc9357SAndroid Build Coastguard Worker   void SetTicFreq(int freq)
19*f6dc9357SAndroid Build Coastguard Worker     { SendMsg(TBM_SETTICFREQ, freq); }
20*f6dc9357SAndroid Build Coastguard Worker 
GetPos()21*f6dc9357SAndroid Build Coastguard Worker   int GetPos()
22*f6dc9357SAndroid Build Coastguard Worker     { return (int)SendMsg(TBM_GETPOS); }
23*f6dc9357SAndroid Build Coastguard Worker };
24*f6dc9357SAndroid Build Coastguard Worker 
25*f6dc9357SAndroid Build Coastguard Worker }}
26*f6dc9357SAndroid Build Coastguard Worker 
27*f6dc9357SAndroid Build Coastguard Worker #endif
28