18.10.2014 Views

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

346 TUI the implementation<br />

procedure New_L<strong>in</strong>e( The:<strong>in</strong> out W<strong>in</strong>dow ) is<br />

beg<strong>in</strong><br />

if The.C_Y >= The.Max_Y then --Scroll text<br />

for Y <strong>in</strong> 2 .. The.Max_Y loop -- Copy up<br />

The.Pane(Y) := The.Pane(Y+1);<br />

end loop;<br />

The.Pane(The.Max_Y+1)(2..The.Max_X+1):= (others=>' ');<br />

Refresh(The);<br />

-- refresh<br />

else<br />

The.C_Y := The.C_Y + 1; --Next l<strong>in</strong>e<br />

end if;<br />

The.C_X := 1;<br />

--At start<br />

end New_L<strong>in</strong>e;<br />

The procedure Position allows a user to set the current writ<strong>in</strong>g position <strong>in</strong> the w<strong>in</strong>dow.<br />

procedure Position( The:<strong>in</strong> out W<strong>in</strong>dow; X,Y:<strong>in</strong> Positive ) is<br />

beg<strong>in</strong><br />

if X

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!