Open main menu

CDOT Wiki β

Changes

Console UI Core Classes - OOP344 20111

581 bytes added, 13:15, 4 April 2011
Constructors / Destructor
CMenuItem(bool Selected,const char* Format, const char* Text, int Row, int Col, int Width);
</syntaxhighlight></big>
*Sets _selected to Selected (0 for false and 1 for true)
*Copies Format into _format
*Allocated enough memory to hold Text and sets _text to address of newly allocated memory
*Copies the string pointed by Text into _text
*Sets _data to the address of _selected
<big><syntaxhighlight lang="cpp">
CMenuItem(const CMenuItem &CM);
</syntaxhighlight></big>
*Passes the incoming CMenuItem ("CM") to CFiled's constructor
*Allocated enough memory to hold CM._text and sets _text to address of newly allocated memory
*Copies the string pointed by CM._text into _text
*Sets _selected to CM._selected
*Sets _data to the address of _selected
<big><syntaxhighlight lang="cpp">
~CMenuItem(void);
</syntaxhighlight></big>
*Deallocated the memory pointed by _text
 
===Methods===
<big><syntaxhighlight lang="cpp">