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

#ifndef __CLI_CLASSES_DEF_HEADER__
#define __CLI_CLASSES_DEF_HEADER__
#include "cli.h"
#ifdef TURBOVISION
class WindowCLI: public TApplication {
TCommandSet windowCommands;
public:
WindowCLI();
void aboutDlgBox();
void handleEvent(TEvent &event);
static TMenuBar *initMenuBar(TRect r);
static TStatusLine *initStatusLine(TRect r);
TCommandSet getCommands();
void idle();
};
#else
#ifdef NEWT_CLI
class WindowCLI{
protected:
newtComponent m_oForm;
int m_x, m_y, m_w, m_h;
public:
explicit WindowCLI( WindowCLI *parent = NULL );
~WindowCLI();
virtual void paint(void) {};
newtComponent run();
void show();
void hide();
};
#else
typedef std::vector<CTRL *> CTRL_POOL;
class WindowCLI{
protected:
int m_iStartX, m_iStartY;
int m_iHeight, m_iWidth;
WIN_BORDER m_sBorder;
CTRL_POOL m_vCTRLs;
WINDOW *m_pWND;
WINDOW *m_pParent;
CDKSCREEN *m_pCDKScreen;
void createBox( bool flag );
public:
explicit WindowCLI( WINDOW *parent );
bool create( int startx, int starty, int width, int height );
bool setTitle( char *STR );
WINDOW *getWND( void ){ return m_pWND; };
CDKSCREEN *getCWND( void ){ return m_pCDKScreen; };
void setPWND( WINDOW *ptr ){ m_pParent = ptr; };
void setCWND( CDKSCREEN *ptr ){ m_pCDKScreen = ptr; };
bool addControl( void *obj, EObjectType objectType );
~WindowCLI();
virtual void paint( void ){createBox( true );wrefresh( m_pWND );};
};
#endif
#endif
#endif