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.

61 lines
1.9 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __CLI_CLASSES_DEF_HEADER__
  2. #define __CLI_CLASSES_DEF_HEADER__
  3. #include "cli.h"
  4. #ifdef TURBOVISION
  5. class WindowCLI: public TApplication {
  6. TCommandSet windowCommands;
  7. public:
  8. WindowCLI();
  9. void aboutDlgBox();
  10. void handleEvent(TEvent &event);
  11. static TMenuBar *initMenuBar(TRect r);
  12. static TStatusLine *initStatusLine(TRect r);
  13. TCommandSet getCommands();
  14. void idle();
  15. };
  16. #else
  17. #ifdef NEWT_CLI
  18. class WindowCLI{
  19. protected:
  20. newtComponent m_oForm;
  21. int m_x, m_y, m_w, m_h;
  22. public:
  23. explicit WindowCLI( WindowCLI *parent = NULL );
  24. ~WindowCLI();
  25. virtual void paint(void) {};
  26. newtComponent run();
  27. void show();
  28. void hide();
  29. };
  30. #else
  31. typedef std::vector<CTRL *> CTRL_POOL;
  32. class WindowCLI{
  33. protected:
  34. int m_iStartX, m_iStartY;
  35. int m_iHeight, m_iWidth;
  36. WIN_BORDER m_sBorder;
  37. CTRL_POOL m_vCTRLs;
  38. WINDOW *m_pWND;
  39. WINDOW *m_pParent;
  40. CDKSCREEN *m_pCDKScreen;
  41. void createBox( bool flag );
  42. public:
  43. explicit WindowCLI( WINDOW *parent );
  44. bool create( int startx, int starty, int width, int height );
  45. bool setTitle( char *STR );
  46. WINDOW *getWND( void ){ return m_pWND; };
  47. CDKSCREEN *getCWND( void ){ return m_pCDKScreen; };
  48. void setPWND( WINDOW *ptr ){ m_pParent = ptr; };
  49. void setCWND( CDKSCREEN *ptr ){ m_pCDKScreen = ptr; };
  50. bool addControl( void *obj, EObjectType objectType );
  51. ~WindowCLI();
  52. virtual void paint( void ){createBox( true );wrefresh( m_pWND );};
  53. };
  54. #endif
  55. #endif
  56. #endif