Open main menu

CDOT Wiki β

Changes

Console Framework Classes 20103 - OOP344

588 bytes added, 19:13, 15 November 2010
Methods
const char* Border=FW_BORDER_CHARS);
</pre></big>
When creating a Button, allocate enough memory to hold the contents of the '''Str''' and set Field's _data to point to it. Then copy the content of '''Str''' into the newly allocated memory.<br />
Pass all the arguments directly to Field's constructor.
For Field size (width and hight) do the following:
For width: Set width to the length of '''Str''' + 2 (adding 2 for surrounding brackets) or if the Button is bordered set width to the length of '''Str''' + 4 (adding 2 for surrounding brackets and 2 for the borders).
 
<big><pre>
~FWButton();
</pre></big>
Deallocates the allocated memory pointed by Field's '''_data'''.
<big><pre>