33 int x,
int y,
int w,
int h,
37 TControl(parent,
id,
nullptr, x, y, w, h, module)
43 Attr.Style |= SBS_HORZ;
49 Attr.Style |= SBS_VERT;
84 ZeroMemory(&info,
sizeof info);
85 info.cbSize =
sizeof info;
86 info.fMask = SIF_PAGE;
88 PageMagnitude = info.nPage;
103 if (!buffer && direction !=
tdSizeData)
return 0;
164 ZeroMemory(&info,
sizeof info);
165 info.cbSize =
sizeof info;
166 info.fMask = SIF_POS;
180 int minValue, maxValue;
185 if (thumbPos > maxValue)
188 else if (thumbPos < minValue)
193 ZeroMemory(&info,
sizeof info);
194 info.cbSize =
sizeof info;
195 info.fMask = SIF_POS;
196 info.nPos = thumbPos;
207 return PageMagnitude;
216 PageMagnitude = pagemagnitude;
219 ZeroMemory(&info,
sizeof info);
220 info.cbSize =
sizeof info;
221 info.fMask = SIF_PAGE;
222 info.nPage = pagemagnitude;
234 ZeroMemory(&info,
sizeof info);
235 info.cbSize =
sizeof info;
236 info.fMask = SIF_RANGE;
238 minValue = info.nMin;
239 maxValue = info.nMax;
250 ZeroMemory(&info,
sizeof info);
251 info.cbSize =
sizeof info;
252 info.fMask = SIF_RANGE;
253 info.nMin = minValue;
254 info.nMax = maxValue;
344 int minValue, maxValue;
357 int minValue, maxValue;
382 switch (scrollCode) {
387 case SB_TOP:
SBTop();
break;
389 case SB_THUMBPOSITION:
392 int p = (thumbPos32 != 0) ? thumbPos32 : thumbPos;
399 int p = (thumbPos32 != 0) ? thumbPos32 : thumbPos;
421#if OWL_PERSISTENT_STREAMS
430 is >> GetObject()->LineMagnitude
431 >> GetObject()->PageMagnitude;
439TScrollBar::Streamer::Write(opstream& os)
const
442 os << GetObject()->LineMagnitude
443 << GetObject()->PageMagnitude;
#define PRECONDITION(condition)
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
static const TUIMetric CyHScroll
static const TUIMetric CxVScroll
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...
int GetScrollTrackPos(int bar) const
Returns the thumb track position in the scroll bar.
virtual auto GetWindowClassName() -> TWindowClassName
int GetScrollPos(int bar) const
Returns the thumb position in the scroll bar.
virtual void SetupWindow()
Performs setup following creation of an associated MS-Windows window.
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...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
void WriteBaseObject(Base *base, opstream &out)
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
@ tdSizeData
Return the size of data transferred by the class.
@ tdSetData
Set data from the buffer into the window.
@ tdGetData
Get data from the window into the buffer.
Object Windows Library (OWLNext Core).
IMPLEMENT_STREAMABLE1(TApplication, TModule)
Definition of TUIMetric, a UI metrics provider class.