summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx10
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.h1
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesFilePathWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx39
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h2
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesWidget.h6
11 files changed, 35 insertions, 37 deletions
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx
index fd15b99..29d9cb2 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.cxx
+++ b/Source/CursesDialog/cmCursesBoolWidget.cxx
@@ -16,7 +16,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
- this->Type = cmCacheManager::BOOL;
+ this->Type = cmState::BOOL;
set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC);
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 4eb8e6c..7e09242 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -55,7 +55,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
assert(value);
switch (cm->GetState()->GetCacheEntryType(key))
{
- case cmCacheManager::BOOL:
+ case cmState::BOOL:
this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
if (cmSystemTools::IsOn(value))
{
@@ -66,15 +66,15 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
}
break;
- case cmCacheManager::PATH:
+ case cmState::PATH:
this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
break;
- case cmCacheManager::FILEPATH:
+ case cmState::FILEPATH:
this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
break;
- case cmCacheManager::STRING:
+ case cmState::STRING:
{
const char* stringsProp = cm->GetState()
->GetCacheEntryProperty(key, "STRINGS");
@@ -99,7 +99,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
}
break;
}
- case cmCacheManager::UNINITIALIZED:
+ case cmState::UNINITIALIZED:
cmSystemTools::Error("Found an undefined variable: ",
key.c_str());
break;
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index dc4ee4af..f280897 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -12,7 +12,6 @@
#ifndef cmCursesCacheEntryComposite_h
#define cmCursesCacheEntryComposite_h
-#include "../cmCacheManager.h"
#include "cmCursesLabelWidget.h"
class cmCursesCacheEntryComposite
diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx
index 60086a5..9801e4d 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.cxx
+++ b/Source/CursesDialog/cmCursesDummyWidget.cxx
@@ -15,7 +15,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
- this->Type = cmCacheManager::INTERNAL;
+ this->Type = cmState::INTERNAL;
}
diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx
index 01db014..51ed670 100644
--- a/Source/CursesDialog/cmCursesFilePathWidget.cxx
+++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx
@@ -15,6 +15,6 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height,
int left, int top) :
cmCursesPathWidget(width, height, left, top)
{
- this->Type = cmCacheManager::FILEPATH;
+ this->Type = cmState::FILEPATH;
}
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index b067743..be17a9f 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -9,7 +9,6 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
-#include "../cmCacheManager.h"
#include "../cmSystemTools.h"
#include "../cmVersion.h"
#include "../cmake.h"
@@ -118,11 +117,11 @@ void cmCursesMainForm::InitializeUI()
for(std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it)
{
- cmCacheManager::CacheEntryType t = this->CMakeInstance->GetState()
+ cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it);
- if (t != cmCacheManager::INTERNAL &&
- t != cmCacheManager::STATIC &&
- t != cmCacheManager::UNINITIALIZED)
+ if (t != cmState::INTERNAL &&
+ t != cmState::STATIC &&
+ t != cmState::UNINITIALIZED)
{
++count;
}
@@ -148,11 +147,11 @@ void cmCursesMainForm::InitializeUI()
it != cacheKeys.end(); ++it)
{
std::string key = *it;
- cmCacheManager::CacheEntryType t = this->CMakeInstance->GetState()
+ cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it);
- if (t == cmCacheManager::INTERNAL ||
- t == cmCacheManager::STATIC ||
- t == cmCacheManager::UNINITIALIZED )
+ if (t == cmState::INTERNAL ||
+ t == cmState::STATIC ||
+ t == cmState::UNINITIALIZED )
{
continue;
}
@@ -172,11 +171,11 @@ void cmCursesMainForm::InitializeUI()
it != cacheKeys.end(); ++it)
{
std::string key = *it;
- cmCacheManager::CacheEntryType t = this->CMakeInstance->GetState()
+ cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it);
- if (t == cmCacheManager::INTERNAL ||
- t == cmCacheManager::STATIC ||
- t == cmCacheManager::UNINITIALIZED )
+ if (t == cmState::INTERNAL ||
+ t == cmState::STATIC ||
+ t == cmState::UNINITIALIZED )
{
continue;
}
@@ -294,9 +293,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
cmCursesWidget* cw = reinterpret_cast<cmCursesWidget*>
(field_userptr(currentField));
// If in edit mode, get out of it
- if ( cw->GetType() == cmCacheManager::STRING ||
- cw->GetType() == cmCacheManager::PATH ||
- cw->GetType() == cmCacheManager::FILEPATH )
+ if ( cw->GetType() == cmState::STRING ||
+ cw->GetType() == cmState::PATH ||
+ cw->GetType() == cmState::FILEPATH )
{
cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
sw->SetInEdit(false);
@@ -823,7 +822,7 @@ void cmCursesMainForm::FillCacheManagerFromUI()
std::string newValue = (*this->Entries)[i]->Entry->GetValue();
std::string fixedOldValue;
std::string fixedNewValue;
- cmCacheManager::CacheEntryType t =
+ cmState::CacheEntryType t =
this->CMakeInstance->GetState()
->GetCacheEntryType(cacheKey);
this->FixValue(t, oldValue, fixedOldValue);
@@ -841,15 +840,15 @@ void cmCursesMainForm::FillCacheManagerFromUI()
}
}
-void cmCursesMainForm::FixValue(cmCacheManager::CacheEntryType type,
+void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
const std::string& in, std::string& out) const
{
out = in.substr(0,in.find_last_not_of(" ")+1);
- if(type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH)
+ if(type == cmState::PATH || type == cmState::FILEPATH)
{
cmSystemTools::ConvertToUnixSlashes(out);
}
- if(type == cmCacheManager::BOOL)
+ if(type == cmState::BOOL)
{
if(cmSystemTools::IsOff(out.c_str()))
{
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 6455252..255c823 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -113,7 +113,7 @@ protected:
// cache.
void FillCacheManagerFromUI();
// Fix formatting of values to a consistent form.
- void FixValue(cmCacheManager::CacheEntryType type,
+ void FixValue(cmState::CacheEntryType type,
const std::string& in, std::string& out) const;
// Re-post the existing fields. Used to toggle between
// normal and advanced modes. Render() should be called
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx
index 2f4b59e..30110a4 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.cxx
+++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx
@@ -21,7 +21,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
- this->Type = cmCacheManager::BOOL; // this is a bit of a hack
+ this->Type = cmState::BOOL; // this is a bit of a hack
// there is no option type, and string type causes ccmake to cast
// the widget into a string widget at some point. BOOL is safe for
// now.
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index 89e2238..6116823 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -18,7 +18,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height,
int left, int top) :
cmCursesStringWidget(width, height, left, top)
{
- this->Type = cmCacheManager::PATH;
+ this->Type = cmState::PATH;
this->Cycle = false;
this->CurrentIndex = 0;
}
@@ -59,7 +59,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
}
std::vector<std::string> dirs;
- cmSystemTools::SimpleGlob(glob, dirs, (this->Type == cmCacheManager::PATH?-1:0));
+ cmSystemTools::SimpleGlob(glob, dirs, (this->Type == cmState::PATH?-1:0));
if ( this->CurrentIndex < dirs.size() )
{
cstr = dirs[this->CurrentIndex];
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index d25022d..acf262f 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -22,7 +22,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height,
cmCursesWidget(width, height, left, top)
{
this->InEdit = false;
- this->Type = cmCacheManager::STRING;
+ this->Type = cmState::STRING;
set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC);
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index 7d82864..7bbdff1 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -12,7 +12,7 @@
#ifndef cmCursesWidget_h
#define cmCursesWidget_h
-#include "../cmCacheManager.h"
+#include "../cmState.h"
#include "cmCursesStandardIncludes.h"
class cmCursesMainForm;
@@ -46,7 +46,7 @@ public:
/**
* Get the type of the widget (STRING, PATH etc...)
*/
- cmCacheManager::CacheEntryType GetType()
+ cmState::CacheEntryType GetType()
{ return this->Type; }
/**
@@ -77,7 +77,7 @@ protected:
cmCursesWidget(const cmCursesWidget& from);
void operator=(const cmCursesWidget&);
- cmCacheManager::CacheEntryType Type;
+ cmState::CacheEntryType Type;
std::string Value;
FIELD* Field;
// The page in the main form this widget is in