OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
_
b
c
d
h
i
j
m
o
p
r
s
t
u
y
Enumerations
a
o
s
t
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
c
d
e
i
l
p
r
s
t
v
Enumerations
c
h
p
q
s
t
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
d
g
i
o
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
_
c
d
g
i
m
o
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
▼
OWLNext
►
Overview of ObjectWindows
Accessing application objects
Finding the object
Creating a small application
Using WinMain and OwlMain
►
About command enabling
►
ObjectWindows Exception Handling
Todo List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
documentation
▼
include
►
ocf
▼
owl
►
private
animctrl.h
►
appdict.h
►
applicat.h
►
bardescr.h
bitmapga.h
►
bitset.h
btntextg.h
button.h
buttonga.h
celarray.h
checkbox.h
►
checklst.h
►
chooseco.h
►
choosefo.h
clipboar.h
clipview.h
cmdline.h
►
codepages.h
►
colmnhdr.h
►
color.h
►
combobex.h
combobox.h
►
commctrl.h
commdial.h
►
commview.h
configfl.h
►
contain.h
control.h
controlb.h
controlg.h
►
coolbar.h
►
date.h
►
datetime.h
dc.h
►
decframe.h
►
decmdifr.h
►
defs.h
dialog.h
dibitmap.h
►
dispatch.h
►
docking.h
►
docmanag.h
►
doctpl.h
►
docview.h
draglist.h
drawitem.h
edit.h
editfile.h
editsear.h
editview.h
►
eventhan.h
►
exbase.h
►
except.h
►
file.h
filedoc.h
►
filename.h
►
findrepl.h
►
fixedpnt.h
flatctrl.h
floatfra.h
►
framewin.h
fscroll.h
►
functor.h
►
gadget.h
►
gadgetwi.h
gauge.h
►
gdibase.h
►
gdiobjec.h
►
gdiplus.h
►
geometry.h
►
glyphbtn.h
groupbox.h
►
hlpmanag.h
hotkey.h
imagelst.h
inputdia.h
ipaddres.h
►
layoutco.h
layoutwi.h
►
lclstrng.h
listbox.h
listboxview.h
►
listview.h
►
listviewctrl.h
►
listwind.h
►
mailer.h
►
mci.h
►
mdi.h
►
mdichild.h
►
memcbox.h
►
menu.h
menugadg.h
►
messageb.h
►
metafile.h
modegad.h
►
module.h
monthcal.h
►
msgthred.h
►
notetab.h
►
objstrm.h
►
opensave.h
owlall.h
owlcore.h
►
owlvcl.h
pager.h
►
panespli.h
pch.h
►
picker.h
picklist.h
pictwind.h
►
pointer.h
popupgad.h
posclass.h
preclass.h
preview.h
prevwin.h
►
printdia.h
►
printer.h
profile.h
progressbar.h
►
property.h
►
propsht.h
psview.h
radiobut.h
►
rcntfile.h
►
registry.h
►
resource.h
►
richedit.h
richedpr.h
richedv.h
rolldial.h
►
scrollba.h
►
scroller.h
►
serialze.h
►
shddel.h
►
shellitm.h
►
shelwapi.h
signatur.h
►
slider.h
►
splashwi.h
►
splitter.h
►
static.h
►
statusba.h
►
streambl.h
►
string.h
syslink.h
►
system.h
►
tabbed.h
►
tabctrl.h
►
template.h
►
textgadg.h
►
theme.h
►
thread.h
►
time.h
►
timegadg.h
tinycapt.h
►
toolbox.h
►
tooltip.h
►
transfer.h
►
transferbuffer.h
►
trayicon.h
►
treeviewctrl.h
►
treewind.h
►
uihelper.h
►
uimetric.h
►
updown.h
►
validate.h
►
window.h
►
windowev.h
►
winsock.h
►
wskaddr.h
►
wskerr.h
►
wskhostm.h
►
wskservm.h
►
wsksock.h
►
wsksockd.h
►
wsksockm.h
►
wsyscls.h
►
wsysinc.h
►
source
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
popupgad.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------//
2
// ObjectWindows 1998 Copyright by Yura Bidus //
3
// //
4
// Used code and ideas from Dieter Windau and Joseph Parrello //
5
// //
6
// EMail: dieter.windau@usa.net //
7
// Web: http://members.aol.com/softengage/index.htm //
8
// EMail: joparrello@geocities.com, joparrel@tin.it //
9
// Web: http://space.tin.it/computer/giparrel //
10
// //
11
// Revision 1.0 //
12
// Edited by Bidus Yura //
13
// Date 11/10/98 //
14
// //
15
// THIS CLASS AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //
16
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //
17
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //
18
// PARTICULAR PURPOSE. //
19
/// \file //
20
/// Definition of classes TPopupButtonGadget and TPopupMenuGadget. //
21
//----------------------------------------------------------------------------//
22
23
#if !defined(OWL_POPUPGAD_H)
// Sentry, use file only if it's not already included.
24
#define OWL_POPUPGAD_H
25
26
#include <
owl/private/defs.h
>
27
#if defined(BI_HAS_PRAGMA_ONCE)
28
# pragma once
29
#endif
30
31
#include <
owl/btntextg.h
>
32
33
34
namespace
owl
{
35
36
37
//
38
#include <
owl/preclass.h
>
39
40
/// \addtogroup newctrl
41
/// @{
42
/// \class TPopupButtonGadget
43
// ~~~~~ ~~~~~~~~~~~~~~~~~~
44
//
45
class
_OWLCLASS
TPopupButtonGadget
:
public
TButtonTextGadget
{
46
public
:
47
enum
TPopupType
{
48
Normal,
///< Normal button style
49
///< - press button -> PopupActionStart()
50
DownArrow,
///< Normal button style and additional a down arrow
51
///< - press button -> PopupActionStart()
52
DownArrowAction,
///< Separator between left area and down arrow
53
///< - press left button area -> Activate()
54
///< - press down arrow area -> PopupActionStart()
55
};
47
enum
TPopupType
{
…
};
56
57
TPopupButtonGadget
(
int
id
,
58
TResId
glyphResIdOrIndex
,
59
TStyle style = sBitmapText,
60
TPopupType
poptype
= DownArrowAction,
61
TType
type
= Command,
62
bool
enabled
=
false
,
63
TState state = Up,
64
bool
sharedGlyph
=
false
,
65
uint
numChars
= 4);
66
67
// Default arrow width = 8
68
//
69
void
SetArrowWidth(
uint
width);
70
uint
GetArrowWidth();
71
72
// TGadget overrides
73
//
74
void
GetDesiredSize(
TSize
& size)
override
;
75
void
SetBounds(
const
TRect
&
rect
)
override
;
76
77
protected
:
78
79
// TGadget overrides
80
//
81
void
Paint(
TDC
& dc)
override
;
82
void
LButtonDown(
uint
modKeys
,
const
TPoint
&
point
)
override
;
83
void
LButtonUp(
uint
modKeys
,
const
TPoint
&
point
)
override
;
84
void
RButtonDown(
uint
modKeys
,
const
TPoint
&)
override
;
85
86
// TButtonGadget overrides
87
//
88
void
BeginPressed(
const
TPoint
& p)
override
;
89
void
CancelPressed(
const
TPoint
& p,
bool
mstate
=
false
)
override
;
90
91
// New virtuals
92
//
93
virtual
void
PaintArrowButton(
TDC
& dc);
94
virtual
void
PaintArrow(
TDC
& dc,
const
TRect
&
rect
);
95
96
/// Start the PopupAction if the user click
97
/// - 1) into the button if PopupType != DownArrowAction
98
/// - 2) into the arrow if PopupType == DownArrowAction
99
/// This function only restore button state, overwrite
100
/// them with functionality, but don't forget to
101
/// call inherited one
102
//
103
virtual
void
PopupAction();
104
105
protected
:
106
enum
TPopFlags
{
107
ArrowPressed = 0x001,
108
HasCapture = 0x002,
109
};
106
enum
TPopFlags
{
…
};
110
TPopupType
PopupType
;
111
uint
PopFlags
;
112
uint
ArrowWidth
;
113
};
45
class
_OWLCLASS
TPopupButtonGadget
:
public
TButtonTextGadget
{
…
};
114
115
116
//
117
// class TPopupMenuGadget
118
// ~~~~~ ~~~~~~~~~~~~~~~~
119
//
120
class
_OWLCLASS
TPopupMenuGadget
:
public
TPopupButtonGadget
{
121
public
:
122
TPopupMenuGadget
(
TMenu
& menu,
123
TWindow
* window,
124
int
id
,
125
TResId
glyphResIdOrIndex
,
126
TStyle
style = sBitmapText,
127
TPopupType
poptype
= DownArrowAction,
128
TType
type
= Command,
129
bool
enabled
=
false
,
130
TState
state = Up,
131
bool
sharedGlyph
=
false
,
132
uint
numChars
= 4);
133
~TPopupMenuGadget
();
134
135
// Set the flags. Default: TPM_LEFTALIGN | TPM_LEFTBUTTON
136
//
137
static
void
SetFlags
(
uint
flags) { Flags = flags; }
138
139
virtual
void
PopupAction();
140
141
protected
:
142
TPopupMenu
*
PopupMenu
;
143
TWindow
*
CmdTarget
;
144
static
uint
Flags
;
145
};
120
class
_OWLCLASS
TPopupMenuGadget
:
public
TPopupButtonGadget
{
…
};
146
/// @}
147
148
#include <
owl/posclass.h
>
149
150
151
//
152
// inlines
153
//
154
155
//
156
inline
void
157
TPopupButtonGadget::SetArrowWidth
(
uint
width)
158
{
159
ArrowWidth
= width;
160
}
157
TPopupButtonGadget::SetArrowWidth
(
uint
width) {
…
}
161
162
//
163
inline
uint
164
TPopupButtonGadget::GetArrowWidth
()
165
{
166
return
ArrowWidth
;
167
}
164
TPopupButtonGadget::GetArrowWidth
() {
…
}
168
169
170
}
// OWL namespace
171
172
#endif
// OWL_POPUPGAD_H
btntextg.h
Definition of classes TButtonTextGadget.
VarType
Definition
safearray.h:14
owl::TButtonGadget::TState
TState
TState enumerates the three button positions during which the button can be pressed: up (0),...
Definition
buttonga.h:80
owl::TButtonGadget::TType
TType
Enumerates the types of button gadgets.
Definition
buttonga.h:69
owl::TButtonTextGadget
Derived from TButtonGadget, TButtonTextGadget represents buttons with bitmap and text,...
Definition
btntextg.h:45
owl::TButtonTextGadget::TStyle
TStyle
TStyle contains values that defines how gadget will be displayed:
Definition
btntextg.h:62
owl::TDC
TDC is the root class for GDI DC wrappers.
Definition
dc.h:64
owl::TMenu
The TMenu class encapsulates window menus.
Definition
menu.h:77
owl::TPoint
TPoint is a support class, derived from tagPOINT.
Definition
geometry.h:87
owl::TPopupButtonGadget
Definition
popupgad.h:45
owl::TPopupButtonGadget::TPopupType
TPopupType
Definition
popupgad.h:47
owl::TPopupButtonGadget::SetArrowWidth
void SetArrowWidth(uint width)
Definition
popupgad.h:157
owl::TPopupButtonGadget::PopFlags
uint PopFlags
Definition
popupgad.h:111
owl::TPopupButtonGadget::PopupType
TPopupType PopupType
Definition
popupgad.h:110
owl::TPopupButtonGadget::GetArrowWidth
uint GetArrowWidth()
Definition
popupgad.h:164
owl::TPopupButtonGadget::TPopFlags
TPopFlags
Definition
popupgad.h:106
owl::TPopupButtonGadget::ArrowWidth
uint ArrowWidth
Definition
popupgad.h:112
owl::TPopupMenuGadget
Definition
popupgad.h:120
owl::TPopupMenuGadget::PopupMenu
TPopupMenu * PopupMenu
Definition
popupgad.h:142
owl::TPopupMenuGadget::SetFlags
static void SetFlags(uint flags)
Definition
popupgad.h:137
owl::TPopupMenuGadget::Flags
static uint Flags
Definition
popupgad.h:144
owl::TPopupMenuGadget::CmdTarget
TWindow * CmdTarget
Definition
popupgad.h:143
owl::TPopupMenu
TPopupMenu creates an empty pop-up menu to add to an existing window or pop-up menu.
Definition
menu.h:189
owl::TRect
TRect is a mathematical class derived from tagRect.
Definition
geometry.h:308
owl::TResId
Definition
wsyscls.h:206
owl::TSize
The tagSIZE struct is defined as.
Definition
geometry.h:234
owl::TWindow
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition
window.h:414
owl
Object Windows Library (OWLNext Core)
Definition
animctrl.h:22
owl::uint
unsigned int uint
Definition
number.h:25
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
include
owl
popupgad.h
Generated by
1.10.0