xref: /haiku/src/apps/stylededit/StyledEditApp.h (revision 97901ec593ec4dd50ac115c1c35a6d72f6e489a5)
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 #include <Catalog.h>
16 
17 
18 struct entry_ref;
19 
20 class BMenu;
21 class BHandler;
22 class BMessage;
23 class BFilePanel;
24 class StyledEditWindow;
25 
26 
27 class StyledEditApp : public BApplication {
28 	public:
29 						StyledEditApp();
30 		virtual			~StyledEditApp();
31 
32 		virtual void	MessageReceived(BMessage *message);
33 		virtual void	ArgvReceived(int32 argc, char** argv);
34 		virtual void	RefsReceived(BMessage *message);
35 		virtual void	ReadyToRun();
36 
37 		int32			NumberOfWindows();
38 		void			OpenDocument();
39 		status_t		OpenDocument(entry_ref *ref);
40 		void			CloseDocument();
41 
42 	private:
43 		void			ArgvReceivedEx(int32 argc, const char *argv[], const char * cwd);
44 
45 	private:
46 		BFilePanel		*fOpenPanel;
47 		BMenu			*fOpenPanelEncodingMenu;
48 		uint32			fOpenAsEncoding;
49 		int32			fWindowCount;
50 		int32			fNextUntitledWindow;
51 		bool			fBadArguments;
52 		BCatalog		fCatalog;
53 };
54 
55 extern StyledEditApp* styled_edit_app;
56 
57 #endif	// STYLED_EDIT_APP
58 
59