summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesMainForm.h
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-11-04 23:05:21 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-11-04 23:05:21 (GMT)
commit939d614978ff6772aae619bfbc3ef89e27b69f73 (patch)
tree0b6d52df9911a29a10d25afc7650cf7a1c5ba2f1 /Source/CursesDialog/cmCursesMainForm.h
parentef74458b34dcf2d25b3948c535d59273c2307546 (diff)
downloadCMake-939d614978ff6772aae619bfbc3ef89e27b69f73.zip
CMake-939d614978ff6772aae619bfbc3ef89e27b69f73.tar.gz
CMake-939d614978ff6772aae619bfbc3ef89e27b69f73.tar.bz2
Adding curses support.
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.h')
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
new file mode 100644
index 0000000..7e4a7f7
--- /dev/null
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -0,0 +1,55 @@
+#ifndef __cmCursesMainForm_h
+#define __cmCursesMainForm_h
+
+#include <iostream>
+#include <curses.h>
+#include <form.h>
+#include "cmCursesForm.h"
+
+class cmCursesCacheEntryComposite;
+
+class cmCursesMainForm : public cmCursesForm
+{
+public:
+ cmCursesMainForm(const char* whereSource, bool newCache);
+ virtual ~cmCursesMainForm();
+
+ // Description:
+ // Set the widgets which represent the cache entries.
+ void InitializeUI(WINDOW* w);
+
+ // Description:
+ // Handle user input.
+ virtual void HandleInput();
+
+ // Description:
+ // Display form. Use a window of size width x height, starting
+ // at top, left.
+ virtual void Render(int left, int top, int width, int height);
+
+ // Description:
+ // Change the window containing the form.
+ void SetWindow(WINDOW* w)
+ { m_Window = w; }
+
+ // Description:
+ // Returns true if an entry with the given key is in the
+ // list of current composites.
+ bool LookForCacheEntry(const char* key);
+
+protected:
+ cmCursesMainForm(const cmCursesMainForm& from);
+ void operator=(const cmCursesMainForm&);
+
+ void UpdateCurrentEntry();
+ void RunCMake(bool generateMakefiles);
+ void FillCacheManagerFromUI();
+
+ std::vector<cmCursesCacheEntryComposite*>* m_Entries;
+ FIELD** m_Fields;
+ WINDOW* m_Window;
+ std::string m_WhereSource;
+ int m_Height;
+};
+
+#endif // __cmCursesMainForm_h