cmCursesForm.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. static cmCursesForm* CurrentForm;
  34. protected:
  35. static std::ofstream DebugFile;
  36. static bool Debug;
  37. cmCursesForm(const cmCursesForm& from);
  38. void operator=(const cmCursesForm&);
  39. FORM* m_Form;
  40. };
  41. #endif // __cmCursesForm_h