diff options
author | Ravindra <ravindra@mono-cvs.ximian.com> | 2004-09-01 06:52:03 +0400 |
---|---|---|
committer | Ravindra <ravindra@mono-cvs.ximian.com> | 2004-09-01 06:52:03 +0400 |
commit | f983cf17f65d5d720a64d7b546370b6809becbc4 (patch) | |
tree | b0994bb5be5df546633f19793cb630266ffc8a12 /mcs/class | |
parent | a6abcb04881e84f72ca4f454ad32721ae2f18abd (diff) |
Minor formatting changes and added location for the coding style guideline for Mono.
svn path=/trunk/mcs/; revision=33136
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/Design | 22 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/Guidelines | 26 |
2 files changed, 24 insertions, 24 deletions
diff --git a/mcs/class/Managed.Windows.Forms/Design b/mcs/class/Managed.Windows.Forms/Design index 5a1b373ae2c..ca17942cdad 100644 --- a/mcs/class/Managed.Windows.Forms/Design +++ b/mcs/class/Managed.Windows.Forms/Design @@ -15,12 +15,12 @@ The new implementation of SWF is based on drivers providing access to the native windowing system of the host OS. The old implementation was based on Wine library. The motivation for new implementation comes from the problems faced with the Wine approach: -- Wine was missing features that .Net provided over Win32; to add those +- Wine was missing features that .NET provided over Win32; to add those features we would have had to write the controls managed anyway - Installation became much more difficult due to the Wine dependencies and the relatively akward way we had to initialize Wine. -The new implementation takes advantage of WIN32 APIs on Windows and +The new implementation takes advantage of Win32 APIs on Windows and emulates the same on Linux using X11 for window management and events. Following gives a high level idea of the new implementation of SWF. @@ -43,14 +43,14 @@ implementation. For drawing the controls System.Drawing library is used. ========== The new design of SWF makes porting of the library to Linux/Windows/Mac -very easy. All the controls in SWF inherit from Control class and most -of the painting operations are done using ControlPaint class. -At the low, XplatUI class provides the abstraction over the underlying -window management library. It contains a XplatUIDriver for providing the -window management. XplatUIDriver is an abstract class which is implemented -by XplatX11 and XplatWin32 classes respectively for Linux/Mac and Windows -platforms. Support for any new platform can be added simply by implementing -XplatUIDriver for the new platform. +very easy. +All the controls in SWF inherit from Control class and most of the painting +operations are done using ControlPaint class. At the low level, XplatUI class +provides the abstraction over the underlying window management system. It +contains a XplatUIDriver for providing the window management. XplatUIDriver +is an abstract class which is implemented by XplatX11 and XplatWin32 classes +respectively for Linux/Mac and Windows platforms. Support for any new platform +can be added simply by implementing XplatUIDriver for the new platform. 2a. Double Buffering: @@ -60,7 +60,7 @@ For drawing controls double buffering used, so that a better performance can be achieved. Every controls maintains a bitmap image of itself. This image is used for painting the screen when a paint event is raised. When a control property changes the look of the control, it redraws the bitmap -image. [See the guidelines document] +image. [Please see the guidelines document] 2b. Themes: diff --git a/mcs/class/Managed.Windows.Forms/Guidelines b/mcs/class/Managed.Windows.Forms/Guidelines index 505c432717e..0b3ac380127 100644 --- a/mcs/class/Managed.Windows.Forms/Guidelines +++ b/mcs/class/Managed.Windows.Forms/Guidelines @@ -1,5 +1,5 @@ - Guidelines for hacking SWF - ========================== + Guidelines for hacking SWF + ========================== This document describes some of the minimal coding guidelines to be followed while hacking the new SWF implementation. These @@ -8,12 +8,12 @@ guidelines are for the sake of consistency. 1. Please refer to the design document of SWF to understand the implementation. -2. Please follow the general coding style described for Mono project. - /cvs/mono/docs/README (location ??) +2. Please follow the general coding style described for the Mono + project (/cvs/mcs/class/README). 3. Method stubbing is highly discouraged. It's recommended to submit an implemented method instead of just the signature. If you have - to stub a property or method, please use the [MonoTODO("what")] + to stub a property or method, please use the [MonoTODO ("what")] attribute to document what still needs to be done. 4. When you implement the drawing method for a control in a theme, it @@ -33,11 +33,11 @@ guidelines are for the sake of consistency. A typical OnPaint will look like this: - protected override void OnPaint(PaintEventArgs pevent) { - pevent.Graphics.DrawImage(this.ImageBuffer, - pevent.ClipRectangle, - pevent.ClipRectangle, - GraphicsUnit.Pixel); + protected override void OnPaint (PaintEventArgs pevent) { + pevent.Graphics.DrawImage (this.ImageBuffer, + pevent.ClipRectangle, + pevent.ClipRectangle, + GraphicsUnit.Pixel); } The ImageBuffer bitmap is supposed to contain the representation @@ -46,12 +46,12 @@ guidelines are for the sake of consistency. public Color RectColor { set { sb.Color = value; - Redraw(); + Redraw (); } } - internal void Redraw() { - this.DeviceContext.FillRectangle(sb, this.ClientRectangle); + internal void Redraw () { + this.DeviceContext.FillRectangle (sb, this.ClientRectangle); } |