Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
ComboList.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: ComboList.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
ComboList class
13
*/
14
15
#ifndef ComboList_h
16
#define ComboList_h
17
18
#include "
Types.h
"
19
#include "
ScrollWindow.h
"
20
#include "
Bitmap.h
"
21
22
#include "
List.h
"
23
#include "
Text.h
"
24
25
// +--------------------------------------------------------------------+
26
27
class
ComboBox
;
28
29
// +--------------------------------------------------------------------+
30
31
class
ComboList
:
public
ScrollWindow
32
{
33
public
:
34
static
const
char
*
TYPENAME
() {
return
"ComboList"
; }
35
36
ComboList
(
ComboBox
* ctrl,
ActiveWindow
* p,
int
ax,
int
ay,
int
aw,
int
ah,
int
maxentries);
37
ComboList
(
ComboBox
* ctrl,
Screen
* s,
int
ax,
int
ay,
int
aw,
int
ah,
int
maxentries);
38
virtual
~ComboList
();
39
40
// Operations:
41
virtual
void
Draw
();
42
virtual
void
Show
();
43
virtual
void
Hide
();
44
45
// Event Target Interface:
46
virtual
int
OnMouseMove
(
int
x,
int
y);
47
virtual
int
OnLButtonDown
(
int
x,
int
y);
48
virtual
int
OnLButtonUp
(
int
x,
int
y);
49
virtual
int
OnClick
();
50
virtual
int
OnMouseEnter
(
int
x,
int
y);
51
virtual
int
OnMouseExit
(
int
x,
int
y);
52
virtual
void
KillFocus
();
53
54
// Property accessors:
55
virtual
void
ClearItems
();
56
virtual
void
AddItem
(
const
char
* item);
57
virtual
void
AddItems
(
ListIter<Text>
item_list);
58
virtual
void
SetItems
(
ListIter<Text>
item_list);
59
virtual
const
char
*
GetItem
(
int
index);
60
virtual
void
SetItem
(
int
index,
const
char
* item);
61
62
virtual
int
GetCount
();
63
virtual
const
char
*
GetSelectedItem
();
64
virtual
int
GetSelectedIndex
();
65
virtual
void
SetSelection
(
int
index);
66
67
protected
:
68
void
DrawRectSimple
(
Rect
&
rect
,
int
stat);
69
void
DrawItem
(
Text
label,
Rect
& btn_rect,
int
state);
70
Rect
CalcLabelRect
(
const
Rect
& btn_rect);
71
int
CalcSeln
(
int
x,
int
y);
72
void
CopyStyle
(
const
ComboBox
& ctrl);
73
74
ComboBox
*
combo_box
;
75
List<Text>
items
;
76
bool
animated
;
77
bool
border
;
78
int
seln
;
79
int
captured
;
80
int
bevel_width
;
81
int
button_state
;
82
int
button_height
;
83
int
max_entries
;
84
int
scroll
;
85
int
scrolling
;
86
87
Color
active_color
;
88
Color
border_color
;
89
};
90
91
#endif ComboList_h
92
nGenEx
ComboList.h
Generated on Tue Jun 5 2012 20:46:20 for Starshatter_Open by
1.8.1