Serenity Operating System
at master 32 lines 748 B view raw
1/* 2 * Copyright (c) 2022, the SerenityOS developers. 3 * Copyright (c) 2023, Andreas Kling <kling@serenityos.org> 4 * 5 * SPDX-License-Identifier: BSD-2-Clause 6 */ 7 8#pragma once 9 10#include <LibGUI/ActionGroup.h> 11#include <LibGUI/Widget.h> 12 13class KeymapStatusWidget final : public GUI::Widget { 14 C_OBJECT(KeymapStatusWidget); 15 16public: 17 virtual ~KeymapStatusWidget() override; 18 void set_current_keymap(DeprecatedString const& keymap); 19 20private: 21 KeymapStatusWidget(); 22 23 virtual void paint_event(GUI::PaintEvent&) override; 24 virtual void mousedown_event(GUI::MouseEvent&) override; 25 26 ErrorOr<void> refresh_menu(); 27 28 RefPtr<GUI::Menu> m_context_menu; 29 30 DeprecatedString m_current_keymap; 31 GUI::ActionGroup m_keymaps_group; 32};