f4c55aa4db
This patch introduces the distinction of the manually managed config/deploy from the managed config/managed/deploy. The latter incorporates interactive changes of the system by the user. There are two user interactions supported. First, by clicking on the '+' button at the top-left of the runtime view, the user can select a component to launch. All launchers at config/launcher/ are listed in the popup menu. Each launcher can be lauched only once. While running, is not available in the popup menu. Second, when selecting a node that corresponds to a start node in config/deploy or that was interactively launched, the detailed view shows a 'remove' button, which can be used to exclude the component from the deployment. The result of the interactive manipulation is always available at config/managed/deploy. Hence, the current situation can be made persistent by using it as config/deploy. Fixes #2986
66 lines
1.3 KiB
C++
66 lines
1.3 KiB
C++
/*
|
|
* \brief Sculpt GUI management
|
|
* \author Norman Feske
|
|
* \date 2018-04-30
|
|
*
|
|
* The GUI is based on a dynamically configured init component, which hosts
|
|
* one menu-view component for each dialog.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2018 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _GUI_H_
|
|
#define _GUI_H_
|
|
|
|
/* Genode includes */
|
|
#include <os/reporter.h>
|
|
|
|
/* local includes */
|
|
#include <types.h>
|
|
#include <xml.h>
|
|
|
|
namespace Sculpt { struct Gui; }
|
|
|
|
|
|
struct Sculpt::Gui
|
|
{
|
|
Env &_env;
|
|
|
|
Expanding_reporter _config { _env, "config", "gui_config" };
|
|
|
|
float _font_size_px = 14;
|
|
|
|
typedef String<32> Label;
|
|
|
|
struct Version { unsigned value; } version { 0 };
|
|
|
|
unsigned menu_width = 0;
|
|
|
|
void _gen_menu_view_start_content(Xml_generator &, Label const &, Point,
|
|
unsigned) const;
|
|
|
|
void _generate_config(Xml_generator &) const;
|
|
|
|
void generate_config()
|
|
{
|
|
_config.generate([&] (Xml_generator &xml) { _generate_config(xml); });
|
|
}
|
|
|
|
float font_size() const { return _font_size_px; }
|
|
|
|
void font_size(float px)
|
|
{
|
|
_font_size_px = px;
|
|
menu_width = max(px*21, 320.0);
|
|
}
|
|
|
|
Gui(Env &env) : _env(env) { }
|
|
};
|
|
|
|
#endif /* _GUI_H_ */
|