opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
liboscar
ui
tabs
tab_registry_entry.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
liboscar/utilities/c_string_view.h
>
4
5
#include <functional>
6
#include <memory>
7
8
namespace
osc
{
class
Tab
; }
9
namespace
osc
{
class
Widget; }
10
11
namespace
osc
12
{
13
// reference-counted definition for an available tab
14
class
TabRegistryEntry
final
{
15
public
:
16
explicit
TabRegistryEntry
(
17
CStringView
name
,
18
std::function<std::unique_ptr<Tab>(
Widget
*)>
tab_constructor
19
);
20
21
CStringView
name
()
const
;
22
std::unique_ptr<Tab>
construct_tab
(
Widget
*)
const
;
23
24
private
:
25
class
Impl
;
26
std::shared_ptr<Impl> impl_;
27
};
28
}
c_string_view.h
osc::CStringView
Definition
c_string_view.h:12
osc::TabRegistryEntry
Definition
tab_registry_entry.h:14
osc::TabRegistryEntry::construct_tab
std::unique_ptr< Tab > construct_tab(Widget *) const
osc::TabRegistryEntry::name
CStringView name() const
osc::TabRegistryEntry::TabRegistryEntry
TabRegistryEntry(CStringView name, std::function< std::unique_ptr< Tab >(Widget *)> tab_constructor)
osc::Widget
Definition
widget.h:26
osc
Definition
custom_decoration_generator.h:5
osc::Key::Tab
@ Tab
osc::to
constexpr U to(T &&value)
Definition
conversion.h:56
Generated by
1.9.8