Library release of Simon Ford's GraphicsDisplay Display Library Base Class.

Dependents:   ese_project_copy ese_project_share Test_ColorMemLCD rIoTwear_LCD ... more

Revision:
1:1cb0fcbce1bf
Parent:
0:282710e02ef4
diff -r 282710e02ef4 -r 1cb0fcbce1bf TextDisplay.h
--- a/TextDisplay.h	Wed Jan 21 19:40:58 2015 +0000
+++ b/TextDisplay.h	Fri Jan 23 20:21:32 2015 +0000
@@ -18,47 +18,73 @@
 
 #include "mbed.h"
 
+/** A common base class for Text displays
+*/
 class TextDisplay : public Stream {
 public:
 
-  // functions needing implementation in derived implementation class
-  /** Create a TextDisplay interface
-     *
-     * @param name The name used in the path to access the strean through the filesystem
-     */
+    // functions needing implementation in derived implementation class
+    // ----------------------------------------------------------------
+    /** Create a TextDisplay interface
+    * @param name The name used in the path to access the strean through the filesystem
+    */
     TextDisplay(const char *name = NULL);
 
     /** output a character at the given position
-     *
-     * @param column column where charater must be written
-     * @param  row where character must be written
-     * @param c the character to be written to the TextDisplay
-     */
+    *
+    * @param column column where charater must be written
+    * @param  row where character must be written
+    * @param c the character to be written to the TextDisplay
+    * @note this method may be overridden in a derived class.
+    */
     virtual void character(int column, int row, int c) = 0;
 
-    /** return number if rows on TextDisplay
-     * @result number of rows
-     */
+    /** return number of rows on TextDisplay
+    * @result number of rows
+    * @note this method must be supported in the derived class.
+    */
     virtual int rows() = 0;
 
-    /** return number if columns on TextDisplay
-    * @result number of rows
+    /** return number of columns on TextDisplay
+    * @result number of columns
+    * @note this method must be supported in the derived class.
     */
     virtual int columns() = 0;
     
     // functions that come for free, but can be overwritten
-
+    // ----------------------------------------------------
     /** redirect output from a stream (stoud, sterr) to  display
     * @param stream stream that shall be redirected to the TextDisplay
+    * @note this method may be overridden in a derived class.
+    * @returns true if the claim succeeded.
     */
     virtual bool claim (FILE *stream);
 
-    /** clear screen
+    /** clear the entire screen
+    * @note this method may be overridden in a derived class.
     */
     virtual void cls();
+
+    /** locate the cursor at a character position.
+    * Based on the currently active font, locate the cursor on screen.
+    * @note this method may be overridden in a derived class.
+    * @param column is the horizontal offset from the left side.
+    * @param row is the vertical offset from the top.
+    */
     virtual void locate(int column, int row);
+
+    /** set the foreground color
+    * @note this method may be overridden in a derived class.
+    * @param color is color to use for foreground drawing.
+    */
     virtual void foreground(uint16_t colour);
+
+    /** set the background color
+    * @note this method may be overridden in a derived class.
+    * @param color is color to use for background drawing.
+    */
     virtual void background(uint16_t colour);
+
     // putc (from Stream)
     // printf (from Stream)