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
vslider.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 TVSlider, vertical slider UI widget
7//----------------------------------------------------------------------------
8#include <owl/pch.h>
9#include <owl/defs.h>
10#include <owl/slider.h>
11#include <owl/dc.h>
12#include <owl/commctrl.h>
13#include <owl/uihelper.h>
14
15namespace owl {
16
18
19
20//
21/// Constructs a vertical slider object with a default bitmap resource ID of
22/// IDB_VSLIDERTHUMB for the thumb knob.
23//
24TVSlider::TVSlider(TWindow* parent, int id, int x, int y, int w, int h, TResId thumbResId, TModule* module)
25:
26 TSlider(parent, id, x, y, w, h, thumbResId, module)
27{
28 if (!w)
29 Attr.W = 32;
30 Attr.Style |= TBS_VERT; // In case it is Native, else we dont care
31}
32
33//
34/// Constructor for a slider object created from resource
35//
37:
38 TSlider(parent, resId, thumbResId, module)
39{}
40
41//
42/// Constructs a slider object to encapsulate (alias) an existing control.
43//
45:
46 TSlider(hWnd, module)
47{}
48
49
50//----------------------------------------------------------------------------
51// Protected implementation
52
53
55
56#if OWL_PERSISTENT_STREAMS
57
58//
59//
60//
61void*
62TVSlider::Streamer::Read(ipstream& is, uint32 /*version*/) const
63{
64 ReadBaseObject((TSlider*)GetObject(), is);
65 return GetObject();
66}
67
68//
69//
70//
71void
72TVSlider::Streamer::Write(opstream& os) const
73{
74 WriteBaseObject((TSlider*)GetObject(), os);
75}
76
77#endif
78
79} // OWL namespace
80/* ========================================================================== */
81
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
Derived from TSlider, TVSlider provides implementation details for vertical sliders.
Definition slider.h:166
TVSlider(TWindow *parent, int id, int x, int y, int w, int h, TResId thumbResId=IDB_VSLIDERTHUMB, TModule *=0)
Constructs a vertical slider object with a default bitmap resource ID of IDB_VSLIDERTHUMB for the thu...
Definition vslider.cpp:24
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
General definitions used by all ObjectWindows programs.
Definition of classes TSlider & TVSlider.
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.