You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
724 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __SDL_LOG_WIDGET_HEADER__
  2. #define __SDL_LOG_WIDGET_HEADER__
  3. #include "../core/coreWidget.h"
  4. #include "../core/coreLabel.h"
  5. #include "../../components/base/basicMutex.h"
  6. #include "../../components/base/basicLoggingService.h"
  7. #define SDL_DEFAULT_LOG_FONT_SIZE 10
  8. #define SDL_DEFAULT_LOG_ROW_SIZE 12
  9. class sdlLog :public basicLoggingService, public sdlCoreWidget {
  10. private:
  11. sdlLabel ** m_ppLines;
  12. int m_nLines;
  13. int m_nCurrentLine;
  14. basicMutex m_mProtector;
  15. public:
  16. explicit sdlLog(int x, int y, int width, int height, sdlCoreWidget * pWnd = NULL);
  17. virtual ~sdlLog();
  18. virtual void logMessage(CSTR Msg);
  19. virtual void logMessage(const char *Msg);
  20. };
  21. #endif