summaryrefslogtreecommitdiff
path: root/Source/CursesDialog
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/CMakeLists.txt14
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.cxx12
-rw-r--r--Source/CursesDialog/cmCursesBoolWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx10
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.h2
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesDummyWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesFilePathWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesForm.h4
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesLabelWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx18
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.h4
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h10
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx6
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx30
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesWidget.h2
-rw-r--r--Source/CursesDialog/form/CMakeLists.txt22
19 files changed, 74 insertions, 74 deletions
diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt
index 3349ebe..96e28b4 100644
--- a/Source/CursesDialog/CMakeLists.txt
+++ b/Source/CursesDialog/CMakeLists.txt
@@ -10,7 +10,7 @@
# See the License for more information.
#=============================================================================
-SET( CURSES_SRCS
+set( CURSES_SRCS
CursesDialog/cmCursesBoolWidget
CursesDialog/cmCursesCacheEntryComposite
CursesDialog/cmCursesDummyWidget
@@ -25,13 +25,13 @@ SET( CURSES_SRCS
CursesDialog/ccmake
)
-INCLUDE_DIRECTORIES(${CMake_SOURCE_DIR}/Source/CursesDialog/form
+include_directories(${CMake_SOURCE_DIR}/Source/CursesDialog/form
${CMake_BINARY_DIR}/Source/CursesDialog/form)
-INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH})
+include_directories(${CURSES_INCLUDE_PATH})
-ADD_EXECUTABLE(ccmake ${CURSES_SRCS} )
-TARGET_LINK_LIBRARIES(ccmake CMakeLib)
-TARGET_LINK_LIBRARIES(ccmake cmForm)
+add_executable(ccmake ${CURSES_SRCS} )
+target_link_libraries(ccmake CMakeLib)
+target_link_libraries(ccmake cmForm)
-INSTALL_TARGETS(/bin ccmake)
+install_targets(/bin ccmake)
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx
index 9c4c5a5..fd15b99 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.cxx
+++ b/Source/CursesDialog/cmCursesBoolWidget.cxx
@@ -12,7 +12,7 @@
#include "cmCursesBoolWidget.h"
#include "cmCursesMainForm.h"
-cmCursesBoolWidget::cmCursesBoolWidget(int width, int height,
+cmCursesBoolWidget::cmCursesBoolWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
@@ -38,15 +38,15 @@ bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w)
this->SetValueAsBool(true);
}
- touchwin(w);
- wrefresh(w);
+ touchwin(w);
+ wrefresh(w);
return true;
}
else
{
return false;
}
-
+
}
void cmCursesBoolWidget::SetValueAsBool(bool value)
@@ -56,7 +56,7 @@ void cmCursesBoolWidget::SetValueAsBool(bool value)
this->SetValue("ON");
}
else
- {
+ {
this->SetValue("OFF");
}
}
@@ -68,7 +68,7 @@ bool cmCursesBoolWidget::GetValueAsBool()
return true;
}
else
- {
+ {
return false;
}
}
diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h
index 0d1d6a6..d2a25ca 100644
--- a/Source/CursesDialog/cmCursesBoolWidget.h
+++ b/Source/CursesDialog/cmCursesBoolWidget.h
@@ -19,7 +19,7 @@ class cmCursesBoolWidget : public cmCursesWidget
{
public:
cmCursesBoolWidget(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
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 828384d..c58d037 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -19,19 +19,19 @@
#include "../cmSystemTools.h"
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
- int labelwidth,
+ int labelwidth,
int entrywidth) :
Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth)
{
this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key);
this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
- this->Entry = 0;
+ this->Entry = 0;
this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1);
}
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
- const char* key, const cmCacheManager::CacheIterator& it, bool isNew,
- int labelwidth, int entrywidth)
+ const char* key, const cmCacheManager::CacheIterator& it, bool isNew,
+ int labelwidth, int entrywidth)
: Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth)
{
this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key);
@@ -74,7 +74,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
it.GetValue());
break;
case cmCacheManager::UNINITIALIZED:
- cmSystemTools::Error("Found an undefined variable: ", it.GetName());
+ cmSystemTools::Error("Found an undefined variable: ", it.GetName());
break;
default:
// TODO : put warning message here
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index a40ea28..1357a02 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -20,7 +20,7 @@ class cmCursesCacheEntryComposite
public:
cmCursesCacheEntryComposite(const char* key, int labelwidth, int entrywidth);
cmCursesCacheEntryComposite(const char* key,
- const cmCacheManager::CacheIterator& it,
+ const cmCacheManager::CacheIterator& it,
bool isNew, int labelwidth, int entrywidth);
~cmCursesCacheEntryComposite();
const char* GetValue();
diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx
index 1d8a45d..60086a5 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.cxx
+++ b/Source/CursesDialog/cmCursesDummyWidget.cxx
@@ -11,7 +11,7 @@
============================================================================*/
#include "cmCursesDummyWidget.h"
-cmCursesDummyWidget::cmCursesDummyWidget(int width, int height,
+cmCursesDummyWidget::cmCursesDummyWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h
index cc4cc74..9ac1365 100644
--- a/Source/CursesDialog/cmCursesDummyWidget.h
+++ b/Source/CursesDialog/cmCursesDummyWidget.h
@@ -20,7 +20,7 @@ class cmCursesDummyWidget : public cmCursesWidget
{
public:
cmCursesDummyWidget(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
diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx
index 13bbcc9..01db014 100644
--- a/Source/CursesDialog/cmCursesFilePathWidget.cxx
+++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx
@@ -11,7 +11,7 @@
============================================================================*/
#include "cmCursesFilePathWidget.h"
-cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height,
+cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height,
int left, int top) :
cmCursesPathWidget(width, height, left, top)
{
diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h
index 7556d74..3cba856 100644
--- a/Source/CursesDialog/cmCursesForm.h
+++ b/Source/CursesDialog/cmCursesForm.h
@@ -20,7 +20,7 @@ class cmCursesForm
public:
cmCursesForm();
virtual ~cmCursesForm();
-
+
// Description:
// Handle user input.
virtual void HandleInput() = 0;
@@ -59,7 +59,7 @@ public:
}
static cmCursesForm* CurrentForm;
-
+
protected:
diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx
index 2ad4813..b5ed312 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.cxx
+++ b/Source/CursesDialog/cmCursesLabelWidget.cxx
@@ -11,7 +11,7 @@
============================================================================*/
#include "cmCursesLabelWidget.h"
-cmCursesLabelWidget::cmCursesLabelWidget(int width, int height,
+cmCursesLabelWidget::cmCursesLabelWidget(int width, int height,
int left, int top,
const std::string& name) :
cmCursesWidget(width, height, left, top)
diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h
index bbcc586..cc32d11 100644
--- a/Source/CursesDialog/cmCursesLabelWidget.h
+++ b/Source/CursesDialog/cmCursesLabelWidget.h
@@ -23,7 +23,7 @@ public:
cmCursesLabelWidget(int width, int height, int left, int top,
const std::string& name);
virtual ~cmCursesLabelWidget();
-
+
// Description:
// Handle user input. Called by the container of this widget
// when this widget has focus. Returns true if the input was
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 0e2cd22..057f8f3 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -19,10 +19,10 @@
inline int ctrl(int z)
{
return (z&037);
-}
+}
-cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string>
- const& messages, const char*
+cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string>
+ const& messages, const char*
title)
{
// Append all messages into on big string
@@ -84,7 +84,7 @@ void cmCursesLongMessageForm::UpdateStatusBar()
curses_move(y-4,0);
attron(A_STANDOUT);
printw(bar);
- attroff(A_STANDOUT);
+ attroff(A_STANDOUT);
curses_move(y-3,0);
printw(version);
pos_form_cursor(this->Form);
@@ -94,7 +94,7 @@ void cmCursesLongMessageForm::PrintKeys()
{
int x,y;
getmaxyx(stdscr, y, x);
- if ( x < cmCursesMainForm::MIN_WIDTH ||
+ if ( x < cmCursesMainForm::MIN_WIDTH ||
y < cmCursesMainForm::MIN_HEIGHT )
{
return;
@@ -105,7 +105,7 @@ void cmCursesLongMessageForm::PrintKeys()
curses_move(y-2,0);
printw(firstLine);
pos_form_cursor(this->Form);
-
+
}
void cmCursesLongMessageForm::Render(int, int, int, int)
@@ -155,7 +155,7 @@ void cmCursesLongMessageForm::Render(int, int, int, int)
this->UpdateStatusBar();
this->PrintKeys();
- touchwin(stdscr);
+ touchwin(stdscr);
refresh();
}
@@ -200,8 +200,8 @@ void cmCursesLongMessageForm::HandleInput()
this->UpdateStatusBar();
this->PrintKeys();
- touchwin(stdscr);
- wrefresh(stdscr);
+ touchwin(stdscr);
+ wrefresh(stdscr);
}
}
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h
index 341f9c6..1e86974 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.h
+++ b/Source/CursesDialog/cmCursesLongMessageForm.h
@@ -21,10 +21,10 @@ class cmCursesCacheEntryComposite;
class cmCursesLongMessageForm : public cmCursesForm
{
public:
- cmCursesLongMessageForm(std::vector<std::string> const& messages,
+ cmCursesLongMessageForm(std::vector<std::string> const& messages,
const char* title);
virtual ~cmCursesLongMessageForm();
-
+
// Description:
// Handle user input.
virtual void HandleInput();
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index 3e191b4..883a2b3 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -30,12 +30,12 @@ class cmCursesMainForm : public cmCursesForm
public:
cmCursesMainForm(std::vector<std::string> const& args, int initwidth);
virtual ~cmCursesMainForm();
-
+
/**
* Set the widgets which represent the cache entries.
*/
void InitializeUI();
-
+
/**
* Handle user input.
*/
@@ -65,7 +65,7 @@ public:
* exception is during a resize. The optional argument specifies the
* string to be displayed in the status bar.
*/
- virtual void UpdateStatusBar() { this->UpdateStatusBar(0); }
+ virtual void UpdateStatusBar() { this->UpdateStatusBar(0); }
virtual void UpdateStatusBar(const char* message);
/**
@@ -90,7 +90,7 @@ public:
int Configure(int noconfigure=0);
/**
- * Used to generate
+ * Used to generate
*/
int Generate();
@@ -98,7 +98,7 @@ public:
* Used by main program
*/
int LoadCache(const char *dir);
-
+
/**
* Progress callback
*/
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index b113c2e..14c325b 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -14,7 +14,7 @@
#include "cmCursesMainForm.h"
#include "cmSystemTools.h"
-cmCursesPathWidget::cmCursesPathWidget(int width, int height,
+cmCursesPathWidget::cmCursesPathWidget(int width, int height,
int left, int top) :
cmCursesStringWidget(width, height, left, top)
{
@@ -75,8 +75,8 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
}
this->SetString(cstr.c_str());
- touchwin(w);
- wrefresh(w);
+ touchwin(w);
+ wrefresh(w);
form_driver(form, REQ_END_FIELD);
this->LastGlob = glob;
this->LastString = cstr;
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index d363f00..5c7414f 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -15,9 +15,9 @@
inline int ctrl(int z)
{
return (z&037);
-}
+}
-cmCursesStringWidget::cmCursesStringWidget(int width, int height,
+cmCursesStringWidget::cmCursesStringWidget(int width, int height,
int left, int top) :
cmCursesWidget(width, height, left, top)
{
@@ -63,7 +63,7 @@ void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, WINDOW*)
form_driver(fm->GetForm(), key);
}
-bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
+bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
WINDOW* w)
{
int x,y;
@@ -90,7 +90,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
getmaxyx(stdscr, y, x);
// If window too small, handle 'q' only
- if ( x < cmCursesMainForm::MIN_WIDTH ||
+ if ( x < cmCursesMainForm::MIN_WIDTH ||
y < cmCursesMainForm::MIN_HEIGHT )
{
// quit
@@ -100,7 +100,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
}
else
{
- key=getch();
+ key=getch();
continue;
}
}
@@ -111,7 +111,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
return false;
}
// 10 == enter
- if (key == 10 || key == KEY_ENTER)
+ if (key == 10 || key == KEY_ENTER)
{
this->OnReturn(fm, w);
}
@@ -121,7 +121,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
key == KEY_PPAGE || key == ctrl('u'))
{
this->InEdit = false;
- delete[] this->OriginalString;
+ delete[] this->OriginalString;
// trick to force forms to update the field buffer
form_driver(form, REQ_NEXT_FIELD);
form_driver(form, REQ_PREV_FIELD);
@@ -136,8 +136,8 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
fm->PrintKeys();
this->SetString(this->OriginalString);
delete[] this->OriginalString;
- touchwin(w);
- wrefresh(w);
+ touchwin(w);
+ wrefresh(w);
return true;
}
}
@@ -165,7 +165,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
{
form_driver(form, REQ_END_FIELD);
}
- else if ( key == 127 ||
+ else if ( key == 127 ||
key == KEY_BACKSPACE )
{
if ( form->curcol > 0 )
@@ -186,10 +186,10 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
}
if ( !this->Done )
{
- touchwin(w);
- wrefresh(w);
-
- key=getch();
+ touchwin(w);
+ wrefresh(w);
+
+ key=getch();
}
}
return true;
@@ -214,7 +214,7 @@ bool cmCursesStringWidget::PrintKeys()
{
int x,y;
getmaxyx(stdscr, y, x);
- if ( x < cmCursesMainForm::MIN_WIDTH ||
+ if ( x < cmCursesMainForm::MIN_WIDTH ||
y < cmCursesMainForm::MIN_HEIGHT )
{
return false;
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
index cd54f24..e939049 100644
--- a/Source/CursesDialog/cmCursesStringWidget.h
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -26,7 +26,7 @@ class cmCursesStringWidget : public cmCursesWidget
{
public:
cmCursesStringWidget(int width, int height, int left, int top);
-
+
/**
* Handle user input. Called by the container of this widget
* when this widget has focus. Returns true if the input was
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index ee36af6..952c67a 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -22,7 +22,7 @@ class cmCursesWidget
public:
cmCursesWidget(int width, int height, int left, int top);
virtual ~cmCursesWidget();
-
+
/**
* Handle user input. Called by the container of this widget
* when this widget has focus. Returns true if the input was
diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt
index 2435f39..4e07fa0 100644
--- a/Source/CursesDialog/form/CMakeLists.txt
+++ b/Source/CursesDialog/form/CMakeLists.txt
@@ -9,14 +9,14 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
-PROJECT(CMAKE_FORM)
+project(CMAKE_FORM)
-INCLUDE_REGULAR_EXPRESSION("^.*$")
-INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH} "${CMAKE_CURRENT_BINARY_DIR}")
+include_regular_expression("^.*$")
+include_directories(${CURSES_INCLUDE_PATH} "${CMAKE_CURRENT_BINARY_DIR}")
-CONFIGURE_FILE(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h")
+configure_file(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h")
-SET( FORM_SRCS
+set( FORM_SRCS
fld_arg.c
fld_attr.c
fld_current.c
@@ -58,9 +58,9 @@ SET( FORM_SRCS
fty_regex.c
)
-INCLUDE_DIRECTORIES(${CMAKE_FORM_SOURCE_DIR})
-ADD_LIBRARY(cmForm ${FORM_SRCS} )
-TARGET_LINK_LIBRARIES(cmForm ${CURSES_LIBRARY})
-IF(CURSES_EXTRA_LIBRARY)
- TARGET_LINK_LIBRARIES(cmForm ${CURSES_EXTRA_LIBRARY})
-ENDIF(CURSES_EXTRA_LIBRARY)
+include_directories(${CMAKE_FORM_SOURCE_DIR})
+add_library(cmForm ${FORM_SRCS} )
+target_link_libraries(cmForm ${CURSES_LIBRARY})
+if(CURSES_EXTRA_LIBRARY)
+ target_link_libraries(cmForm ${CURSES_EXTRA_LIBRARY})
+endif()