xref: /haiku/src/apps/showimage/ShowImageApp.h (revision 508f54795f39c3e7552d87c95aae9dd8ec6f505b)
1 /*
2  * Copyright 2003-2009, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Fernando Francisco de Oliveira
7  *		Michael Wilber
8  *		Michael Pfeiffer
9  */
10 #ifndef SHOW_IMAGE_APP_H
11 #define SHOW_IMAGE_APP_H
12 
13 
14 #include "ShowImageSettings.h"
15 
16 #include <Application.h>
17 #include <Catalog.h>
18 #include <FilePanel.h>
19 
20 
21 class ShowImageApp : public BApplication {
22 public:
23 								ShowImageApp();
24 	virtual						~ShowImageApp();
25 
26 	virtual	void				AboutRequested();
27 	virtual	void				ArgvReceived(int32 argc, char **argv);
28 	virtual	void				MessageReceived(BMessage *message);
29 	virtual	void				ReadyToRun();
30 	virtual	void				Pulse();
31 	virtual	void				RefsReceived(BMessage *message);
32 	virtual	bool				QuitRequested();
33 
34 			ShowImageSettings* 	Settings() { return &fSettings; }
35 
36 private:
37 			void				StartPulse();
38 			void				Open(const entry_ref *ref);
39 			void				BroadcastToWindows(BMessage *message);
40 			void				CheckClipboard();
41 
42 			BMessenger 			fTrackerMessenger;
43 			BFilePanel			*fOpenPanel;
44 			bool				fPulseStarted;
45 			ShowImageSettings	fSettings;
46 };
47 
48 
49 extern const char *kApplicationSignature;
50 
51 #define my_app dynamic_cast<ShowImageApp*>(be_app)
52 
53 
54 #endif	// SHOW_IMAGE_APP_H
55 
56