Open main menu

CDOT Wiki β

Changes

Console UI Core Classes - OOP344 20113

90 bytes removed, 23:01, 8 November 2011
CDialog
Organizes CField objects on the screen, displays them and then lets the user edit them one by one.
<span style="color:#FF0000"><b>iolgh.h doesnt exist. I think he meant cuigh.h. iolgh.h is the old name they used from previous semester.</b></span>
<big><syntaxhighlight lang="cpp">
#pragma once#include "iolghcuigh.h"
#include "cframe.h"
namespace cio{ class CField; class CDialog: public CFrame{ private: int _fnum; int _curidx; CField* _fld[C_MAX_NO_FIELDS]; bool _dyn[C_MAX_NO_FIELDS]; bool _editable; public: 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); virtual ~CDialog(); void draw(int fn = C_FULL_FRAME); int edit(int fn = C_FULL_FRAME); int add(CField* field, bool dynamic = true); int add(CField& field, bool dynamic = false); CDialog& operator<<(CField* field); CDialog& operator<<(CField& field);
int add(CField* field, bool dynamic = true); int add(CField& field, bool dynamic = false); CDialog& operator<<(CField* field); CDialog& operator<<(CField& field);  bool editable(); int fieldNum()const; int curIndex()const; CField& operator[](unsigned int index); CField& curField(); };}
</syntaxhighlight></big>
===Attributes===