cmCursesForm.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __cmCursesForm_h
  2. #define __cmCursesForm_h
  3. #include "../cmStandardIncludes.h"
  4. #include "cmCursesStandardIncludes.h"
  5. class cmCursesForm
  6. {
  7. public:
  8. cmCursesForm();
  9. virtual ~cmCursesForm();
  10. // Description:
  11. // Handle user input.
  12. virtual void HandleInput() = 0;
  13. // Description:
  14. // Display form.
  15. virtual void Render(int left, int top, int width, int height) = 0;
  16. // Description:
  17. // This method should normally called only by the form.
  18. // The only exception is during a resize.
  19. virtual void UpdateStatusBar() = 0;
  20. // Description:
  21. // During a CMake run, an error handle should add errors
  22. // to be displayed afterwards.
  23. virtual void AddError(const char* message, const char* title) {};
  24. // Description:
  25. // Turn debugging on. This will create ccmakelog.txt.
  26. static void DebugStart();
  27. // Description:
  28. // Turn debugging off. This will close ccmakelog.txt.
  29. static void DebugEnd();
  30. // Description:
  31. // Write a debugging message.
  32. static void LogMessage(const char* msg);
  33. // Description:
  34. // Return the FORM. Should be only used by low-level methods.
  35. FORM* GetForm()
  36. {
  37. return m_Form;
  38. }
  39. static cmCursesForm* CurrentForm;
  40. protected:
  41. static std::ofstream DebugFile;
  42. static bool Debug;
  43. cmCursesForm(const cmCursesForm& from);
  44. void operator=(const cmCursesForm&);
  45. FORM* m_Form;
  46. };
  47. #endif // __cmCursesForm_h