-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextWindow.h
48 lines (31 loc) · 1.08 KB
/
TextWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
-------------------------------------------------------------------------
OBJECT NAME: TextWindow.h
FULL NAME: Create Basic scrolled text window.
TYPE: Base class
DESCRIPTION:
COPYRIGHT: University Corporation for Atmospheric Research, 1998
-------------------------------------------------------------------------
*/
#ifndef TEXTWIN_H
#define TEXTWIN_H
#include <Xm/Text.h>
#include "Window.h"
void PrintText(Widget, XtPointer, XtPointer),
DismissText(Widget, XtPointer, XtPointer),
SaveText(Widget, XtPointer, XtPointer),
SearchText(Widget, XtPointer, XtPointer);
/* -------------------------------------------------------------------- */
class TextWindow : public WinForm {
public:
TextWindow(const Widget parent, const char name[]);
~TextWindow();
void Clear() { XmTextSetString(text, (char *)""); }
void Append(const char txt[])
{ XmTextInsert(text, XmTextGetLastPosition(text), (char *)txt); }
void Search();
void MoveTo(int pos) { XmTextSetTopCharacter(text, pos); }
private:
Widget text, searchTxt;
}; /* END TEXTWINDOW.H */
#endif