cmake/Source/CursesDialog/cmCursesOptionsWidget.h

39 lines
1.1 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. */
2015-04-27 22:25:09 +02:00
#ifndef cmCursesOptionsWidget_h
#define cmCursesOptionsWidget_h
2014-08-03 19:52:23 +02:00
2016-10-30 18:24:19 +01:00
#include <cmConfigure.h>
#include "cmCursesStandardIncludes.h"
2014-08-03 19:52:23 +02:00
#include "cmCursesWidget.h"
2016-07-09 11:21:54 +02:00
2016-10-30 18:24:19 +01:00
#include <string>
#include <vector>
2014-08-03 19:52:23 +02:00
class cmCursesMainForm;
class cmCursesOptionsWidget : public cmCursesWidget
{
public:
cmCursesOptionsWidget(int width, int height, int left, int top);
// Description:
// Handle user input. Called by the container of this widget
// when this widget has focus. Returns true if the input was
// handled.
2016-10-30 18:24:19 +01:00
bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
2015-04-27 22:25:09 +02:00
void SetOption(const std::string&);
2016-07-09 11:21:54 +02:00
void AddOption(std::string const&);
2014-08-03 19:52:23 +02:00
void NextOption();
void PreviousOption();
2016-07-09 11:21:54 +02:00
2014-08-03 19:52:23 +02:00
protected:
cmCursesOptionsWidget(const cmCursesOptionsWidget& from);
void operator=(const cmCursesOptionsWidget&);
std::vector<std::string> Options;
std::vector<std::string>::size_type CurrentOption;
};
2015-04-27 22:25:09 +02:00
#endif // cmCursesOptionsWidget_h