xref: /haiku/src/apps/showimage/ShowImageApp.h (revision dfc8a217db488098641462dfc334dcc0f7d62456)
1 /*
2  * Copyright 2003-2010, 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				ArgvReceived(int32 argc, char** argv);
27 	virtual	void				ReadyToRun();
28 	virtual	void				MessageReceived(BMessage* message);
29 	virtual	void				AboutRequested();
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 									BMessenger& trackerMessenger);
40 			void				_BroadcastToWindows(BMessage* message);
41 			void				_CheckClipboard();
42 
43 private:
44 			BFilePanel*			fOpenPanel;
45 			bool				fPulseStarted;
46 			ShowImageSettings	fSettings;
47 };
48 
49 
50 extern const char* kApplicationSignature;
51 
52 #define my_app dynamic_cast<ShowImageApp*>(be_app)
53 
54 
55 #endif	// SHOW_IMAGE_APP_H
56