Changes

Jump to: navigation, search

Console UI Core Classes - OOP344 20113

1,008 bytes added, 16:22, 23 November 2011
Methods
===Methods===
'''Under Construction'''
<big><syntaxhighlight lang="cpp">
void draw(int fn = C_FULL_FRAME);
void set(const void *Str);
</syntaxhighlight></big>
Sets the '''_T''' attribute to the incoming string.
<big><syntaxhighlight lang="cpp">
void *data()const;
</syntaxhighlight></big>
Exports the string out of _T and returns its address after casting it to '''void*'''.
<big><syntaxhighlight lang="cpp">
int edit();
</syntaxhighlight></big>
# Create local variables to hold the following attributes in case ESCAPE is hit to undo:
## _T
## _curpos
## _offset
## _lcurpos
## _loffset
# Create the usual '''while(!done)''' structure for interfacing with user
# '''draw()''' the text
# '''console.edit()''' the Line at where vertical cursor is after _loffset.
## use absRow() and _lcurpos to calculate the row on which the editing should happen
## use absCol() to calculate the column on which editing to happen.
## use width() to calculate the fieldLen for '''console.edit()'''
## use the '''size()''' of the current '''Line''' in '''_T''' to determine the maximum data length of the string to '''console.edit()'''
## the isTextEditor is always true
## the ReadOnly depends on the value of '''_displayOnly'''
<big><syntaxhighlight lang="cpp">
bool editable()const;
</syntaxhighlight></big>
Always return true;
<big><syntaxhighlight lang="cpp">
bool displayOnly();
void displayOnly(bool val);
</syntaxhighlight></big>
These methods Get and Set the '''_displayOnly''' attribute.
===The Text Helper Class===

Navigation menu