2 * Copyright 2004-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexandre Deckner, alex@zappotek.com
7 * Axel Dörfler, axeld@pinc-software.de
9 * John Scipione, jscipione@gmai.com
12 #ifndef KEYMAP_WINDOW_H
13 #define KEYMAP_WINDOW_H
16 #include <FilePanel.h>
28 class KeyboardLayoutView
;
32 class KeymapWindow
: public BWindow
{
35 virtual ~KeymapWindow();
37 virtual bool QuitRequested();
38 virtual void MessageReceived(BMessage
* message
);
41 BMenuBar
* _CreateMenu();
42 BView
* _CreateMapLists();
43 void _AddKeyboardLayouts(BMenu
* menu
);
44 void _AddKeyboardLayoutMenu(BMenu
* menu
,
45 BDirectory directory
);
46 status_t
_SetKeyboardLayout(const char* path
);
47 void _MarkKeyboardLayoutItem(const char* path
,
50 void _UpdateSwitchShortcutButton();
51 void _UpdateButtons();
52 void _SwitchShortcutKeys();
55 void _DefaultKeymap();
58 BMenuField
* _CreateDeadKeyMenuField();
59 void _UpdateDeadKeyMenu();
61 void _FillSystemMaps();
63 void _SetListViewSize(BListView
* listView
);
65 status_t
_GetCurrentKeymap(entry_ref
& ref
);
66 BString
_GetActiveKeymapName();
67 bool _SelectCurrentMap(BListView
* list
);
68 void _SelectCurrentMap();
70 status_t
_GetSettings(BFile
& file
, int mode
) const;
71 status_t
_LoadSettings(BRect
& frame
,
72 BString
& keyboardLayout
);
73 status_t
_SaveSettings();
74 BPath
_GetMarkedKeyboardLayoutPath(BMenu
* menu
);
77 BListView
* fSystemListView
;
78 BListView
* fUserListView
;
79 BButton
* fDefaultsButton
;
80 BButton
* fRevertButton
;
83 KeyboardLayoutView
* fKeyboardLayoutView
;
84 BTextControl
* fTextControl
;
85 BButton
* fSwitchShortcutsButton
;
87 BMenu
* fCircumflexMenu
;
88 BMenu
* fDiaeresisMenu
;
95 BString fCurrentMapName
;
97 BFilePanel
* fOpenPanel
;
98 BFilePanel
* fSavePanel
;
101 #endif // KEYMAP_WINDOW_H