Difference between revisions of "Console Framework Classes 20103 - OOP344"

From CDOT Wiki
Jump to: navigation, search
(Created page with '=The Frame work= == General Internal Header file == <big><syntaxhighlight lang="cpp"> #ifndef ___CONFW_H__ #define ___CONFW_H__ #ifndef _CRT_SECURE_NO_DEPRECATE #define _CRT_S…')
 
Line 17: Line 17:
 
  };
 
  };
 
#endif
 
#endif
 +
</syntaxhighlight></big>
 +
==Classes==
 +
 +
===FWBorder===
 +
====Attributes====
 +
<pre>
 +
  int _row;
 +
  int _col;
 +
  int _height;
 +
  int _width;
 +
  FWBorder* _container;
 +
  bool _visible;
 +
  char _border[9];
 +
</pre>
 +
====Methods====
 +
<big><syntaxhighlight lang="cpp">
 +
  FWBorder(int Row=-1, int Col=-1,int Height=-1, int Width=-1,
 +
          bool Visible = false, FWBorder* Container = (FWBorder*)0,
 +
          const char* Border=FW_BORDER_CHARS);
 +
  virtual void draw()const; //if _container is null, then it is maximized into the size of screen
 +
                            // with no borders
 +
  virtual ~FWBorder();
 +
 
 +
  void visible(bool val);
 +
  bool visible()const;
 +
 +
  void container(FWBorder* theContainer);
 +
  FWBorder* container();
 +
 +
  void row(int val);
 +
  void col(int val);
 +
  void size(int height, int width);
 +
 +
  virtual int row()const;
 +
  virtual int col()const;
 +
  virtual int height()const;
 +
  virtual int width()const;
 
</syntaxhighlight></big>
 
</syntaxhighlight></big>

Revision as of 10:19, 22 October 2010

The Frame work

General Internal Header file

#ifndef ___CONFW_H__
#define ___CONFW_H__

 #ifndef _CRT_SECURE_NO_DEPRECATE
 #define _CRT_SECURE_NO_DEPRECATE
 #endif
 #ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
 #endif


extern "C"{
 #include "iol.h"
 };
#endif

Classes

FWBorder

Attributes

  int _row;
  int _col;
  int _height;
  int _width;
  FWBorder* _container;
  bool _visible;
  char _border[9];

Methods

  FWBorder(int Row=-1, int Col=-1,int Height=-1, int Width=-1,
           bool Visible = false, FWBorder* Container = (FWBorder*)0,
           const char* Border=FW_BORDER_CHARS);
  virtual void draw()const; //if _container is null, then it is maximized into the size of screen 
                            // with no borders
  virtual ~FWBorder();
  
  void visible(bool val);
  bool visible()const;

  void container(FWBorder* theContainer);
  FWBorder* container();

  void row(int val);
  void col(int val);
  void size(int height, int width);

  virtual int row()const;
  virtual int col()const;
  virtual int height()const;
  virtual int width()const;