cmCursesMainForm.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef __cmCursesMainForm_h
  2. #define __cmCursesMainForm_h
  3. #include <iostream>
  4. #include <curses.h>
  5. #include <form.h>
  6. #include "cmCursesForm.h"
  7. class cmCursesCacheEntryComposite;
  8. class cmCursesMainForm : public cmCursesForm
  9. {
  10. public:
  11. cmCursesMainForm(const char* whereSource, bool newCache);
  12. virtual ~cmCursesMainForm();
  13. // Description:
  14. // Set the widgets which represent the cache entries.
  15. void InitializeUI(WINDOW* w);
  16. // Description:
  17. // Handle user input.
  18. virtual void HandleInput();
  19. // Description:
  20. // Display form. Use a window of size width x height, starting
  21. // at top, left.
  22. virtual void Render(int left, int top, int width, int height);
  23. // Description:
  24. // Change the window containing the form.
  25. void SetWindow(WINDOW* w)
  26. { m_Window = w; }
  27. // Description:
  28. // Returns true if an entry with the given key is in the
  29. // list of current composites.
  30. bool LookForCacheEntry(const char* key);
  31. protected:
  32. cmCursesMainForm(const cmCursesMainForm& from);
  33. void operator=(const cmCursesMainForm&);
  34. void UpdateCurrentEntry();
  35. void RunCMake(bool generateMakefiles);
  36. void FillCacheManagerFromUI();
  37. std::vector<cmCursesCacheEntryComposite*>* m_Entries;
  38. FIELD** m_Fields;
  39. WINDOW* m_Window;
  40. std::string m_WhereSource;
  41. int m_Height;
  42. };
  43. #endif // __cmCursesMainForm_h