OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
uimetric.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of TUIMetric, a UI metrics provider class
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_UIMETRIC_H)
10#define OWL_UIMETRIC_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/wsysinc.h>
18
19
20namespace owl {
21
22#include <owl/preclass.h>
23
24//
25/// \class TUIMetric
26// ~~~~~ ~~~~~~~~~~
27/// TUIMetric encapsulates the GetSystemMetric() API. Typical using:
28/// \code
29/// Margins.Left = Margins.Right = TUIMetric::CxFixedFrame;
30/// Margins.Top = Margins.Bottom = TUIMetric::CyFixedFrame;
31/// \endcode
33 public:
34 static const TUIMetric CxScreen;
35 static const TUIMetric CyScreen;
36 static const TUIMetric CxVScroll;
37 static const TUIMetric CyHScroll;
38 static const TUIMetric CyCaption;
39 static const TUIMetric CxBorder;
40 static const TUIMetric CyBorder;
41 static const TUIMetric CxFixedFrame;
42 static const TUIMetric CyFixedFrame;
43 static const TUIMetric CyVThumb;
44 static const TUIMetric CxHThumb;
45 static const TUIMetric CxIcon;
46 static const TUIMetric CyIcon;
47 static const TUIMetric CxCursor;
48 static const TUIMetric CyCursor;
49 static const TUIMetric CyMenu;
50 static const TUIMetric CxFullScreen;
51 static const TUIMetric CyFullScreen;
53 static const TUIMetric MousePresent;
54 static const TUIMetric CyVScroll;
55 static const TUIMetric CxHScroll;
56 static const TUIMetric Debug;
57 static const TUIMetric SwapButton;
58 static const TUIMetric Reserved1;
59 static const TUIMetric Reserved2;
60 static const TUIMetric Reserved3;
61 static const TUIMetric Reserved4;
62 static const TUIMetric CxMin;
63 static const TUIMetric CyMin;
64 static const TUIMetric CxSize;
65 static const TUIMetric CySize;
66 static const TUIMetric CxSizeFrame;
67 static const TUIMetric CySizeFrame;
68 static const TUIMetric CxMinTrack;
69 static const TUIMetric CyMinTrack;
70 static const TUIMetric CxDoubleClk;
71 static const TUIMetric CyDoubleClk;
75 static const TUIMetric PenWindows;
76 static const TUIMetric DbcsEnabled;
78 static const TUIMetric Secure;
79 static const TUIMetric CxEdge;
80 static const TUIMetric CyEdge;
81 static const TUIMetric CxMinSpacing;
82 static const TUIMetric CyMinSpacing;
83 static const TUIMetric CxSmIcon;
84 static const TUIMetric CySmIcon;
85 static const TUIMetric CySmCaption;
86 static const TUIMetric CxSmSize;
87 static const TUIMetric CySmSize;
88 static const TUIMetric CxMenuSize;
89 static const TUIMetric CyMenuSize;
90 static const TUIMetric Arrange;
91 static const TUIMetric CxMinimized;
92 static const TUIMetric CyMinimized;
93 static const TUIMetric CxMaxTrack;
94 static const TUIMetric CyMaxTrack;
95 static const TUIMetric CxMaximized;
96 static const TUIMetric CyMaximized;
97 static const TUIMetric ShowSounds;
98 static const TUIMetric KeyboardPref;
99 static const TUIMetric HighContrast;
101 static const TUIMetric CleanBoot;
102 static const TUIMetric CxDrag;
103 static const TUIMetric CyDrag;
104 static const TUIMetric Network;
105 static const TUIMetric CxMenuCheck;
106 static const TUIMetric CyMenuCheck;
107 static const TUIMetric SlowMachine;
109
112
113 static const TUIMetric MouseWheelPresent; // only NT or WinVer > 5.0
114 //#if(WINVER >= 0x0500)
119 static const TUIMetric CMonitors;
121 //#endif /* WINVER >= 0x0500 */
122 //for NT >= 4.0 or Win 98 == 83 else 76
123 static const TUIMetric CMetrics;
124
125
126 TUIMetric(int i);
127
128 operator int() const;
129
130 int Get() const;
131 static int Get(int i);
132
133 private:
134 int I;
135};
136
137#include <owl/posclass.h>
138
139//
141:
142 I(i)
143{
144}
145
146//
147inline TUIMetric::operator int() const {
148 return Get();
149}
150
151//
152inline int TUIMetric::Get() const {
153 return Get(I);
154}
155
156//
157inline int TUIMetric::Get(int i) {
158 return ::GetSystemMetrics(i);
159}
160
161} // OWL namespace
162
163
164#endif // OWL_UIMETRIC_H
TUIMetric encapsulates the GetSystemMetric() API.
Definition uimetric.h:32
static const TUIMetric XVirtualScreen
Definition uimetric.h:115
static const TUIMetric Secure
Definition uimetric.h:78
static const TUIMetric CMonitors
Definition uimetric.h:119
static const TUIMetric CxSize
Definition uimetric.h:64
static const TUIMetric MouseWheelPresent
Definition uimetric.h:113
static const TUIMetric CxScreen
Definition uimetric.h:34
static const TUIMetric CyVThumb
Definition uimetric.h:43
static const TUIMetric CyMenuSize
Definition uimetric.h:89
static const TUIMetric CyEdge
Definition uimetric.h:80
TUIMetric(int i)
Definition uimetric.h:140
static const TUIMetric CyHScroll
Definition uimetric.h:37
static const TUIMetric CyCursor
Definition uimetric.h:48
static const TUIMetric CyBorder
Definition uimetric.h:40
static const TUIMetric CxMenuSize
Definition uimetric.h:88
static const TUIMetric CyCaption
Definition uimetric.h:38
static const TUIMetric CySmIcon
Definition uimetric.h:84
static const TUIMetric CxMinimized
Definition uimetric.h:91
static const TUIMetric HighContrast
Definition uimetric.h:99
static const TUIMetric CyScreen
Definition uimetric.h:35
static const TUIMetric Reserved2
Definition uimetric.h:59
static const TUIMetric MideastEnabled
Definition uimetric.h:108
static const TUIMetric Reserved4
Definition uimetric.h:61
static const TUIMetric CySize
Definition uimetric.h:65
static const TUIMetric PenWindows
Definition uimetric.h:75
static const TUIMetric CxDrag
Definition uimetric.h:102
static const TUIMetric Debug
Definition uimetric.h:56
static const TUIMetric MenuDropAlignment
Definition uimetric.h:74
static const TUIMetric CyFixedFrame
Definition uimetric.h:42
static const TUIMetric CxMenuCheck
Definition uimetric.h:105
static const TUIMetric CxVirtualScreen
Definition uimetric.h:117
static const TUIMetric Network
Definition uimetric.h:104
static const TUIMetric CxBorder
Definition uimetric.h:39
static const TUIMetric CxMaxTrack
Definition uimetric.h:93
static const TUIMetric Arrange
Definition uimetric.h:90
static const TUIMetric CySizeFrame
Definition uimetric.h:67
static const TUIMetric CyFullScreen
Definition uimetric.h:51
static const TUIMetric CyDoubleClk
Definition uimetric.h:71
static const TUIMetric CyMaxTrack
Definition uimetric.h:94
static const TUIMetric CxFixedFrame
Definition uimetric.h:41
static const TUIMetric CyKanjiWindow
Definition uimetric.h:52
static const TUIMetric CxEdge
Definition uimetric.h:79
static const TUIMetric CyVScroll
Definition uimetric.h:54
static const TUIMetric CyPixelsPerInch
Definition uimetric.h:111
int Get() const
Definition uimetric.h:152
static const TUIMetric CMouseButtons
Definition uimetric.h:77
static const TUIMetric CxMaximized
Definition uimetric.h:95
static const TUIMetric CySmCaption
Definition uimetric.h:85
static const TUIMetric CxMinTrack
Definition uimetric.h:68
static const TUIMetric Reserved1
Definition uimetric.h:58
static const TUIMetric CyIconSpacing
Definition uimetric.h:73
static const TUIMetric CMetrics
Definition uimetric.h:123
static const TUIMetric CyVirtualScreen
Definition uimetric.h:118
static const TUIMetric CxSizeFrame
Definition uimetric.h:66
static const TUIMetric CxCursor
Definition uimetric.h:47
static const TUIMetric CyMinimized
Definition uimetric.h:92
static const TUIMetric CyIcon
Definition uimetric.h:46
static const TUIMetric Reserved3
Definition uimetric.h:60
static const TUIMetric YVirtualScreen
Definition uimetric.h:116
static const TUIMetric KeyboardPref
Definition uimetric.h:98
static const TUIMetric SwapButton
Definition uimetric.h:57
static const TUIMetric CySmSize
Definition uimetric.h:87
static const TUIMetric CyDrag
Definition uimetric.h:103
static const TUIMetric CxIconSpacing
Definition uimetric.h:72
static const TUIMetric MousePresent
Definition uimetric.h:53
static const TUIMetric DbcsEnabled
Definition uimetric.h:76
static const TUIMetric SameDisplayFormat
Definition uimetric.h:120
static const TUIMetric CxVScroll
Definition uimetric.h:36
static const TUIMetric CxFullScreen
Definition uimetric.h:50
static const TUIMetric CyMinTrack
Definition uimetric.h:69
static const TUIMetric CyMaximized
Definition uimetric.h:96
static const TUIMetric CxPixelsPerInch
Definition uimetric.h:110
static const TUIMetric CxDoubleClk
Definition uimetric.h:70
static const TUIMetric CyMenuCheck
Definition uimetric.h:106
static const TUIMetric CyMenu
Definition uimetric.h:49
static const TUIMetric ShowSounds
Definition uimetric.h:97
static const TUIMetric CyMin
Definition uimetric.h:63
static const TUIMetric CyMinSpacing
Definition uimetric.h:82
static const TUIMetric CxIcon
Definition uimetric.h:45
static const TUIMetric CleanBoot
Definition uimetric.h:101
static const TUIMetric ScreenReader
Definition uimetric.h:100
static const TUIMetric CxMinSpacing
Definition uimetric.h:81
static const TUIMetric CxMin
Definition uimetric.h:62
static const TUIMetric CxHScroll
Definition uimetric.h:55
static const TUIMetric CxSmSize
Definition uimetric.h:86
static const TUIMetric CxSmIcon
Definition uimetric.h:83
static const TUIMetric SlowMachine
Definition uimetric.h:107
static const TUIMetric CxHThumb
Definition uimetric.h:44
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
#define _OWLCLASS
Definition defs.h:338
Includes windowing system headers, with necessary macros defined.