cmCursesMainForm.h 1.3 KB

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