27class UINotepadEdit :
public UIMultiLineEdit {
32 CLASS_PROTOTYPE( UINotepadEdit );
37 void CharEvent(
int ch )
override;
39 bool GotoLine(
int line );
40 bool FindText(
const char *text,
int offsetFromSel );
41 void MousePressed(
Event *ev );
44typedef enum { STATE_NONE, STATE_GOTO_LINE, STATE_FIND_TEXT, STATE_SAVE_AS, STATE_TIMED_MESSAGE, STATE_CONFIRMCLOSE } state_t;
60class UINotepad :
public UIFloatingWindow {
61 friend class UINotepadEdit;
71 UINotepadEdit *m_edit;
76 CLASS_PROTOTYPE( UINotepad );
79 void TimeMessage(
const char *message,
int howlong );
85 bool OpenFile(
const char *filename );
86 bool Create( UIWidget *parent,
UIRect2D& rect,
const char *filename );
87 void ChildSizeChanged(
Event *ev );
88 void SaveAs(
Event *ev );
89 void Save(
Event *ev );
90 void Open(
Event *ev );
91 void OpenFile(
Event *ev );
92 void ClosePressed(
Event *ev );
93 void OnFind(
Event *ev );
94 void OnGoto(
Event *ev );
95 void OnCopy(
Event *ev );
96 void OnPaste(
Event *ev );
97 void OnCut(
Event *ev );
98 bool ProcessControlEvents(
int ch );
99 bool ProcessCharEvent(
int ch );
100 void Draw(
void )
override;
101 void setFileName(
const char *filename );
104bool UI_LoadNotepadFile(
const char *filename );
Definition container.h:85
Definition listener.h:246
Definition uinotepad.h:60
Definition uinotepad.h:55
Definition uinotepad.h:46
Definition uinotepad.h:50