summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2002-05-01 15:34:27 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2002-05-01 15:34:27 (GMT)
commitd53458de9ac298344a87d6703de78991d6770832 (patch)
tree7f8c3c274d6bda9633ce82c9ba45e8c632299323 /Source/CursesDialog/cmCursesCacheEntryComposite.cxx
parentd0d25bb989bb0f3db290a2cb935c310aa06ec50b (diff)
downloadCMake-d53458de9ac298344a87d6703de78991d6770832.zip
CMake-d53458de9ac298344a87d6703de78991d6770832.tar.gz
CMake-d53458de9ac298344a87d6703de78991d6770832.tar.bz2
The entry widgets are now created with what is initially available on the terminal.
Diffstat (limited to 'Source/CursesDialog/cmCursesCacheEntryComposite.cxx')
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index a4a71bb..8c11aee 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -23,19 +23,22 @@
#include "cmCursesDummyWidget.h"
#include "../cmSystemTools.h"
-cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key) :
- m_Key(key)
+cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
+ int labelwidth,
+ int entrywidth) :
+ m_Key(key), m_LabelWidth(labelwidth), m_EntryWidth(entrywidth)
{
- m_Label = new cmCursesLabelWidget(30, 1, 1, 1, key);
+ m_Label = new cmCursesLabelWidget(m_LabelWidth, 1, 1, 1, key);
m_IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
m_Entry = 0;
}
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
- const char* key, const cmCacheManager::CacheEntry& value, bool isNew) :
- m_Key(key)
+ const char* key, const cmCacheManager::CacheEntry& value, bool isNew,
+ int labelwidth, int entrywidth)
+ : m_Key(key), m_LabelWidth(labelwidth), m_EntryWidth(entrywidth)
{
- m_Label = new cmCursesLabelWidget(30, 1, 1, 1, key);
+ m_Label = new cmCursesLabelWidget(m_LabelWidth, 1, 1, 1, key);
if (isNew)
{
m_IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, "*");
@@ -49,7 +52,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
switch ( value.m_Type )
{
case cmCacheManager::BOOL:
- m_Entry = new cmCursesBoolWidget(30, 1, 1, 1);
+ m_Entry = new cmCursesBoolWidget(m_EntryWidth, 1, 1, 1);
if (cmSystemTools::IsOn(value.m_Value.c_str()))
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(true);
@@ -60,17 +63,17 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
}
break;
case cmCacheManager::PATH:
- m_Entry = new cmCursesPathWidget(30, 1, 1, 1);
+ m_Entry = new cmCursesPathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(m_Entry)->SetString(
value.m_Value.c_str());
break;
case cmCacheManager::FILEPATH:
- m_Entry = new cmCursesFilePathWidget(30, 1, 1, 1);
+ m_Entry = new cmCursesFilePathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(m_Entry)->SetString(
value.m_Value.c_str());
break;
case cmCacheManager::STRING:
- m_Entry = new cmCursesStringWidget(30, 1, 1, 1);
+ m_Entry = new cmCursesStringWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesStringWidget*>(m_Entry)->SetString(
value.m_Value.c_str());
break;