Snippet - A simplified display class for Character displays

A simplified display class for Character displays

I recently was playing with my LCD displays on Cerberus and found that the main code was filled with details on how things were getting displayed and not with what I wanted to display.
To attempt to clean up the code I wanted something that would allow me to ignore the details of how stuff got displayed. I want to place text on a line, I don’t want to be concerned with how it gets on the line, making sure the line only contains the stuff I wanted to display and not remands of what was there before.
For some displays you have the ability to send a command to clear the rest of the line on others you have to clear it your self. Of course you could bury this stuff in the bowels of the driver, but what if you don’t want to or can’t change the driver.
Finally, I wanted a solution that I would only have to write once and it would be there for me no matter which display I chose to use. This is why I wrote this simple little class to handle all of that stuff.
CharacterDisplay class only needs to be told at construction time the parameters of the display, number of lines, length of each line. The end user has to have instantiated the appopriate driver class for the display and then create two delegate references, one to write bytes to the display and one to set the display to the start of the designated line. After that, it is just a matter of assigning a string containing what you want displayed to the object.
For instance, if you have created a CharacterDisplay name page, then to set the contents of line 1 on the page you would write page[1] = “Hello World”;

Which modules/references do you use? Because i dont find the methode SetBrightness().
Because i have posted a problem in an other thread (HD44780).

I was building on my current study of Gadgeteer, , where I was using a Newhaven Display 4x20 connected with an extension module. I then prototyped a module driver for it . The LCD is not based on the HD44780, the NHD display has commands for setting brightness and contrast.