cmake/Source/CursesDialog/cmCursesCacheEntryComposite.h

43 lines
1.2 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
2020-02-01 23:06:01 +01:00
#include <memory>
2016-10-30 18:24:19 +01:00
#include <string>
class cmCursesLabelWidget;
class cmCursesWidget;
2020-02-01 23:06:01 +01:00
class cmState;
class cmCursesCacheEntryComposite
{
public:
2015-04-27 22:25:09 +02:00
cmCursesCacheEntryComposite(const std::string& key, int labelwidth,
int entrywidth);
2020-02-01 23:06:01 +01:00
cmCursesCacheEntryComposite(const std::string& key, cmState* state,
bool isNew, int labelwidth, int entrywidth);
~cmCursesCacheEntryComposite();
2019-11-11 23:01:05 +01:00
cmCursesCacheEntryComposite(cmCursesCacheEntryComposite const&) = delete;
cmCursesCacheEntryComposite& operator=(cmCursesCacheEntryComposite const&) =
delete;
2020-02-01 23:06:01 +01:00
cmCursesCacheEntryComposite(cmCursesCacheEntryComposite&&) = default;
cmCursesCacheEntryComposite& operator=(cmCursesCacheEntryComposite&&) =
default;
const char* GetValue();
friend class cmCursesMainForm;
protected:
2020-02-01 23:06:01 +01:00
std::unique_ptr<cmCursesLabelWidget> Label;
std::unique_ptr<cmCursesLabelWidget> IsNewLabel;
std::unique_ptr<cmCursesWidget> Entry;
std::string Key;
int LabelWidth;
int EntryWidth;
};