xref: /haiku/src/apps/showimage/ShowImageApp.h (revision b6b0567fbd186f8ce8a0c90bdc7a7b5b4c649678)
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 <FilePanel.h>
18 
19 
20 class ShowImageApp : public BApplication {
21 public:
22 								ShowImageApp();
23 	virtual						~ShowImageApp();
24 
25 	virtual	void				AboutRequested();
26 	virtual	void				ArgvReceived(int32 argc, char **argv);
27 	virtual	void				MessageReceived(BMessage *message);
28 	virtual	void				ReadyToRun();
29 	virtual	void				Pulse();
30 	virtual	void				RefsReceived(BMessage *message);
31 	virtual	bool				QuitRequested();
32 
33 			ShowImageSettings* 	Settings() { return &fSettings; }
34 
35 private:
36 			void				StartPulse();
37 			void				Open(const entry_ref *ref);
38 			void				BroadcastToWindows(BMessage *message);
39 			void				CheckClipboard();
40 
41 			BMessenger 			fTrackerMessenger;
42 			BFilePanel			*fOpenPanel;
43 			bool				fPulseStarted;
44 			ShowImageSettings	fSettings;
45 };
46 
47 
48 extern const char *kApplicationSignature;
49 
50 #define my_app dynamic_cast<ShowImageApp*>(be_app)
51 
52 
53 #endif	// SHOW_IMAGE_APP_H
54 
55