Changes

Jump to: navigation, search

Console UI Core Classes - OOP344 20111

4,816 bytes added, 01:28, 27 September 2011
m
no edit summary
'''Release 0.5'''
'''Before anything, go to your repository/branches/fardad/bio_additions and open bio.c and bio.h, then copy and apply the &lt;span class=&quot;plainlinks&quot;&gt;[http://www.thepiggybackrider.com/ &lt;span style=&quot;color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/&quot;&gt;child carrier&lt;/span&gt;]&lt;/span&gt; <span class="plainlinks">[http://www.thepiggybackrider.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/">child carrier</span>]</span> additional functions and changes to your own bio.c and bio.h in trunk. Make sure it compiles and runs properly. These changes add buffering support to be able to prevent flickering. The functionalities added will not change the console behavior or the bio functions. After applying the changes, everything should work they way they worked before.'''
Your objective at this stage is to create series of core classes designed to interact with the user. These '''Core Classes''' then can be used in development of any interactive application.
Start by creating mock-up classes (class declaration and definition with empty methods that only compiles and don't do anything).
Each class MUST have its own header file to hold its declaration and &amp;quot;cpp&amp;quot; file to hold its implementation. To make sure you do not do circular includes follow these simple guidelines:
* Add recompilation safeguards to all your header files.
* Always use forward declaration if possible instead of including a class header-file.
* Use includes only in files in which the actual header file code is used.
* '''Avoid &amp;quot;just in case&amp;quot; includes.'''
=Due Dates=
===Sat March 19 R3.0===
= General Internal Header file (cgh.h R0.1)=
The general header file holds the common setting and definition between all the Core Classes.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
#ifndef ___CGH_H__
#define C_NO_FRAME 0
#define C_BORDER_CHARS &amp;quot;/-\\|/-\\|&amp;quot;
enum CDirection {bio_centre, bio_left, bio_right, bio_up, bio_down};
extern &amp;quot;C&amp;quot;{#include &amp;quot;bio.h&amp;quot;
};
# undef NO_HELPFUNC
#endif
#define NO_HELPFUNC ((void(*)(MessageStatus, CDialog&amp;amp;))(0))
#ifdef NO_VALDFUNC
# undef NO_VALDFUNC
#endif
#define NO_VALDFUNC ((bool(*)(const char*, CDialog&amp;amp;))(0))
#endif
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
=File Names=
*:For example '''CFrame''' class should have '''cframe.h''' and '''cframe.cpp''' files for its implementation.
=Hierarchy=
&amp;lt;big&amp;gt;&amp;lt;pre&amp;gt;
CFrame
|
|
|-------- CMenu
&amp;lt;/pre&amp;gt;&amp;lt;/big&amp;gt;
=Basic (BIO) Encapsulating Classes=
CFrame is base of all objects in our user interface system.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
#pragma once
#include &amp;quot;cgh.h&amp;quot;
class CFrame{
void refresh();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Properties===
int _row, holds the relative coordinate of top row of this border with respect to its container.&amp;lt;br /&amp;gt;int _col, same as _row, but for _col. &amp;lt;br /&amp;gt;int _height, height of the entity. &amp;lt;br /&amp;gt;int _width, width of the entity. &amp;lt;br /&amp;gt;char _border[9], characters used to draw the border: &amp;lt;br /&amp;gt;
: _border[0], left top
: _border[1], top side
: _border[6], bottom left
: _border[7], left side
bool _visible; Indicates if the border surrounding the entity is to be drawn or not. &amp;lt;br /&amp;gt;CFrame* _frame; holds the container (another CFrame) which has opened this one (owner or container of the current CFrame). '''_frame''' will be NULL if this CFrame does not have a container, in which case, it will be full screen and no matter what the values of row, col, width and height are, CFrame will be '''Full Screen''' (no border will be drawn)&amp;lt;br /&amp;gt;
char* _covered; is a pointer to a character array that hold what was under this frame before being drawn. When the CFrame wants to hides itself, it simple copies the content of this array back on the screen on its own coordinates.
===Methods and Constructors===
====Private Methods====
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void capture();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
:if _covered pointer is not pointing to any allocated memory, it will call the bio_capture function to capture the area that is going to be covered by this frame and keeps its address in _covered.
====Public Methods====
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CFrame(int Row=-1, int Col=-1, int Width=-1,int Height=-1,
bool Visible = false,
const char* Border=C_BORDER_CHARS,
CFrame* Frame = (CFrame*)0);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
:Sets the corresponding attributes to the incoming values in the argument list and set _covered to null
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual void draw(int fn=C_FULL_FRAME);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
* First it will '''capture()''' the coordinates it is supposed to cover
* If frame is '''fullscreen()''' then it just clears the screen and exits. &amp;lt;br /&amp;gt;
Otherwise:&amp;lt;br /&amp;gt;
*If the _visible flag is true, it will draw a box at _row and _col, with size of _width and _height using the _border characters and fills it with spaces. Otherwise it will just draw a box using spaces at the same location and same size.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual void move(CDirection dir);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;First it will hide the Frame, then adjust the row and col to more to the &amp;quot;dir&amp;quot; direction and then draws the Frame back on screen.&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual void hide();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
using bio_restore()it restores the characters behind the Frame back on screen. It will also free the memory pointed by _covered;
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual ~CFrame();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
It will make sure allocated memories are freed.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool fullscreen()const;
void visible(bool val);
void width(int val);
int width()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
These functions set and get the attributes of the CFrame.
===CFrame.cpp &amp;amp; Test1Frame.cpp Bug Fix for R0.3.5===
Please visit my blog for the description and solution of the bug during the CFrame
* [http://www.ashkansotoudeh.com/blog/?p=159 CFrame.cpp &amp;amp; Test1Frame.cpp Bug Fix for R0.3.5] by [[User:asotoude|Ashkan]]
==CField==
CField is an abstract base class that encapsulates the commonalities of all Input Outputs Console Fields which are placeable on a CDialog. All Fields could be Framed, therefore a CField is int
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cframe.h&amp;quot;
class CDialog;
class CField : public CFrame{
CDialog* container();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void* _data;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Will hold the address of any type of data a CField can hold.
===Constructors and Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CField(int Row = 0, int Col = 0,
int Width = 0, int Height =0,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Passes the corresponding attributes to it's parents constructor and then sets the _data attribute to the incoming Data argument.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
~CField();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Empty Destructor
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual int edit() = 0;
virtual bool editable() const = 0;
virtual void set(const void* data) = 0;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Enforce the children to implement;
* an edit() method
* an editable() method that returns true if the class is to edit data and false if the class is to only display data.
* a set() method to set the _data attribute to the data the class is to work with.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual void* data();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Returns _data.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void container(CDialog* theContainer);
CDialog* container();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Sets and Gets the _frame attribute of CFrame by calling CFrame::frame() method. Make sure to cast The CDialog to CFrame when setting and cast CFrame to CDialog when getting
==CLabel==
A readonly Field that encapsulates bio_display() function. (i.e it is responsible to display a short character string on the display) CLable although, by inheritance is Frame, but it is never '''bordered'''.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;
class CLabel : public CField{
int _length;
int Len = 0);
CLabel(int Row, int Col, int Len);
CLabel(const CLabel&amp;amp; L);
~CLabel();
void draw(int fn=C_NO_FRAME) ;
void set(const void* str);
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int _length;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Holds the Length of the label, this will be stored to be passed to bio_display function.
===Constructors / Destructor ===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CLabel(const char *Str, int Row, int Col,
int Len = 0);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
passes the Row and Col to the CField constructor and then;
if len is zero, it will allocate enough memory to store the string pointed by Str and then copies the Str into it.
if len &amp;gt; 0, then it will allocate enough memory to store '''len''' chars in a string.
In any way, the allocated memory is pointed by '''_data'''
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CLabel(int Row, int Col, int Len);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Works exactly like the previous constructor, but len in this case can not be zero. (no validation required) and the string pointed by _data will be set to an empty string.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CLabel(const CLabel&amp;amp; L);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Copy Constructor
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
~CLabel();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
makes sure that memory pointed by _data is deallocated before the object is destroyed.
===Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int fn=C_NO_FRAME) ;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
makes a direct call to bio_display, passing '''_data''' for the string to be printed and absRow() and absCol() for row and col and _length for len.
this function ignores the argument fn.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
calls draw, returning 0.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
always return false.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void set(const void* str);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
if _length is greater than zero, it will copy the string pointed by str into the string pointed by _data upto _length characters.
if _length is zero, it will delete the memory pointed by _data and reallocates enough memory for str and copies the string pointed by str into the newly allocated memory pointed by _data.
Organizes CField objects on the screen, displays them and then lets the user edit them one by one.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cgh.h&amp;quot;#include &amp;quot;cframe.h&amp;quot;
class CField;
int add(CField* field, bool dynamic = true);
int add(CField&amp;amp; field, bool dynamic = false); CDialog&amp;amp; operator&amp;lt;&amp;lt;(CField* field); CDialog&amp;amp; operator&amp;lt;&amp;lt;(CField&amp;amp; field);
bool editable();
int curIndex()const;
CField&amp;amp; operator[](unsigned int index); CField&amp;amp; curField();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
====Mandatory====
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int _fnum;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Holds the number of Fields added to the Dialog
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool _editable;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
will be set to true if any of the Fields added are editable.
====Optional====
This is optional because it depends on how you are going to implement the collection of CFields:
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int _curidx;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Holds the index of the Field that is currently being edited.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CField* _fld[C_MAX_NO_FIELDS];
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Array of CField pointers to hold the address of the CField objects added to the screen.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool _dyn[C_MAX_NO_FIELDS];
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Holds series of boolean to the exact number of fields, and each boolean here will hold false if the corresponding field pointed by _fld is allocated dynamically or not.
This array will later on be used by destructor to decide which object is dynamic and to be deleted.
===Constructors/Destructors===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CDialog(CFrame *Container = (CFrame*)0,
int Row = -1, int Col = -1,
bool Borderd = false,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;The constructor, passes all the incoming arguments to the corresponding arguments of the apparent constructor '''CFrame'''.&amp;lt;br /&amp;gt;
Then it will set called a attributes to their default values and then sets all the field pointers (_fld) to NULL.
It also sets all the dynamic (_dyn) flags to false.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual ~CDialog();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
The destructor, will loop through all the field pointers and if the corresponding dynamic flag is true then it will delete the field pointed to by the field pointer.
===Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int fn = C_FULL_FRAME);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;If '''fn''' is '''C_FULL_FRAME''', it will call its parent draw. Then It will draw all the '''Fields''' in the '''Dialog'''. &amp;lt;br /&amp;gt;If '''fn''' is not '''C_FULL_FRAME''', then it will just draw all the '''Fields''' in the '''Dialog'''.&amp;lt;br /&amp;gt;
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.)
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit(int fn = C_FULL_FRAME);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;If '''CDialog''' 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.&amp;lt;br /&amp;gt;
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.
Start editing from field number '''fn''';
Call the edit of each field and depending on the value returned, do the following:&amp;lt;br /&amp;gt;
# 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.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int add(CField* field, bool dynamic = true);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;Adds the '''CField''' pointed by '''field''' to the Fields of the Dialog; by appending the value of the field pointer after the last added '''field'' in the _fld array , setting the corresponding _dyn element to the value of dynamic argument and then increasing _fnum by one and returning it.&amp;lt;br /&amp;gt;'''important note:&amp;lt;br /&amp;gt;
Make sure that add() sets the container of the added CField to this CDialog object, using the container() method of CField'''
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; int add(CField&amp;amp; field, bool dynamic = false);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Makes a direct call to the first add method.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CDialog&amp;amp; operator&amp;lt;&amp;lt;(CField* field);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Makes a direct call to the first add method, ignoring the second argument and then returns the owner (current CDialog).
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CDialog&amp;amp; operator&amp;lt;&amp;lt;(CField&amp;amp; field);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Makes a direct call to the second add method, ignoring the second argument and then returns the owner (current CDialog).
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Returns '''_editable''';
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int fieldNum()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
returns '''_fnum'''.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int curIndex()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
returns '''_curidx''';
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CField&amp;amp; operator[](unsigned int index);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Returns the reference of the Field with incoming index. (Note that here, the first field index is '''0''')
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CField&amp;amp; curField();&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Returns the reference of the Field that was just being edited.
==CLineEdit==
'''ClineEdit''' encapsulates the bio_edit function of bio library.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
#pragma once
#include &amp;quot;cfield.h&amp;quot;
class CLineEdit: public CField{
void set(const void* Str);
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CLineEdit(char* Str, int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
LineEdit, sets the Field's _data to the value of str. If LineEdit is instantiated with this constructor then it will edit an external string provided by the caller function of LineEdit. LineEdit in this case is not creating any dynamic memory, therefore _dyn is set to false (therefore the destructor will not attempt to deallocate the memory pointed by _data).&amp;lt;br /&amp;gt;The location (row and col) and Bordered are directly passed to the parent (FWField) and str is passed as data to the parent constructor. Unlike Label, LineEdit could have border or not so depending on this (Bordered being true or false) the Height is set to 3 or 1 respectfully. &amp;lt;br /&amp;gt;
(hint: use '''? :''' operator to pass the proper Height value to FWField's constructor)
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CLineEdit(int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Works exactly like the previous constructor with one difference; since no external data is passed to be edited here, this constructor must allocate enough dynamic memory to accommodate editing of '''Maxdatalen''' characters. Then make it an empty string and set Fields's _data to point to it. Make sure _dyn is set to true in this case, so the destructor knows that it has to deallocate the memory at the end.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
~CLineEdit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
If '''_dyn''' is true, it will deallocate the character array pointed by Fields's '''_data'''
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int Refresh = C_FULL_FRAME);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;It will first call Frame's draw passing '''Refresh'''as an argument to it.&amp;lt;br /&amp;gt;Then it will make a direct call to bio_display to show the data kept in Field's '''_data'''.&amp;lt;br /&amp;gt;
The values used for the arguments of bio_display are:
*str: address of string pointed by _data + the value of _offset
*col: absCol() (''add one if border is visible'')
*len: width() (''reduce by two is border is visible''')
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Makes a direct call to, and returns '''bio_edit()'''.
For the coordinates and width arguments follow the same rules as the draw function.
For the rest of the arguments of bio_edit, use the attributes of '''CLineEdit'''.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Always return true;
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void set(const void* Str);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Copies the characters pointed by '''Str''' into the memory pointed by Field's '''_data''' up to '''_maxdatalen''' characters.
It displays a small piece of text (usually one word or two) and accepts one key hit entry.
When in edit mode, to indicate the editing mode, it will surround the text with squared brackets.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
#pragma once
#include &amp;quot;cfield.h&amp;quot;
class CButton: public CField{
public:
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
This class does not have any attributes of its own!
===Constructor / Destructor===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CButton(const char *Str, int Row, int Col,
bool Bordered = true,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;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.&amp;lt;br /&amp;gt;Pass all the arguments directly to Field's constructor.&amp;lt;br /&amp;gt;For Field size (width and hight) do the following:&amp;lt;br /&amp;gt;
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).
For height: Set the height to 1 or if the Button is bordered, set the height to 3.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
virtual ~CButton();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Deallocates the allocated memory pointed by Field's '''_data'''.
===Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int fn=C_FULL_FRAME);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;Draws the Button with border around it if it is Bordered. Note that there should be a space before and after of the text that will be used to surround the text with &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot;&amp;lt;br /&amp;gt;hint:&amp;lt;br /&amp;gt;
:*First calls Frame's draw(fn) (passing the fn argument to the parents draw)
:*:display the text at absRow()+1 and absCol()+2
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;First draw() the Button, then surround it by squared brackets, place the cursor under the first character of Button's text and wait for user entry.&amp;lt;br /&amp;gt;When user hits a key, if the key is ENTER_KEY or SPACE, return C_BUTTON_HIT (defined in cgh.h) otherwise return the entered key.&amp;lt;br /&amp;gt;&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
Always returns true;
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void set(const void* str);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;Reallocate memory for new text and then set it to content of '''str'''&amp;lt;br /&amp;gt;hint:&amp;lt;br /&amp;gt;:''First deallocated what is pointed by Field's '''_data'''.''&amp;lt;br /&amp;gt;
:''Then allocate new memory to the size of content of '''str''' and copy the content into it and make Field's '''_data''' point to it.''
==CCheck==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;#include &amp;quot;clabel.h&amp;quot;
class CCheck : public CField{
int _flag;
public:
CCheck(bool Checked,const char* Format, const char* Text, int Row, int Col, int Width, bool IsRadio = false);
CCheck(const CCheck&amp;amp; C);
void draw(int fn = C_NO_FRAME) ;
int edit();
void checked(bool val);
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int _flag;
int _radio;
char _format[4];
CLabel _Label;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*'''_flag''' holds the status of the Checkbox (0: unchecked or 1: checked ) and is pointed by _data pointer .
*'''_radio''' dictates the behavior of the Checkbox as a radio-button, or a check-mark.
*'''_format''' holds the characters, the Checkbox is drawn with (i.e. &amp;quot;[X]&amp;quot;, &amp;quot;(O)&amp;quot;, &amp;quot;&amp;lt;*&amp;gt;&amp;quot;, etc...).
*'''_Label''' holds the Label attached to the this Checkbox
===Constructor / Destructor===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CCheck(bool Checked,const char* Format, const char* Text, int Row, int Col, int Width, bool IsRadio = false);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;*Passes the Row, Col, Width and &amp;quot;1&amp;quot; to row, col, width and height arguments of CField and directly initializes* _Label with Text, 0, 4, and (Width-4) for Str, Row, Col and Len, arguments of CLabel's Constructor.&amp;lt;br /&amp;gt;
*: *see page 64 of Practical Programming Techniques Using C++
*Sets the frame of _Label to itself
*Sets _data to the address of _flag
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CCheck(const CCheck&amp;amp; C);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;*Passes incoming CCheck reference (&amp;quot;C&amp;quot;) to CField's copy constructor, and directly initializes the _Label with the _Label of C*Sets all the attributes of this object to the attributes of incoming CCheck reference (&amp;quot;C&amp;quot;)
*Sets _data to the address of _flag
===Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int fn = C_NO_FRAME) ;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Uses bio_displayflag() to display _flag using _format at absRow() and absCol()
*Then draw()s the _Label
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*returns bio_flag()'s returned value.
*:bio_flag is to edit the value of _flag using the same arguments used in draw() as radiobutton or checkbox depending to the value of _radio
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Always return true;
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void set(const void* flag);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Casts the incoming flag pointer to an (int*) and sets the content of '''_flag''' to where '''flag''' is pointing to.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool checked()const;
void checked(bool val);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*These methods set and get _flag.
==CMenuItem==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;
class CMenuItem:public CField{
int _selected;
public:
CMenuItem(bool Selected,const char* Format, const char* Text, int Row, int Col, int Width);
CMenuItem(const CMenuItem &amp;amp;CM);
virtual ~CMenuItem(void);
void draw(int fn = C_NO_FRAME) ;
const char* Text();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int _selected;
char _format[3];
char* _text;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*_selected holds the status of the menuitem (0: not selected, 1: selected) and is pointed by _data.
*_format hods the surrounding &amp;quot;selection indicator&amp;quot; characters used by bio_displaymenuitem.
*_text points to the allocated memory holding the text of the menuitem
===Constructors / Destructor===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CMenuItem(bool Selected,const char* Format, const char* Text, int Row, int Col, int Width);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Sets _selected to Selected (0 for false and 1 for true)
*Copies Format into _format
*Sets _data to the address of _selected
*It passes the Row, the Col and the Width to the CField constructor
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; CMenuItem(const CMenuItem &amp;amp;CM);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;*Passes the incoming CMenuItem (&amp;quot;CM&amp;quot;) to CFiled's constructor
*Allocated enough memory to hold CM._text and sets _text to address of newly allocated memory
*Copies the string pointed by CM._text into _text
*Sets _selected to CM._selected
*Sets _data to the address of _selected
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
~CMenuItem(void);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Deallocated the memory pointed by _text
===Methods===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void draw(int fn = C_NO_FRAME) ;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Draws the object using bio_displayMenuItem function.
*:Make sure absRow() and absCol() are used for Row and Col args of bio_displayMenuItem
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Returns the returned value of bio_menuItem() using the same arguemtns used in draw()
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool editable()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Always returns true
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
void set(const void* Selected);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Sets _selected to content pointed by Selected
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
bool selected()const;
void selected(bool val);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*These methods set and get _selected.
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
const char* Text()const;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*Returns _text
=Complex Core User Interface classes=
==CValEdit==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;clineedit.h&amp;quot;
class CValEdit: public CLineEdit{
void (*_help)(MessageStatus, CDialog&amp;amp;); bool (*_validate)(const char*, CDialog&amp;amp;);
public:
CValEdit(char* Str, int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool (*Validate)(const char* , CDialog&amp;amp;) = NO_VALDFUNC, void (*Help)(MessageStatus, CDialog&amp;amp;) = NO_HELPFUNC,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
CValEdit(int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool (*Validate)(const char* , CDialog&amp;amp;) = NO_VALDFUNC, void (*Help)(MessageStatus, CDialog&amp;amp;) = NO_HELPFUNC,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
int edit();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
===Attributes===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; void (*_help)(MessageStatus, CDialog&amp;amp;); bool (*_validate)(const char*, CDialog&amp;amp;);&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
*_help, holds the address of the help logic (function) or NULL if there is no help function is assigned
*_validate, holds the address of the validation logic (function) or NULL if there is no validation function is assgned
===Constructors===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
CValEdit(char* Str, int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool (*Validate)(const char* , CDialog&amp;amp;) = NO_VALDFUNC, void (*Help)(MessageStatus, CDialog&amp;amp;) = NO_HELPFUNC,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
CValEdit(int Row, int Col, int Width,
int Maxdatalen, int* Insertmode,
bool (*Validate)(const char* , CDialog&amp;amp;) = NO_VALDFUNC, void (*Help)(MessageStatus, CDialog&amp;amp;) = NO_HELPFUNC,
bool Bordered = false,
const char* Border=C_BORDER_CHARS);
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
These constructors pass all their arguments to corresponding arguments of CLineEdit constructor and then set '''_help''' and '''_validate''' attributes to the corresponding incoming arguments
===Method===
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;
int edit();
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;If the container() is NULL then this function works exactly like LineEdit::edit().&amp;lt;br /&amp;gt;
If the container() is not NULL:
#If _help function exist it calls the function passing MessageStatus::SetMessage and container()'s reference as arguments.
#It will return the terminating key
''Navigation keys are Up key, Down key, Tab key or Enter key.''&amp;lt;br /&amp;gt;
''MessageStatus is enumerated in '''cgh.h'''''
==CText==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;
~CText();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
==CCheckList==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;#include &amp;quot;ccheck.h&amp;quot;
class CCheckList;
public:
CCheckList(const char* Format, int Row, int Col, int Width,bool radio, bool Bordered = true,const char* Border=C_BORDER_CHARS);
CCheckList&amp;amp; add(const char* Text, bool selected = false);
void draw(int fn = C_FULL_FRAME);
int edit();
void* data();
void set(const void* data);
bool&amp;amp; operator[](unsigned int index);
bool editable()const;
bool radio();
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
==CMenu==
&amp;lt;big&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;quot;cfield.h&amp;quot;#include &amp;quot;cmenuitem.h&amp;quot;
class Cmenu;
public:
CMenu(const char* Format, int Row, int Col, int Width, bool Bordered = true,const char* Border=C_BORDER_CHARS);
CMenu&amp;amp; add(const char* Text, bool selected = false);
void draw(int fn = C_FULL_FRAME);
int edit();
~CMenu(void);
};
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/big&amp;gt;
=Make Files and Testers=
Copy these makefiles under &amp;quot;makefile&amp;quot; name in root of your project in Linux or Mac.&amp;lt;br /&amp;gt;Replace the &amp;quot;&amp;lt;tab&amp;gt;&amp;quot; with tab character&amp;lt;br /&amp;gt;then issue the make command: &amp;lt;br /&amp;gt;$make &amp;lt;enter&amp;gt;&amp;lt;br /&amp;gt;this will compile your code and create an executable called prjexe, if there is no error&amp;lt;br /&amp;gt;Also, copies of all these make files and tester programs are commited to: '''svn://zenit.senecac.on.ca/oop344/trunk/Testers&amp;lt;br /&amp;gt;The executable of testers are compiled and copied in my account on matrix:&amp;lt;br /&amp;gt;login to matix and run:&amp;lt;br /&amp;gt;$~fardad.soleimanloo/t[X]&amp;lt;br /&amp;gt;
where [X] is number of the test. (i.e. run $fardad.soleimanloo/t3 for test3
== Test2 Make file ==
&amp;lt;big&amp;gt;&amp;lt;pre&amp;gt;
t2: bio.o cframe.o cfield.o cdialog.o clabel.o Test2DialogAndLabel.o
&amp;lt;tab&amp;gt;c++ bio.o cframe.o cfield.o cdialog.o clabel.o \
Test2DialogAndLabel.o -lncurses -oprjexe
bio.o: bio.c bio.h
&amp;lt;tab&amp;gt;cc -c bio.c
cframe.o: cframe.cpp cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c cframe.cpp
cfield.o: cfield.cpp cfield.h cgh.h cframe.h
&amp;lt;tab&amp;gt;c++ -c cfield.cpp
cdialog.o: cdialog.cpp cdialog.h cfield.h cgh.h cframe.h
&amp;lt;tab&amp;gt;c++ -c cdialog.cpp
clabel.o: clabel.cpp clabel.h cfield.h cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c clabel.cpp
Test2DialogAndLabel.o: Test2DialogAndLabel.cpp clabel.h cdialog.h cframe.h cgh.h cfield.h
&amp;lt;tab&amp;gt;c++ -c Test2DialogAndLabel.cpp
&amp;lt;/pre&amp;gt;&amp;lt;/big&amp;gt;
==Test 3 make file==
&amp;lt;big&amp;gt;&amp;lt;pre&amp;gt;
prj: bio.o cframe.o cfield.o cdialog.o clabel.o clineedit.o Test3DialogAndLineEdit.o
&amp;lt;tab&amp;gt;c++ bio.o cframe.o cfield.o cdialog.o clabel.o clineedit.o Test3DialogAndLineEdit.o \
-lncurses -oprjexe
bio.o: bio.c bio.h
&amp;lt;tab&amp;gt;cc -c bio.c
cframe.o: cframe.cpp cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c cframe.cpp
cfield.o: cfield.cpp cfield.h cgh.h cframe.h
&amp;lt;tab&amp;gt;c++ -c cfield.cpp
cdialog.o: cdialog.cpp cdialog.h cfield.h cgh.h cframe.h
&amp;lt;tab&amp;gt;c++ -c cdialog.cpp
clabel.o: clabel.cpp clabel.h cfield.h cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c clabel.cpp
clineedit.o: clineedit.cpp clineedit.h cfield.h cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c clineedit.cpp
Test3DialogAndLineEdit.o: Test3DialogAndLineEdit.cpp clineedit.h clabel.h cdialog.h cfield.h cframe.h cgh.h
&amp;lt;tab&amp;gt;c++ -c Test3DialogAndLineEdit.cpp&amp;lt;/pre&amp;gt;&amp;lt;/big&amp;gt;
==Full Project Makefile==
Not Tested!
&amp;lt;big&amp;gt;&amp;lt;pre&amp;gt;
prj: bio.o cframe.o cfield.o cdialog.o clabel.o clineedit.o cmenuitem.o cbutton.o ccheck.o cchecklist.o cmenu.o cveditline.o ctext.o strarr.o prj.o
c++ bio.o cframe.o cfield.o cdialog.o clabel.o clineedit.o cmenuitem.o cbutton.o ccheck.o cchecklist.o cmenu.o cveditline.o ctext.o strarr.o prj.o \
c++ -c prj.cpp
&amp;lt;/pre&amp;gt;&amp;lt;/big&amp;gt;
1
edit

Navigation menu