Changes

Jump to: navigation, search

The CIO Framework - OOP344 20123

5,883 bytes added, 19:44, 26 November 2012
Adding note about obj file
Under Construction
{{OOP344 Index | 20123}}
|
|-------- CCheckList
</pre></big><!-- |
|
|-------- CMenuItem
|
|
|-------- CMenu --</pre></big>
==Student Resources==
===Help/Questions===
Hi people! Maybe someone can help me -- I am trying to do the copy constructor in CLabel which needs to copy cFrame but CFrame's attribute char_border[9] doesn't have a setter or a getter so far as I can see -- unless I'm misunderstanding something I need to add a getter/setter pair for char_border to CFrame or add a copy constructor that I could use. Does anyone have any suggestions? We can modify CFrame if we want to, right?
Alina - email: [mailto:ashtramwasser1@myseneca.ca ashtramwasser1]
 
I did the CLabel class, for the copy constructor, the base class is CField, the attribute is void* _data, which you can cast to char*. then do deep copy for this data member. Hope this is useful for your question. Yun Yang
===Blog Posts===
===Issues===
==== 0.2 Milestone ====
(Due Sun Mon Nov 11th12th, 23:59)
# Add console class to project and test with cio_test (issue 1)
# Create Mock-up classes
### CText Mock-up Class (issue 2.8.2)
## CCheckList Mock-up Class (issue 2.9)
==== 0.3 Milestone ====
:<b>Due along with 0.4 milestone</b>
# CField, Dialog and Label
# line Edit
 
==== 0.4 milestone ====
(Sun Nov 25th. 23:59)
# CButton
# CValEdit
# CCheckMark
 
==== 0.6 milestone ====
# CText
# CheckList
==CFrame==
void capture(); // captures and saves the characters in the area covered by this frame when displayed and sets
// _covered to point to it
void free(); // deletes dynamic memory in the _covered pointer
protected:
int absRow()const;
</syntaxhighlight></big>
Casts the return value of CFrame::frame() to a CDialog pointer and returns it.
===CField Complied Object Files===
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cfield.zip Linux]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cfield.zip Mac]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cfield.zip Borland C++ 5.5]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cfield.zip Visual C++ 10]
* Note. At least with the VS obj files, if you look at cfield.h, the method: virtual void* data(); is now: virtual void* data()'''const'''; However, this isn't the case in our header requirements. Noticed this when trying to compile with our header based on this wiki.
==CLabel==
passes the Row and Col to the CField constructor and then;
if len is zero, it will allocate enough memory to store the string pointed by Str and then copies the Str into it.
if len > 0, then it will allocate enough memory to store '''len''' chars in a string, copying only len characters of str.In any way, the allocated memory is pointed by '''_data'''. Also it will set the width to the length of the memory allocated.
<big><syntaxhighlight lang="cpp">
CLabel(int Row, int Col, int Len);
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 Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/clabel.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/clabel.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/clabel.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/clabel.zip Visual C++ 10]
==CDialog==
Organizes CField objects on the screen, displays them and then lets the user edit them one by one.
</syntaxhighlight></big>
If '''fn''' is '''C_FULL_FRAME''', it will call its parent draw. Then It will draw all the '''Fields''' in the '''Dialog'''. <br />
If '''fn''' is not '''C_FULL_FRAME'''Zero, then it will just draw all the '''Fields''' in the '''Dialog'''.<br />
If '''fn''' is a non-zero positive value, then it will only draw '''Field''' number '''fn''' in the dialog. (First added '''Field''' is field number one.)
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
Returns the reference of the Field that was just being edited.
 
===CDialog Complied Object Files===
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cdialog.zip Linux]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cdialog.zip Mac]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cdialog.zip Borland C++ 5.5]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cdialog.zip Visual C++ 10]
==CLineEdit==
'''ClineEdit''' encapsulates the console.edit() function of Console class.
</syntaxhighlight></big>
Copies the characters pointed by '''Str''' into the memory pointed by Field's '''_data''' up to '''_maxdatalen''' characters.
===CLineEdit Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/clineedit.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/clineedit.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/clineedit.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/clineedit.zip Visual C++ 10]
==CButton==
Button is a child of CField.
Always returns true
===CButton Complied Object Files===
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cbutton.zip Linux]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cbutton.zip Mac]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cbutton.zip Borland C++ 5.5]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cbutton.zip Visual C++ 10]
==CValEdit==
<big><syntaxhighlight lang="cpp">
''Navigation keys are Up key, Down key, Tab key or Enter key.''<br />
''MessageStatus is enumerated in '''cuigh.h'''''
===CValEdit Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cveditline.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cveditline.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cveditline.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cveditline.zip Visual C++ 10]
==CCheckMark==
<big><syntaxhighlight lang="cpp">
bool checked()const;
void checked(bool val);
bool radio(); // addition for R0.6 void radio(bool isRadio); // addition for R0.6 operator bool(); // addtion for R0.6 operator char*(); // addition for R0.6
bool operator=(bool flag);
};
* Overload the operator= and set the _flag to flag
<!--===CCheckMark Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/ccheckmark.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/ccheckmark.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/ccheckmark.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/ccheckmark.zip Visual C++ 10]==CMenuItem(optional)==
CMenuItem provides a Label that is can be marked as selected by pressing the space bar.
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
Returns the text of Label
-->
===CMenuItem Complied Object Files===
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cmenuitem.zip Linux]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cmenuitem.zip Mac]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cmenuitem.zip Borland C++ 5.5]
* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cmenuitem.zip Visual C++ 10]
==CText==
CText is a CField to edit a multiline text.<br />
===The Text Helper Class===
[https://github.com/Seneca-OOP344/OOP344-20123/tree/master/TextClass Text class]
===CText Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/ctext.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/ctext.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/ctext.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/ctext.zip Visual C++ 10]
==CCheckList==
<big><syntaxhighlight lang="cpp">
returns '''_cnt'''
<!--===CCheckList Complied Object Files===* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cchecklist.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cchecklist.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cchecklist.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cchecklist.zip Visual C++ 10]==CMenu and MNode(optional)==
CMenu is a linked list of MNodes. Providing menu selection for the user in two formats; Drop Down List, or a simple menu.
</syntaxhighlight></big>
returns true if '''_cnt''' is greater than zero
-->====CMenu Complied Object Files====* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/linux/cmenu.zip Linux]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/mac/cmenu.zip Mac]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/borland/cmenu.zip Borland C++ 5.5]* [http://matrix.senecac.on.ca/~fardad.soleimanloo/files/classObjs/vc/cmenu.zip Visual C++ 10]

Navigation menu