btop/src/btop_menu.h

80 lines
2 KiB
C
Raw Normal View History

2021-05-09 00:56:48 +12:00
/* Copyright 2021 Aristocratos (jakob@qvantnet.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
indent = tab
tab-size = 4
*/
2021-06-03 07:33:26 +12:00
#ifndef _btop_menu_included_
#define _btop_menu_included_ 1
2021-05-09 00:56:48 +12:00
#include <string>
#include <vector>
#include <array>
2021-05-10 08:25:41 +12:00
#include <atomic>
2021-05-29 12:32:36 +12:00
#include <robin_hood.h>
2021-05-09 00:56:48 +12:00
2021-05-29 12:32:36 +12:00
using std::string, std::vector, std::unordered_map, std::array, std::atomic, robin_hood::unordered_flat_map;
2021-05-09 00:56:48 +12:00
2021-06-03 07:33:26 +12:00
namespace Menu {
2021-05-22 12:13:56 +12:00
2021-06-03 07:33:26 +12:00
atomic<bool> active(false);
2021-05-09 00:56:48 +12:00
2021-05-29 12:32:36 +12:00
const unordered_flat_map<string, unordered_map<string, vector<string>>> Menus = {
2021-05-09 00:56:48 +12:00
{ "options", {
{ "normal", {
"┌─┐┌─┐┌┬┐┬┌─┐┌┐┌┌─┐",
"│ │├─┘ │ ││ ││││└─┐",
"└─┘┴ ┴ ┴└─┘┘└┘└─┘"
} },
{ "selected", {
"╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗",
"║ ║╠═╝ ║ ║║ ║║║║╚═╗",
"╚═╝╩ ╩ ╩╚═╝╝╚╝╚═╝"
} }
} },
{ "help", {
{ "normal", {
"┬ ┬┌─┐┬ ┌─┐",
"├─┤├┤ │ ├─┘",
"┴ ┴└─┘┴─┘┴ "
} },
{ "selected", {
"╦ ╦╔═╗╦ ╔═╗",
"╠═╣║╣ ║ ╠═╝",
"╩ ╩╚═╝╩═╝╩ "
} }
} },
{ "quit", {
{ "normal", {
"┌─┐ ┬ ┬ ┬┌┬┐",
"│─┼┐│ │ │ │ ",
"└─┘└└─┘ ┴ ┴ "
} },
{ "selected", {
"╔═╗ ╦ ╦ ╦╔╦╗ ",
"║═╬╗║ ║ ║ ║ ",
"╚═╝╚╚═╝ ╩ ╩ "
} }
} }
};
2021-05-14 07:11:10 +12:00
2021-05-09 00:56:48 +12:00
}
2021-05-22 12:13:56 +12:00
#endif