BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / showimage / ShowImageApp.h
blobb75a2f2a152512b63fbf624faea33c49bb0a83c7
1 /*
2 * Copyright 2003-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
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
14 #include "ImageCache.h"
15 #include "ShowImageSettings.h"
17 #include <Application.h>
18 #include <FilePanel.h>
21 enum {
22 MSG_FILE_OPEN = 'mFOP',
26 class ShowImageApp : public BApplication {
27 public:
28 ShowImageApp();
29 virtual ~ShowImageApp();
31 virtual void ArgvReceived(int32 argc, char** argv);
32 virtual void ReadyToRun();
33 virtual void MessageReceived(BMessage* message);
34 virtual void Pulse();
35 virtual void RefsReceived(BMessage* message);
36 virtual bool QuitRequested();
38 ShowImageSettings* Settings() { return &fSettings; }
39 ImageCache& DefaultCache() { return fImageCache; }
41 private:
42 void _StartPulse();
43 void _Open(const entry_ref& ref,
44 const BMessenger& trackerMessenger);
45 void _BroadcastToWindows(BMessage* message);
46 void _CheckClipboard();
47 void _UpdateLastWindowFrame();
49 private:
50 BFilePanel* fOpenPanel;
51 bool fPulseStarted;
52 ShowImageSettings fSettings;
53 ImageCache fImageCache;
54 BRect fLastWindowFrame;
58 extern const char* kApplicationSignature;
60 #define my_app dynamic_cast<ShowImageApp*>(be_app)
63 #endif // SHOW_IMAGE_APP_H