OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
uipart.cpp
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows
3
// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4
//
5
//----------------------------------------------------------------------------
6
#include <
owl/pch.h
>
7
#include <
owl/defs.h
>
8
#include <
owl/uihelper.h
>
9
#include <
owl/gdiobjec.h
>
10
11
namespace
owl
{
12
13
OWL_DIAGINFO
;
14
15
//
16
/// Empty constructor.
17
//
18
TUIPart::TUIPart
()
19
{
20
}
21
22
//
23
/// Draw the part onto a DC.
24
/// The type and state control how the part should be painted.
25
//
26
bool
27
TUIPart::Paint
(
TDC
& dc,
TRect
& rect,
TType
type,
TState
state)
28
{
29
return
DrawFrameControl
(dc, rect, type, state);
30
}
31
32
//
33
/// Wrapper for the DrawFrameControl API.
34
//
35
#if !defined(BI_COMP_GNUC)
36
#pragma warn -par
37
#endif
38
bool
39
TUIPart::DrawFrameControl
(
TDC
& dc,
TRect
& rect,
TType
type,
TState
state)
40
{
41
static
bool
hasDrawFrameControl =
true
;
42
43
// Try once to see if the API call is available. If not, do ourselves.
44
//
45
if
(hasDrawFrameControl) {
46
if
(
::DrawFrameControl
(dc, &rect, type, state))
47
return
true
;
48
if
(::GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
49
hasDrawFrameControl =
false
;
50
else
51
return
false
;
52
}
53
54
// !BB Emulate call
55
//
56
//
57
return
false
;
58
}
59
#if !defined(BI_COMP_GNUC)
60
#pragma warn .par
61
#endif
62
63
}
// OWL namespace
64
/* ========================================================================== */
65
owl::TDC
TDC is the root class for GDI DC wrappers.
Definition
dc.h:64
owl::TRect
TRect is a mathematical class derived from tagRect.
Definition
geometry.h:308
owl::TUIPart::DrawFrameControl
bool DrawFrameControl(TDC &dc, TRect &rect, TType type, TState state)
Wrapper for the DrawFrameControl API.
Definition
uipart.cpp:39
owl::TUIPart::Paint
bool Paint(TDC &dc, TRect &rect, TType type, TState state)
Draw the part onto a DC.
Definition
uipart.cpp:27
owl::TUIPart::TState
TState
Enumeration describing the various glyphs available for buttons, captions, menus and scrollbar parts.
Definition
uihelper.h:465
owl::TUIPart::TType
TType
Enumeration describing the part to be drawn.
Definition
uihelper.h:455
owl::TUIPart::TUIPart
TUIPart()
Empty constructor.
Definition
uipart.cpp:18
gdiobjec.h
Definition of abstract GDI object class and derived classes.
pch.h
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
owl::OWL_DIAGINFO
OWL_DIAGINFO
Definition
animctrl.cpp:14
defs.h
General definitions used by all ObjectWindows programs.
uihelper.h
Definition of the UI Helper Classes: TUIHandle, TUIBorder, TUIFace, TUIPart.
source
owlcore
uipart.cpp
Generated by
1.18.0