Changes

Jump to: navigation, search

Console Framework Classes 20103 - OOP344

1,894 bytes added, 10:32, 14 November 2010
Methods
const char* Border=FW_BORDER_CHARS);
</pre></big>
Passes all the arguments to its parent constructor and then sets the FWDialog to an empty dialog.<br />
(Sets all the Field pointers to null, flags to false and numbers to zero)
 
<big><pre>
virtual ~FWDialog();
</pre></big>
Loops through all the field pointers and checks to see if any of them are dynamically allocated and deletes them.
(it only deletes those fields that are flagged as dynamic)
<big><pre>
void draw(int fn = FW_NO_REFRESH)const;
</pre></big>
If '''fn''' is '''FW_REFRESH''' of '''FW_FULL_FRAME''', it will call its parent draw with '''fn''' as its argument. Then It will draw all the '''Fields''' in the '''Dialog'''. <br />
If '''fn''' is '''FW_NO_REFRESH''', 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><pre>
int edit(int fn = FW_NO_REFRESH);
</pre></big>
 
If '''FWDialog''' is not editable (all fields are non-editable), it will just display the Dialog and then waits for the user to enter a key and then terminates the function returning the key.<br />
If fn is '''0''' or less, then before editing, the draw method is called with '''fn''' as its argument and then editing begins from the first editable Field.
 
If fn is greater than '''0''' then editing begins from the first editable key on or after Field number '''fn'''.
 
Note that fn is the sequence number of field and not the index. (First field number is one)
 
Start editing from field number '''fn''';
 
Call the edit of each field and depending on the value returned, do the following:<br />
# For '''ENTER_KEY''', '''TAB_KEY''' and '''DOWN_KEY''', go to next editable Field , if this is the last editable Field then restart from Field number one.
# For '''UP_KEY''' go to the previous editable Field, if there is no previous editable Field, go to the last editable Field in the Dialog.
# For any other key, terminate the edit function returning the character which caused the termination.
<big><pre>

Navigation menu