xref: /haiku/src/apps/showimage/ShowImageApp.h (revision 1d9d47fc72028bb71b5f232a877231e59cfe2438)
1 /*
2  * Copyright 2003-2006, 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 	public:
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; // of the window this was launched
43 		BFilePanel *fOpenPanel;
44 		bool fPulseStarted;
45 		ShowImageSettings fSettings;
46 };
47 
48 extern const char *kApplicationSignature;
49 
50 #define my_app dynamic_cast<ShowImageApp*>(be_app)
51 
52 #endif	// SHOW_IMAGE_APP_H
53 
54