forked from zao/foo_wave_seekbar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrontendConfigImpl.h
More file actions
39 lines (33 loc) · 865 Bytes
/
Copy pathFrontendConfigImpl.h
File metadata and controls
39 lines (33 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright Lars Viklund 2008 - 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include "frontend_sdk/VisualFrontend.h"
namespace wave
{
struct frontend_config_impl : visual_frontend_config
{
explicit frontend_config_impl(persistent_settings& settings)
: settings(settings)
{
}
virtual bool get_configuration_string(GUID key, text_sink const& out) const
{
auto& gs = settings.generic_strings;
auto I = gs.find(key);
if (gs.end() != I)
{
out.set(I->second.c_str());
return true;
}
return false;
}
virtual void set_configuration_string(GUID key, char const* value)
{
settings.generic_strings[key] = value;
}
private:
persistent_settings& settings;
};
}