Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CursesDialog/cmCursesCacheEntryComposite.h
4998 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <memory>
8
#include <string>
9
10
class cmCursesLabelWidget;
11
class cmCursesWidget;
12
class cmState;
13
14
class cmCursesCacheEntryComposite
15
{
16
public:
17
cmCursesCacheEntryComposite(std::string const& key, int labelwidth,
18
int entrywidth);
19
cmCursesCacheEntryComposite(std::string const& key, cmState* state,
20
bool isNew, int labelwidth, int entrywidth);
21
~cmCursesCacheEntryComposite();
22
23
cmCursesCacheEntryComposite(cmCursesCacheEntryComposite const&) = delete;
24
cmCursesCacheEntryComposite& operator=(cmCursesCacheEntryComposite const&) =
25
delete;
26
27
cmCursesCacheEntryComposite(cmCursesCacheEntryComposite&&) = default;
28
cmCursesCacheEntryComposite& operator=(cmCursesCacheEntryComposite&&) =
29
default;
30
31
char const* GetValue();
32
33
friend class cmCursesMainForm;
34
35
protected:
36
std::unique_ptr<cmCursesLabelWidget> Label;
37
std::unique_ptr<cmCursesLabelWidget> IsNewLabel;
38
std::unique_ptr<cmCursesWidget> Entry;
39
std::string Key;
40
int LabelWidth;
41
int EntryWidth;
42
};
43
44