43 SelStart = SelEnd = 0;
66 SelStart = SelEnd = 0;
93 SelStart = SelEnd = 0;
213 for (
int i = 0;
i < TicCount;
i++)
277 SetSel(SelStart, SelEnd,
false);
295 return Snap && TicGap > 0 ? (((
pos-Min)+TicGap/2)/TicGap)*TicGap + Min :
pos;
341#if OWL_PERSISTENT_STREAMS
368 o->Tics =
o->TicCount ?
new int[
o->TicCount] : 0;
369 for (
int i = 0;
i <
o->TicCount;
i++)
376 o->SetRange(
o->Min,
o->Max);
384TSlider::Streamer::Write(opstream&
os)
const
386 TSlider*
o = GetObject();
401 for (
int i = 0;
i <
o->TicCount;
i++)
#define PRECONDITION(condition)
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
An abstract base class derived from TScrollBar, TSlider defines the basic behavior of sliders (contro...
void SetRange(int minValue, int maxValue, bool redraw=true) override
Checks and sets the slider range.
void SetSel(int start, int end, bool redraw=true)
Set a selection range for the slider.
~TSlider() override
Destructs a TSlider object and deletes ThumbRgn.
void SetPosition(int thumbPos)
Sets the position of the thumb and always redraws.
void GetSel(int &start, int &end)
TSlider(TWindow *parent, int id, int x, int y, int w, int h, TResId thumbResId, TModule *module=0)
Constructs a slider object setting Pos and ThumbRgn to 0, TicGap to Range divided by 10,...
void EvVScroll(uint scrollCode, uint thumbPos, HWND hWndCtl)
Overrides the handling in TScrollBar.
int SnapPos(int pos)
Constrains pos so it is in the range from Min to Max and (if snapping is enabled) performs snapping b...
void SetRuler(int ticGap, bool snap=false)
Sets the slider's ruler.
void SetupWindow() override
Calls TScrollBar::SetupWindow and SetupThumbRgn to set up the slider window.
auto GetWindowClassName() -> TWindowClassName override
Returns the windows system class name that this slider is basing itself on.
void EvHScroll(uint scrollCode, uint thumbPos, HWND hWndCtl)
Overrides the handling in TScrollBar.
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition of classes for CommonControl encapsulation.
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
#define IMPLEMENT_ABSTRACT_STREAMABLE1(cls, base1)
void ReadBaseObject(Base *base, ipstream &in)
void WriteBaseObject(Base *base, opstream &out)
Object Windows Library (OWLNext Core)
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
uint32 MkUint32(uint16 lo, uint16 hi)
TParam2 MkParam2(const T1 &lo, const T2 &hi)
Definition of classes TSlider & TVSlider.