mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 12:05:07 +00:00

We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
34 lines
741 B
C++
34 lines
741 B
C++
/*
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibCore/FileWatcher.h>
|
|
#include <LibGUI/ActionGroup.h>
|
|
#include <LibGUI/Label.h>
|
|
#include <LibGUI/Menu.h>
|
|
#include <LibGUI/Window.h>
|
|
|
|
enum class ClearBackground {
|
|
No,
|
|
Yes
|
|
};
|
|
|
|
class KeymapStatusWidget : public GUI::Label {
|
|
C_OBJECT(KeymapStatusWidget);
|
|
|
|
virtual void mousedown_event(GUI::MouseEvent& event) override;
|
|
|
|
void set_current_keymap(DeprecatedString const& keymap, ClearBackground clear_background = ClearBackground::Yes);
|
|
|
|
private:
|
|
RefPtr<GUI::Menu> m_context_menu;
|
|
DeprecatedString m_current_keymap;
|
|
|
|
ErrorOr<void> refresh_menu();
|
|
|
|
GUI::ActionGroup m_keymaps_group;
|
|
};
|