Changes

Jump to: navigation, search

The CUI Framework - OOP344 20132

96 bytes removed, 23:53, 10 August 2013
Issues, Releases and Due Dates
*Issue Name Format
*:Issue and branch name format: '''V.V_Name''' <br />
*:example; issue: Add Text Class to the project (issue 2.9.1) issue and branch name on gitubgithub: '''2.9.1_AddTextClass'''<br />: * A2 Milestone 0.2 - Due Friday July 12th*: Split up work within group and document it in the team pages*: Add skeletons for each class (empty function definitions in .cpp files)*:* A2 Milestone 0.4 - Due Friday July 19th*: Implement CLabel*: Implement CButton*: Implement CLineEdit*:* A2 Milestone 0.5 - Due Friday July 26th*: Implement CDialog*: Implement CValEdit*: Implement CMenuItem*:* A2 Milestone 0.7 - Due Friday August 2nd*: Implement CCheckMark*: Implement CText*: Implement CCheckList*:* A2 Milestone 0.9 - Due Friday August 9th*: Implement CMenu*: Merge all projects and verify CUI framework is fully functional and bugless*:* A2 Milestone 1.0 - Due Friday August 15th*: The Application*:Please note these are latest recommendations and you should intend to have these completed BEFORE the due dates. The final dead-line for this project is August 15h, no projects will be accepted past this point. 
=Classes=
==CFrame==
void draw(int fn=C_NO_FRAME) ;
</syntaxhighlight></big>
makes a direct call to console.displaystrdsp(), passing '''_data''' for the string to be printed and absRow() and absCol() for row and col and _length width() for len.
this function ignores the argument fn.
<big><syntaxhighlight lang="cpp">
if width() is greater than zero, it will copy the string pointed by str into the string pointed by _data upto width characters.
if width() is zero,<br /> It will delete the memory pointed by _data and reallocates enough memory for str and copies the string pointed by str into the newly allocated memory pointed by _data.
 
===CLabel Student Resources===
====CLabel Help/Questions Blogs====
int Row = -1, int Col = -1,
int Width = -1, int Height = -1,
bool Borderd Bordered = false,
const char* Border=C_BORDER_CHARS);
virtual ~CDialog();
unsigned int _fldSize;
</syntaxhighlight></big>
Holds the current length of '''''_fld''''' and '''''_dyn'''''. <br />When adding a field to dialog if '''_fum_fnum''' reaches '''_fldSize''', then the size of '''_fld''' and '''_dyn''' is expanded by '''''C_DIALOG_EXPANSION_SIZE''''', defined in '''cuigh.h'''
===Constructors/Destructors===
int edit();
</syntaxhighlight></big>
Makes a direct call to, and returns '''console.editstredit()'''.
For the coordinates and width arguments follow the same rules as the draw function.
For the rest of the arguments of console.edit(), use the attributes of '''CLineEdit'''.
</syntaxhighlight></big>
Copies the characters pointed by '''Str''' into the memory pointed by Field's '''_data''' up to '''_maxdatalen''' characters.
 
===CLineEdit Student Resources===
====CLineEdit Help/Questions Blogs====
*Does anyone know that what value I have to assign to _offset and _curpos for CLineEdit attribute since there is no value passed by the constructor? Chun Chen
* [http://ksidhucode.blogspot.ca/2013/07/should-they-be--> _offset and _curpos are set to 0friends. html Kevin S -Koghulan NamasivayamNeed help with draw()]
====CLineEdit Blog Posts====
[http://pankajsama01.blogspot.ca/2013/03/cbuttonhit-key.html C_BUTTON_HIT Key] is not defined(Pankaj Sama)
** It is defined in the new cuigh.h file. It is defined #define C_BUTTON_HIT 1. Gary Chen
 
 
'''HELP: Brackets around buttons' labels'''
: [http://namniak.blogspot.ca/2013/07/help-cbutton-brackets.html link] Vadim Namniak
====CButton Blog Posts====
===CValedit Student Resources===
====CValEdit Help/Questions Blogs====
====CValedit Blog Posts====
 
{| class="wikitable" border="1"
| [http://divya522.blogspot.ca/2013/03/errors-in-cvaledit.html Cdirection Error]||[mailto:dsharma37@myseneca.ca?subject=oop344 Divya Sharma]||
|}
 
====CValedit Blog Posts====
==CCheckMark==
Creates a single CheckMark on the screen and allows the user to:<br />
-S.E.
 
I think you may try to change to console.setPos(row, ++col).
-Ivy
====CCheckMark Blog Posts====
===CMenuItem Student Resources===
====CMenuItem Help/Questions Blogs====
 
{| class="wikitable" border="1"
|-
| Question || Comment
|-
| [http://pankajsama01.blogspot.ca/2013/03/getting-cdirection-error.html Getting Cdirection Error](Pankaj Sama)||
 
|-
|[http://lhmcintosh.blogspot.ca/2013/03/05-cdialog-issue.html 0.5 CDialog Error] (Lucas McIntosh)|| just put return *_fld[_curidx]; - Glaser
|}
====CMenuItem Blog Posts====
===The Text Helper Class===
[https://github.com/Seneca-OOP344/20131-notes20132notes/tree/master/TextClass textClass Text class]
===CText Student Resources===
====CText Help/Questions Blogs====
====CText Blog Posts====
 
 
 
{| class="wikitable" border="1"
 
|-
 
| Question || Comment
 
|-
 
|[http://bleulynn.wordpress.com/2013/04/15/ctext/] curpos (Ran)||
 
|}
==CCheckList==
===CCheckList Student Resources===
====CCheckList Help/Questions Blogs====
 
* If you copied the header (''cchecklist.h'') from the ''20132notes'' repository, make sure to remove the const keyword after the ''void* data()'' function, since it is not.
* The same thing is for ''<u>void selectedIndex(int index)</u>'' and ''<u>int selectedIndex()const</u>'' — it is how they should look like.
 
====CCheckList Blog Posts====
{| class="wikitable" border="1"
|-
| Question || Comment
|-
|Anybody knows how to update the bit pattern of _flags in CCheckList add() method? (Xinggui Deng)||
|-
|You can do: _flags = _flags (bit operator or) (1 << _cnt) ---Gary Chen ||
|-
|[http://kelan-meta.blogspot.ca/2013/04/cchecklist-constructors.html CCheckList constructor question]||
|-
|Also, Brian found out we should use the console.getkey() instead of CCheckMarks::edit() to get the key in edit() function--Gary Chen ||
|-
|[http://kelan-meta.blogspot.ca/2013/04/checked.html Can anyone give me a hint as to why there are garbage symbols after checked option?]|| Thank you for pointing out in your blog that bio::strncpy() does not copy the null byte! I was able to fix my group's clabel.cpp with your help -- Brian Wong (yhwong)
|}
==CMenu and MNode (optional)==
</syntaxhighlight></big>
===MNode===
MNode holds to main information about an Item in the menutmenu:
# The CMenuItem object
# The index of this Item
</syntaxhighlight></big>
deletes the '''_item'''
 
===CMenu===
const char* selectedText();
</syntaxhighlight></big>
returns the text of the selected menu, if . If nothing is selected, and empty string is returned.
<big><syntaxhighlight lang = "cpp">
bool editable()const;
</syntaxhighlight></big>
returns true if '''_cnt''' is greater than zero
 
===CMenu Student Resources===
====CMenu Help/Questions Blogs====
====CMenu Blog Posts====

Navigation menu