26 #ifndef SAGA2_GTEXTBOX_H 27 #define SAGA2_GTEXTBOX_H 33 kTextBoxAlignRight = (1 << 4),
34 kTextBoxAlignCenter = (1 << 5),
35 kTextBoxNoFilter = (1 << 6),
36 kTextBoxStayActive = (1 << 7),
37 kTextBoxNoBevel = (1 << 8)
41 const int kEditLen = 35;
42 const int kNumEditLines = 50;
43 const int kTextPen = 12;
44 const int kTextDisable = 14;
45 const int kTextHilite = 11;
46 const int kTextBackground = 87;
47 const int kTextBackHilite = 211;
48 const int kCursorColor = 174;
49 const int kTextHeight = 10;
51 const int32 kBlinkTime = 72 / 6;
52 const int16 kBlinkColor0 = 137;
53 const int16 kBlinkColor1 = 232;
54 const int16 kBlinkWide = 1;
56 extern StaticRect editBaseRect;
73 _currentLen[kNumEditLines],
74 _exists[kNumEditLines],
94 int8 _fontColorHilite;
95 byte _fontColorBackHilite;
119 void prepareEdit(
int which);
126 void enSelect(
int which);
127 void deSelect(
bool commit =
false);
128 void reSelect(
int which);
130 bool activate(gEventType why);
138 void selectionMove(
int howMany = 1);
141 bool insertText(
char *text,
int length);
142 void setText(
char *text);
143 void setEditExtent(
const Rect16 &r);
144 void selectionUp(
int howMany = 1) {
145 selectionMove(-howMany);
147 void selectionDown(
int howMany = 1) {
148 selectionMove(howMany);
153 char *selectedText(
int &length);
154 void handleTimerTick(int32 tick);
156 void editRectFill(
gPort &fillPort, gPen *pen);
178 AppFunc *cmdEnter = NULL,
179 AppFunc *cmdEscape = NULL);
210 void choose(
int which = 0) {
212 if (!isActive()) makeActive();
Definition: gtextbox.h:64