2 * Copyright 1999-2009 Jeremy Friesner
3 * Copyright 2009-2010 Haiku, Inc. All rights reserved.
4 * Distributed under the terms of the MIT License.
9 #ifndef SHORTCUTS_WINDOW_H
10 #define SHORTCUTS_WINDOW_H
13 #include <ColumnListView.h>
19 class BColumnListView
;
24 // This class defines our preferences/configuration window.
25 class ShortcutsWindow
: public BWindow
{
30 virtual void DispatchMessage(BMessage
* message
,
33 virtual void MessageReceived(BMessage
* message
);
34 virtual bool QuitRequested();
36 // BMessage 'what' codes, representing commands understood by this Window.
38 ADD_HOTKEY_ITEM
= 'SpKy', // Add a new hotkey entry to the GUI list.
39 REMOVE_HOTKEY_ITEM
, // Remove a hotkey entry from the GUI list.
40 HOTKEY_ITEM_SELECTED
, // Give the "focus bar" to the specified
42 HOTKEY_ITEM_MODIFIED
, // Update the state of an entry to reflect
44 OPEN_KEYSET
, // Bring up a File requester to load new
46 APPEND_KEYSET
, // Bring up a File requester to append
48 REVERT_KEYSET
, // Dump the current state and re-read
49 // settings from disk.
50 SAVE_KEYSET
, // Save the current settings to disk
51 SAVE_KEYSET_AS
, // Bring up a File requester to save
53 SELECT_APPLICATION
, // Set the current entry to point to the
58 BMenuItem
* _CreateActuatorPresetMenuItem(const char* label
)
60 void _AddNewSpec(const char* defaultCommand
);
61 void _MarkKeySetModified();
62 bool _LoadKeySet(const BMessage
& loadMessage
);
63 bool _SaveKeySet(BEntry
& saveEntry
);
64 bool _GetSettingsFile(entry_ref
* ref
);
65 void _LoadWindowSettings(
66 const BMessage
& loadMessage
);
67 void _SaveWindowSettings(BEntry
& saveEntry
);
68 bool _GetWindowSettingsFile(entry_ref
* ref
);
71 BButton
* fRemoveButton
;
73 BColumnListView
* fColumnListView
;
74 BFilePanel
* fSavePanel
;
75 // for saving settings
76 BFilePanel
* fOpenPanel
;
77 // for loading settings
78 BFilePanel
* fSelectPanel
;
79 // for selecting apps to launch
81 // Points to the settings file to save to
84 // true iff changes were made since last load or save
87 // true iff the file-requester's ref should be appended to current
88 bool fLastOpenWasAppend
;
94 #endif // SHORTCUTS_WINDOW_H