HaikuDepot: notify work status from main window
[haiku.git] / src / apps / icon-o-matic / gui / SavePanel.h
blob0adac8f4bffb1ebcaa29f14724b8596533c35540
1 /*
2 * Copyright 2006, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
9 #ifndef EXPORT_SAVE_PANEL_H
10 #define EXPORT_SAVE_PANEL_H
12 #include <FilePanel.h>
13 #include <MenuItem.h>
14 #include <TranslationDefs.h>
15 #include <String.h>
17 class BButton;
18 class BMenuField;
19 class BPopUpMenu;
20 class BWindow;
22 class SaveItem : public BMenuItem {
23 public:
24 SaveItem(const char* name,
25 BMessage* message,
26 uint32 exportMode);
28 uint32 ExportMode() const
29 { return fExportMode; }
31 private:
32 uint32 fExportMode;
35 class SavePanel : public BFilePanel,
36 public BHandler {
37 public:
38 SavePanel(const char* name,
39 BMessenger* target = NULL,
40 entry_ref* startDirectory = NULL,
41 uint32 nodeFlavors = 0,
42 bool allowMultipleSelection = true,
43 BMessage* message = NULL,
44 BRefFilter *filter = NULL,
45 bool modal = false,
46 bool hideWhenDone = true);
47 virtual ~SavePanel();
49 // BFilePanel
50 virtual void SendMessage(const BMessenger* messenger,
51 BMessage* message);
52 // BHandler
53 virtual void MessageReceived(BMessage* message);
55 // SavePanel
56 // setting and retrieving settings
57 void SetExportMode(bool exportMode);
58 void SetExportMode(int32 mode);
59 int32 ExportMode() const;
61 void AdjustExtension();
63 private:
64 SaveItem* _GetCurrentMenuItem() const;
65 void _BuildMenu();
66 void _ExportSettings();
67 void _EnableSettings() const;
69 BWindow* fConfigWindow;
70 BPopUpMenu* fFormatM;
71 BMenuField* fFormatMF;
73 BButton* fSettingsB;
75 SaveItem* fNativeMI;
76 SaveItem* fHVIFMI;
77 SaveItem* fRDefMI;
78 SaveItem* fSourceMI;
79 SaveItem* fSVGMI;
80 SaveItem* fBitmap16MI;
81 SaveItem* fBitmap32MI;
82 SaveItem* fBitmap64MI;
83 SaveItem* fBitmapSetMI;
84 SaveItem* fIconAttrMI;
85 SaveItem* fIconMimeAttrMI;
87 int32 fExportMode;
90 #endif // EXPORT_SAVE_PANEL_H