13#include "../audio/audio.hpp"
14#include "../l10n/l10n.hpp"
15#include "../macros.hpp"
23hi_export_module(hikogui.widgets.audio_device_widget);
25hi_export
namespace hi {
inline namespace v1 {
46 _grid_widget = std::make_unique<grid_widget>(
this);
49 _sync_device_list_task = sync_device_list();
55 co_yield *_grid_widget;
61 _grid_constraints = _grid_widget->update_constraints();
62 return _grid_constraints;
65 void set_layout(widget_layout
const&
context)
noexcept override
69 _grid_shape = {_grid_constraints,
grid_rectangle, theme().baseline_adjustment()};
75 void draw(draw_context
const&
context)
noexcept override
82 hitbox hitbox_test(point2 position)
const noexcept override
86 r = _grid_widget->hitbox_test_from_parent(position, r);
93 [[
nodiscard]]
bool accepts_keyboard_focus(keyboard_focus_group group)
const noexcept override
96 return _grid_widget->accepts_keyboard_focus(group);
106 box_constraints _grid_constraints;
107 box_shape _grid_shape;
111 selection_widget *_device_selection_widget =
nullptr;
121 auto proxy = _device_list.
get();
124 proxy->emplace_back(device.id(), device.label());
Defines selection_widget.
@ partial
A widget is partially enabled.
@ invisible
The widget is invisible.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
auto when_any(Args const &...args)
await on a set of objects which can be converted to an awaitable.
Definition when_any.hpp:173
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
bool compare_store(T &lhs, U &&rhs) noexcept
Compare then store if there was a change.
Definition misc.hpp:53
generator< audio_device & > audio_devices(Filters &&...filters) noexcept
Get audio devices matching the filter arguments.
Definition audio_system.hpp:101
@ level
The child widget stays at the same elevation and layer.
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
static audio_system & global() noexcept
Create an audio system object specific for the current operating system.
Definition audio_system_win32.hpp:230
widget_intf * parent
Pointer to the parent widget.
Definition widget_intf.hpp:35
A observer pointing to the whole or part of a observed_base.
Definition observer_intf.hpp:32
Definition not_null.hpp:22
Audio device configuration widget.
Definition audio_device_widget.hpp:30
observer< audio_direction > direction
The audio direction (input or output) of devices is should show.
Definition audio_device_widget.hpp:40
observer< std::string > device_id
The audio device this widget has selected and is configuring.
Definition audio_device_widget.hpp:36
A graphical control element that allows the user to choose only one of a predefined set of mutually e...
Definition selection_widget.hpp:48
An interactive graphical object as part of the user-interface.
Definition widget.hpp:37
widget(widget_intf const *parent) noexcept
Definition widget.hpp:49