TFileWindow::TFileWindow( const char *fileName ) : TWindow( TProgram::deskTop->getExtent(), fileName, winNumber++ ), TWindowInit( &TFileWindow::initFrame ) { options |= ofTileable; TRect r( getExtent() ); r.grow(-1, -1); insert(new TFileViewer( r, standardScrollBar(sbHorizontal | sbHandleKeyboard), standardScrollBar(sbVertical | sbHandleKeyboard), fileName) ); }
ScrollDialog::ScrollDialog(const TRect& bounds, const char* aTitle, ushort f) : TWindowInit(initFrame), TDialog(bounds, aTitle), scrollGroup(0) { TScrollBar* hsb = 0; TScrollBar* vsb = 0; if(f & sbHorBar) hsb = standardScrollBar(sbHorizontal|sbHandleKeyboard); if(f & sbVerBar) vsb = standardScrollBar(sbVertical|sbHandleKeyboard); TRect r = getExtent(); r.grow(-1,-1); scrollGroup = new ScrollGroup(r, hsb, vsb); scrollGroup->growMode = gfGrowHiX | gfGrowHiY; insert(scrollGroup); }
TlnMsgWindow::TlnMsgWindow(const TRect& bounds) : TWindowInit( &TlnMsgWindow::initFrame), TWindow(bounds, "Message", wnNoNumber) { TScrollBar * vBar; TScrollBar * hBar; // Initialize the window dragMode = dmLimitAll; palette = wpCyanWindow; vBar = standardScrollBar( sbVertical | sbHandleKeyboard ); hBar = standardScrollBar( sbHorizontal | sbHandleKeyboard ); TRect r = getExtent(); r.a.x = 1; r.a.y = 1; r.b.x -= 1; r.b.y -= 1; msgViewer = new TMsgListViewer(r, 1, hBar, vBar); insert(msgViewer); }