OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hslider.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1993, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implementation of THSlider, a horizontal slider UI widget
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9#include <owl/slider.h>
10#include <owl/dc.h>
11#include <owl/commctrl.h>
12#include <owl/uihelper.h>
13
14namespace owl {
15
17
18//
19/// Constructs a slider object with a default bitmap resource ID of IDB_HSLIDERTHUMB
20/// for the thumb knob.
21//
22THSlider::THSlider(TWindow* parent, int id, int x, int y, int w, int h, TResId thumbResId, TModule* module)
23:
24 TSlider(parent, id, x, y, w, h, thumbResId, module)
25{
26 if (!h)
27 Attr.H = 32;
28 Attr.Style |= TBS_HORZ; // In case it is Native, else we dont care
29}
30
31//
32/// Constructor for a slider object created from resource
33//
35:
36 TSlider(parent, resId, thumbResId, module)
37{}
38
39//
40/// Constructs a slider object to encapsulate (alias) an existing control.
41//
43:
44 TSlider(hWnd, module)
45{}
46
47
48
50
51#if OWL_PERSISTENT_STREAMS
52
53//
54//
55//
56void*
57THSlider::Streamer::Read(ipstream& is, uint32 /*version*/) const
58{
59 ReadBaseObject((TSlider*)GetObject(), is);
60 return GetObject();
61}
62
63//
64//
65//
66void
67THSlider::Streamer::Write(opstream& os) const
68{
69 WriteBaseObject((TSlider*)GetObject(), os);
70}
71
72#endif
73
74} // OWL namespace
75/* ========================================================================== */
76
Derived from TSlider, THSlider provides implementation details for horizontal sliders.
Definition slider.h:140
THSlider(TWindow *parent, int id, int x, int y, int w, int h, TResId thumbResId=IDB_HSLIDERTHUMB, TModule *=0)
Constructs a slider object with a default bitmap resource ID of IDB_HSLIDERTHUMB for the thumb knob.
Definition hslider.cpp:22
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
An abstract base class derived from TScrollBar, TSlider defines the basic behavior of sliders (contro...
Definition slider.h:55
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
HWND THandle
TWindow encapsulates an HWND.
Definition window.h:418
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
Definition of classes for CommonControl encapsulation.
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
void ReadBaseObject(Base *base, ipstream &in)
Definition objstrm.h:1159
#define IMPLEMENT_STREAMABLE1(cls, base1)
Definition objstrm.h:1725
void WriteBaseObject(Base *base, opstream &out)
Definition objstrm.h:1150
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
unsigned long uint32
Definition number.h:34
OWL_DIAGINFO
Definition animctrl.cpp:14
Definition of classes TSlider & TVSlider.
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.