Changes

Jump to: navigation, search

Console Framework Classes 20103 - OOP344

835 bytes added, 14:09, 17 April 2013
m
Reverted edits by MCanaday49 (Talk) to last revision by Ldchen1
*: In this case you text size is limited to the max_number_of_lines and can not grow more than that.
*A dynamic array of strings: [[Dynamic Array Of Strings - OOP344 | StrArr]] _lines;<br />
*: This clase case ([[Dynamic Array Of Strings - OOP344 | StrArr]]) is designed to simulate a two dimensional array of characters (or an array of strings) and has no limit in the number of lines and expands automatically if needed. You can use the code for ([[Dynamic Array Of Strings - OOP344 | StrArr]]) at your own risk to implement FWText, or you can design your own logic.<br />*A Doubly Linked List (Queue) of strings [[Queue of Strings - OOP344 | StrQue]]*: [[Queue of Strings - OOP344 | StrQue]] is a Queue of null terminated characters arrays (strings) and like StrArr has no limit in the number of lines and expands automatically if needed. Like StrArr, you can use the code for [[Queue of Strings - OOP344 | StrQue]] at your own risk to implement FWText, or you can design your own logic.<br />If you found any bugs or problems with [[Queue of Strings - OOP344 | StrQue]] or [[Dynamic Array Of Strings - OOP344 | StrArr]] don't modfy , do not modify it yourself but instead, please blog about it and send an email to [[mailto:fardad.soleimanloo@senecac.on.ca?subject=OOP344-StrArr StrQue me]] and I will take care of updating it.<br />You can also find the code for [[Queue of Strings - OOP344 | StrQue]] and it's tester program in class notes repo: (svn://zenit.senecac.on.ca/oop344/trunk/C/13-Nov12). 
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
#Calls its parents draw, to draw the border.
#Using iol_display, it prints lines of text form from index _loffset, up to height()-2 times.
#:Note that each line is printed from _offset character using absRow() and absCol(), up o width()-2 characters
<big><syntaxhighlight lang="cpp">
int edit();
</syntaxhighlight></big>
Draws the text area and then starts the editing from the fist first line.<br />The whole text should scroll to left, writeright, up or down instead, if the cursor tries to pass the edges of the text area.<br />
When Enter key is hit, if in insertmode, a new line is inserted after the current line and any text after the cursor in the line should be moved into it.<br />
When Backspace key is hit at the beginning of the line, the content of the current line should be moved to the previous line, the and current line should be deleted. The cursor in this case should stand in front of the copied data. <br />
</syntaxhighlight></big>
It deallocates the allocated memory. (If any memory allocation is used).
 
=Compile, Build, testing=
==Compile and build==
cc -c iol.c
fwboderfwborder.o: fwborder.cpp fwborder.h confw.hiol.h c++ -c fwboderfwborder.cpp
fwfield.o: fwfield.cpp fwfield.h fwborder.h confw.h iol.h
==Testing==
*All the test programs are under saved at: [ssvnsvn://zenit.senecac.on.ca/oop344/trunk/C/Prj]
*Test files names are '''Test*.cpp'''
*All test programs are compiled the executable is available on '''matrix.senecac.on.ca/~fardad.soleimanloo'''*: to run the test programs, login to matrix.senecac.on.ca and login with your own user id and password, then at the command line type: '''~fardad.soleimanloo/tX''', replace the X with the number of the test. (i.e for test three, run: '''~fardad.soleimanloo/t3''')*:Note that you should use [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty] to login to matrix and set the keyboard to Xterm 6 =Due Date=*Due Nov 29, 23:59*: Tagged prj0.6
3
edits

Navigation menu