Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
EditBox.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: EditBox.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
EditBox ActiveWindow class
13
*/
14
15
#ifndef EditBox_h
16
#define EditBox_h
17
18
#include "
Types.h
"
19
#include "
ScrollWindow.h
"
20
21
// +--------------------------------------------------------------------+
22
23
class
EditBox
:
public
ScrollWindow
24
{
25
public
:
26
static
const
char
*
TYPENAME
() {
return
"EditBox"
; }
27
28
enum
ALIGN
{
EDIT_ALIGN_LEFT
= DT_LEFT,
29
EDIT_ALIGN_CENTER
= DT_CENTER,
30
EDIT_ALIGN_RIGHT
= DT_RIGHT
31
};
32
33
EditBox
(
ActiveWindow
* p,
int
ax,
int
ay,
int
aw,
int
ah, DWORD aid);
34
EditBox
(
Screen
* s,
int
ax,
int
ay,
int
aw,
int
ah, DWORD aid);
35
virtual
~EditBox
();
36
37
// Operations:
38
virtual
void
DrawContent
(
const
Rect
& ctrl_rect);
39
virtual
void
DrawTabbedText
();
40
41
// Event Target Interface:
42
virtual
void
SetFocus
();
43
virtual
void
KillFocus
();
44
45
virtual
int
OnMouseMove
(
int
x,
int
y);
46
virtual
int
OnLButtonDown
(
int
x,
int
y);
47
virtual
int
OnLButtonUp
(
int
x,
int
y);
48
virtual
int
OnClick
();
49
50
virtual
int
OnKeyDown
(
int
vk,
int
flags);
51
52
// ScrollWindow Interface:
53
virtual
bool
CanScroll
(
int
direction,
int
nlines=1);
54
virtual
void
Scroll
(
int
direction,
int
nlines=1);
55
virtual
void
ScrollTo
(
int
index);
56
virtual
int
GetPageCount
();
57
virtual
int
GetPageSize
();
58
59
Color
GetSelectedColor
();
60
void
SetSelectedColor
(
Color
c);
61
62
int
GetSelStart
() {
return
sel_start
; }
63
int
GetSelLength
() {
return
sel_length
; }
64
Text
GetSelText
();
65
66
void
SetSelStart
(
int
n);
67
void
SetSelLength
(
int
n);
68
69
char
GetPasswordChar
() {
return
pass_char
; }
70
void
SetPasswordChar
(
char
c) {
pass_char
= c; }
71
72
protected
:
73
void
Insert
(
char
c);
74
void
Insert
(
const
char
* s);
75
void
Delete
();
76
void
Backspace
();
77
int
CaretFromPoint
(
int
x,
int
y)
const
;
78
void
EnsureCaretVisible
();
79
80
int
sel_start
;
81
int
sel_length
;
82
int
h_offset
;
83
int
caret_x
;
84
int
caret_y
;
85
86
char
pass_char
;
87
88
Color
selected_color
;
89
};
90
91
#endif EditBox_h
92
nGenEx
EditBox.h
Generated on Tue Jun 5 2012 20:46:21 for Starshatter_Open by
1.8.1