Difference between revisions of "Lazarus Custom Drawn Controls"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
The '''Lazarus Custom Drawn Controls''' are a set of controls equivalent to the standard Lazarus controls, but which draw themselves. They can have many uses, including the hability to fully customize the drawing, the hability to have exactly the same look in different platforms and also a higher consistency of behavior.
 
The '''Lazarus Custom Drawn Controls''' are a set of controls equivalent to the standard Lazarus controls, but which draw themselves. They can have many uses, including the hability to fully customize the drawing, the hability to have exactly the same look in different platforms and also a higher consistency of behavior.
  
This set of controls is divided into two parts: The custom drawn controls which are useful for implementing Lazarus widgetsets and are located in the unit lazarus/lcl/customdrawncontrols.pas, and all other custom drawn controls, which are used often, but aren't indispensable to implement a LCL custom drawn widgetset. Those are located in the package lazarus/components/customdrawn.
+
This set of controls is divided into two parts: The custom drawn controls which are necessary for implementing Lazarus widgetsets and will futurelly be located in the unit lazarus/lcl/customdrawncontrols.pas, and all other custom drawn controls, which are used often, but aren't indispensable to implement a LCL custom drawn widgetset. Those are located in the package lazarus/components/customdrawn. At the moment all custom drawn controls are in the customdrawn package.
  
 
__TOC__
 
__TOC__
Line 9: Line 9:
 
The basic programming technique utilized by this set of controls is explained in the page [[Developing with Graphics#Create a custom control which draws itself]]. Besides using a TCustomControl descendent, these components also use a TLazIntfImage and TFPImageCanvas instead of the usual TCanvas, in order to have a drawing precisely equal among platforms, as well as the possibility of fast pixel access. This programming technique is described in [[Developing with Graphics#Working with TLazIntfImage]].
 
The basic programming technique utilized by this set of controls is explained in the page [[Developing with Graphics#Create a custom control which draws itself]]. Besides using a TCustomControl descendent, these components also use a TLazIntfImage and TFPImageCanvas instead of the usual TCanvas, in order to have a drawing precisely equal among platforms, as well as the possibility of fast pixel access. This programming technique is described in [[Developing with Graphics#Working with TLazIntfImage]].
  
==Custom Drawn Controls in the LCL==
+
==Custom Drawn Controls which might be moved to the LCL==
  
 
===TCDButton===
 
===TCDButton===
Line 26: Line 26:
  
 
Moved here: [[Lazarus_Custom_Drawn_Package]]
 
Moved here: [[Lazarus_Custom_Drawn_Package]]
 +
 +
==Maintainers==
 +
 +
* [[User:Sekelsenmat|Felipe Monteiro de Carvalho]]
 +
* JiXian Yang
 +
 +
== See Also ==
 +
 +
*[[Lazarus Components Directory]]
 +
*[[Lazarus Custom Drawn Package]]

Revision as of 10:31, 17 November 2010

The Lazarus Custom Drawn Controls are a set of controls equivalent to the standard Lazarus controls, but which draw themselves. They can have many uses, including the hability to fully customize the drawing, the hability to have exactly the same look in different platforms and also a higher consistency of behavior.

This set of controls is divided into two parts: The custom drawn controls which are necessary for implementing Lazarus widgetsets and will futurelly be located in the unit lazarus/lcl/customdrawncontrols.pas, and all other custom drawn controls, which are used often, but aren't indispensable to implement a LCL custom drawn widgetset. Those are located in the package lazarus/components/customdrawn. At the moment all custom drawn controls are in the customdrawn package.

How do these components work?

The basic programming technique utilized by this set of controls is explained in the page Developing with Graphics#Create a custom control which draws itself. Besides using a TCustomControl descendent, these components also use a TLazIntfImage and TFPImageCanvas instead of the usual TCanvas, in order to have a drawing precisely equal among platforms, as well as the possibility of fast pixel access. This programming technique is described in Developing with Graphics#Working with TLazIntfImage.

Custom Drawn Controls which might be moved to the LCL

TCDButton

This is a fully custom drawn button.

Current location in the code: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/customdrawn/customdrawnextras.pas?view=markup&root=lazarus

TCDGroupBox

This is a fully custom drawn group box.

Current location in the code: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/customdrawn/customdrawnextras.pas?view=markup&root=lazarus

Custom Drawn Packages

Moved here: Lazarus_Custom_Drawn_Package

Maintainers

See Also