1
0

cmCursesMainForm.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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, const char* whereCMake,
  11. 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. static const int MIN_WIDTH;
  32. static const int MIN_HEIGHT;
  33. static const int IDEAL_WIDTH;
  34. static const int MAX_WIDTH;
  35. // Description:
  36. // This method should normally called only by the form.
  37. // The only exception is during a resize.
  38. void UpdateStatusBar();
  39. // Description:
  40. // This method should normally called only by the form.
  41. // The only exception is during a resize.
  42. void PrintKeys();
  43. protected:
  44. cmCursesMainForm(const cmCursesMainForm& from);
  45. void operator=(const cmCursesMainForm&);
  46. void RunCMake(bool generateMakefiles);
  47. void FillCacheManagerFromUI();
  48. std::vector<cmCursesCacheEntryComposite*>* m_Entries;
  49. FIELD** m_Fields;
  50. WINDOW* m_Window;
  51. std::string m_WhereSource;
  52. std::string m_WhereCMake;
  53. int m_Height;
  54. };
  55. #endif // __cmCursesMainForm_h