xref: /haiku/src/apps/stylededit/StyledEditApp.h (revision 3be9edf8da228afd9fec0390f408c964766122aa)
1 /*
2  * Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Mattias Sundblad
7  *		Andrew Bachmann
8  *		Jonas Sundström
9  */
10 #ifndef STYLED_EDIT_APP
11 #define STYLED_EDIT_APP
12 
13 
14 #include <Application.h>
15 
16 
17 struct entry_ref;
18 
19 class BMenu;
20 class BHandler;
21 class BMessage;
22 class BFilePanel;
23 class StyledEditWindow;
24 
25 
26 class StyledEditApp : public BApplication {
27 	public:
28 						StyledEditApp();
29 		virtual			~StyledEditApp();
30 
31 		virtual void	MessageReceived(BMessage *message);
32 		virtual void	ArgvReceived(int32 argc, char** argv);
33 		virtual void	RefsReceived(BMessage *message);
34 		virtual void	ReadyToRun();
35 
36 		int32			NumberOfWindows();
37 		void			OpenDocument();
38 		status_t		OpenDocument(entry_ref *ref);
39 		void			CloseDocument();
40 
41 	private:
42 		void			ArgvReceivedEx(int32 argc, const char *argv[], const char * cwd);
43 
44 	private:
45 		BFilePanel		*fOpenPanel;
46 		BMenu			*fOpenPanelEncodingMenu;
47 		uint32			fOpenAsEncoding;
48 		int32			fWindowCount;
49 		int32			fNextUntitledWindow;
50 		bool			fBadArguments;
51 };
52 
53 extern StyledEditApp* styled_edit_app;
54 
55 #endif	// STYLED_EDIT_APP
56 
57