summaryrefslogtreecommitdiff
path: root/Source/Library/Userland/App/ShellApp.proto.h
blob: 557511260f261fb31186440d24f69da37e73f05d (plain) (blame)
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
#ifndef DEF_SHELLAPP_CLASS_H
#define DEF_SHELLAPP_CLASS_H

#include <App/Application.proto.h>
#include <Binding/VirtualTerminal.class.h>

#define FT_BOOL 1
#define FT_STR 2
#define FT_INT 3

struct flag_t {
	WChar sName;
	String lName, desc;
	int type;
	String strVal;
	int intVal;
	bool boolVal;
};

class ShellApp : public Application {
	public:
	VirtualTerminal invt, outvt;
	Vector<String> args;
	Vector<flag_t> flags;
	String appName, appDesc;
	ShellApp(String name, String desc);

	virtual void init();

	//Flag handling
	flag_t* getFlag(String name);
	void addFlag(WChar sName, String lName, String desc, int type = FT_BOOL, String deflt = "");
	String sFlag(String name);
	int iFlag(String name);
	bool bFlag(String name);
};

#endif