Exemplo n.º 1
0
void BeyeContext::show_usage() const {
    beye_priv& priv = static_cast<beye_priv&>(opaque);
    unsigned evt,i,nln,h,y;
    TWindow *win;
    nln = sizeof(beyeArg)/sizeof(struct tagbeyeArg);
    h = nln+4;
    y = priv._tconsole->vio_height()/2-h/2;
    win = new(zeromem) TWindow(2,y,priv._tconsole->vio_width()-2,h+2,TWindow::Flag_None | TWindow::Flag_NLS);

    win->set_title(BEYE_VER_MSG,TWindow::TMode_Center,error_cset.border);
    win->into_center();
    win->set_color(error_cset.main);
    win->set_frame(TWindow::DOUBLE_FRAME,error_cset.border);
    win->set_footer(" Press [ ESC ] to quit ",TWindow::TMode_Right,error_cset.border);
    win->clear();
    win->goto_xy(1,1);
    win->puts(" Usage: beye [OPTIONS] file...");
    for(i = 0;i < nln;i++)
    {
	win->goto_xy(1,4+i);
	win->printf("  %s     %s\n",beyeArg[i].key,beyeArg[i].prompt);
    }
    win->show();
    do {
	evt = GetEvent(NULL,NULL,priv.ErrorWnd);
    }while(!(evt == KE_ESCAPE || evt == KE_F(10) || evt == KE_ENTER));
    delete win;
}
Exemplo n.º 2
0
TWindow * __FASTCALL__ CreateEditor(tAbsCoord X1,tAbsCoord Y1,tAbsCoord X2,tAbsCoord Y2,TWindow::twc_flag flags)
{
 TWindow *ret;
 ret = new(zeromem) TWindow(X1,Y1,X2-X1+1,Y2-Y1+1,flags);
 ret->set_color(dialog_cset.editor.active);
 ret->clear();
 return ret;
}
Exemplo n.º 3
0
TWindow * __FASTCALL__ CrtHlpWndnls(const std::string& title,tAbsCoord x2,tAbsCoord y2)
{
 TWindow *win;
 TWindow::twc_flag flags = TWindow::Flag_Has_Frame|TWindow::Flag_NLS;
 win = new(zeromem) TWindow(0,0,x2+2,y2+2,flags);
 win->into_center();
 win->set_color(help_cset.main);
 win->clear();
 win->set_frame(TWindow::DOUBLE_FRAME,help_cset.border);
 if(!title.empty()) win->set_title(title,TWindow::TMode_Center,help_cset.title);
 win->show();
 return win;
}
Exemplo n.º 4
0
TWindow * __FASTCALL__ CrtDlgWndnls(const std::string& title,tAbsCoord width,tAbsCoord height )
{
 TWindow *win;
 TWindow::twc_flag flags;
 flags = TWindow::Flag_Has_Frame|TWindow::Flag_NLS;
 win = new(zeromem) TWindow(0,0,width+2,height+2,flags);
 win->into_center();
 win->set_color(dialog_cset.main);
 win->clear();
 win->set_frame(TWindow::DOUBLE_FRAME,dialog_cset.border);
 if(!title.empty()) win->set_title(title,TWindow::TMode_Center,dialog_cset.title);
 win->show();
 return win;
}
Exemplo n.º 5
0
void PharLap_Parser::PLSegPaint(TWindow& win,const std::vector<PLSegInfo>& names,unsigned start) const
{
    const PLSegInfo& nam = names[start];
    win.freeze();
    win.clear();
    std::ostringstream oss;
    oss<<" Segment Table [ "<<(start + 1)<<" / "<<names.size()<<" ] ";
    win.set_title(oss.str(),TWindow::TMode_Center,dialog_cset.title);
    win.set_footer(PAGEBOX_SUB,TWindow::TMode_Right,dialog_cset.selfooter);
    win.goto_xy(1,1);
    win.printf(
	  "Selector number            = %04hXH\n"
	  "Flags                      = %04hXH\n"
	  "Base offset of selector    = %08lXH\n"
	  "Min extra memory alloc     = %08lXH"
	  ,nam.siSelector
	  ,nam.siFlags
	  ,nam.siBaseOff
	  ,nam.siMinAlloc);
    win.refresh_full();
}
Exemplo n.º 6
0
void PharLap_Parser::PLRunTimePaint(TWindow& win,const std::vector<PLRunTimeParms>& names,unsigned start) const
{
    std::ostringstream oss;
    char sign[3];
    const PLRunTimeParms& nam = names[start];
    win.freeze();
    win.clear();
    oss<<" Run-time Parameters Table [ "<<(start + 1)<<" / "<<names.size()<<" ] ";
    win.set_title(oss.str(),TWindow::TMode_Center,dialog_cset.title);
    win.set_footer(PAGEBOX_SUB,TWindow::TMode_Right,dialog_cset.selfooter);
    strncpy(sign,(const char *)nam.rtSignature,2);
    sign[2] = 0;
    win.goto_xy(1,1);
    win.printf(
	  "Signature                      = %s\n"
	  "Min. number of real-mode parms = %04hXH\n"
	  "Max. number of real-mode parms = %04hXH\n"
	  "Min. interrupt buffer size     = %04hXH\n"
	  "Max. interrupt buffer size     = %04hXH\n"
	  "Number of interrupt stacks     = %04hXH\n"
	  "Size of each interrupt stack   = %04hXH\n"
	  "Offset of end of real-mode data= %08lXH\n"
	  "Call buffer size               = %04hXH\n"
	  "Flags                          = %04hXH\n"
	  "Unpriviledge flags             = %04hXH"
	  ,sign
	  ,nam.rtMinRModeParms
	  ,nam.rtMaxRModeParms
	  ,nam.rtMinIBuffSize
	  ,nam.rtMaxIBuffSize
	  ,nam.rtNIStacks
	  ,nam.rtIStackSize
	  ,nam.rtEndRModeOffset
	  ,nam.rtCallBuffSize
	  ,nam.rtFlags
	  ,nam.rtUnprivFlags);
    win.refresh_full();
}