-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommandWindow.h
More file actions
50 lines (42 loc) · 1.48 KB
/
Copy pathCommandWindow.h
File metadata and controls
50 lines (42 loc) · 1.48 KB
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
49
50
#ifndef COMMANDWINDOW_H
#define COMMANDWINDOW_H
#include "DialogBox.h"
class CommandWindow : public DialogBox
{
FXDECLARE(CommandWindow)
protected:
int pid; // Proccess ID of child (valid if busy).
int pipes[2]; // Pipes to communicate with child process.
FXText* text;
FXString command; // Command string
FXbool killed; // True if the cancel button was pressed
FXbool closed; // True if the closed button was pressed
private:
CommandWindow() : pid(0), text(NULL), killed(false), closed(false)
{}
CommandWindow(const CommandWindow&);
public:
enum
{
ID_CLOSE=DialogBox::ID_LAST,
ID_WATCHPROCESS,
ID_KILLPROCESS,
ID_LAST
};
public:
long onCmdKillProcess(FXObject*, FXSelector, void*);
long onUpdKillProcess(FXObject*, FXSelector, void*);
long onWatchProcess(FXObject*, FXSelector, void*);
long onUpdClose(FXObject* sender, FXSelector, void*);
virtual void create();
virtual ~CommandWindow();
int execCmd(FXString);
CommandWindow(FXWindow* owner, const FXString& name, FXString strcmd, int nblines, int nbcols);
CommandWindow(FXApp* a, const FXString& name, FXString strcmd, int nblines, int nbcols);
long onCmdClose(FXObject*, FXSelector, void*);
void setText(const char*);
void appendText(const char* str);
void scrollToLastLine(void);
int getLength(void);
};
#endif