Open main menu

CDOT Wiki β

Changes

Console UI Core Classes - OOP344 20111

1,930 bytes added, 22:54, 23 March 2011
CDialog
CField& curField();
};
</syntaxhighlight></big>
===Attributes===
====Mandatory====
<big><syntaxhighlight lang="cpp">
int _fnum;
</syntaxhighlight></big>
<big><syntaxhighlight lang="cpp">
bool _editable;
</syntaxhighlight></big>
====Optional====
This is optional because it depends on how you are going to implement the collection of CFields:
<big><syntaxhighlight lang="cpp">
int _curidx;
</syntaxhighlight></big>
<big><syntaxhighlight lang="cpp">
CField* _fld[C_MAX_NO_FIELDS];
</syntaxhighlight></big>
<big><syntaxhighlight lang="cpp">
bool _dyn[C_MAX_NO_FIELDS];
</syntaxhighlight></big>
 
===Constructors/Destructors===
<big><syntaxhighlight lang="cpp">
CDialog(CFrame *Container = (CFrame*)0,
int Row = -1, int Col = -1,
int Width = -1, int Height = -1,
bool Borderd = false,
const char* Border=C_BORDER_CHARS);
</syntaxhighlight></big>
<big><syntaxhighlight lang="cpp">
virtual ~CDialog();
</syntaxhighlight></big>
 
===Methods===
 
<big><syntaxhighlight lang="cpp">
void draw(int fn = C_FULL_FRAME);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
int edit(int fn = C_FULL_FRAME);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
int add(CField* field, bool dynamic = true);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
int add(CField& field, bool dynamic = false);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
CDialog& operator<<(CField* field);
CDialog& operator<<(CField& field);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
bool editable();
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
int fieldNum()const;
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
int curIndex()const;
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
CField& operator[](unsigned int index);
</syntaxhighlight></big>
 
<big><syntaxhighlight lang="cpp">
CField& curField();
</syntaxhighlight></big>