2 * Copyright 2003-2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Fernando Francisco de Oliveira
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>
22 MSG_FILE_OPEN
= 'mFOP',
26 class ShowImageApp
: public BApplication
{
29 virtual ~ShowImageApp();
31 virtual void ArgvReceived(int32 argc
, char** argv
);
32 virtual void ReadyToRun();
33 virtual void MessageReceived(BMessage
* message
);
35 virtual void RefsReceived(BMessage
* message
);
36 virtual bool QuitRequested();
38 ShowImageSettings
* Settings() { return &fSettings
; }
39 ImageCache
& DefaultCache() { return fImageCache
; }
43 void _Open(const entry_ref
& ref
,
44 const BMessenger
& trackerMessenger
);
45 void _BroadcastToWindows(BMessage
* message
);
46 void _CheckClipboard();
47 void _UpdateLastWindowFrame();
50 BFilePanel
* fOpenPanel
;
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