app.h 719 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "itemwindow.h"
  3. #define Uses_TApplication
  4. #define Uses_TEvent
  5. #define Uses_TRect
  6. #include <tvision/tv.h>
  7. const int GreetThemCmd = 100;
  8. const int CallListCmd = 101;
  9. class THelloApp : public TApplication {
  10. public:
  11. THelloApp();
  12. virtual void handleEvent(TEvent &event);
  13. static TMenuBar *initMenuBar(TRect);
  14. static TStatusLine *initStatusLine(TRect);
  15. void set_hello(const std::string &new_line) { hello_line = new_line; }
  16. virtual void idle() override;
  17. private:
  18. std::string hello_line;
  19. void greetingBox();
  20. };
  21. class THintStatusLine : public TStatusLine {
  22. public:
  23. THintStatusLine(TRect r, TStatusDef &def) : TStatusLine(r, def) {}
  24. virtual const char *hint(ushort) override;
  25. };