cmCursesMainForm.h 1.7 KB

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