VCF::Border Class Reference
A Border component is responsible for drawing the border of a control. More...
#include <vcf/ApplicationKit/Border.h>
Inheritance diagram for VCF::Border:

Public Member Functions | |
| Border () | |
| Border (Component *owner) | |
| virtual | ~Border () |
| virtual void | paint (Control *control, GraphicsContext *context)=0 |
| Draw the border, using the passed in context to draw on. | |
| virtual void | paint (Rect *bounds, GraphicsContext *context)=0 |
| paints a border in the given bounds on the context | |
| virtual Rect | getClientRect (Rect *initialBounds, Control *control)=0 |
Returns a client rect in which contained components may live. | |
Detailed Description
A Border component is responsible for drawing the border of a control.
The border is used to produce effects like a 3D border or bevel, or a border with a text/caption area. How this is made to look is entirely up to the implementer of the component. In addition to painting the control's border, the Border instance is also responsible for correctly calculating the effect the border would have on a rectangle bounds. The getClientRect() method is used to determine, given an initial set of rectangular bounds, what effect (if any) the presence of the border would have on the initial bounds, and adjusting it if neccessary. For example, a border that paints an edge 2 pixels thick, would adjust the initial bounds by reducing it's width and height by 2 pixels on either side by calling the rect's inflate( -2, -2 ) method. Since a Border is derived from a Component, the owning component will clean up any memory for the component.
Constructor & Destructor Documentation
|
|
|
|
|
|
|
|
|
Member Function Documentation
|
||||||||||||
|
Thus if a particular implementation required a 3 pixel border at the edges to draw itself, then it would retrieve the component's border and then reduce it by 3 pixels. This new value is the available area that the component could use to place child components
Implemented in VCF::Basic3DBorder, VCF::ColorEtchedBorder, VCF::EtchedBorder, VCF::Light3DBorder, and VCF::TitledBorder. |
|
||||||||||||
|
paints a border in the given bounds on the context
Implemented in VCF::Basic3DBorder, VCF::ColorEtchedBorder, VCF::EtchedBorder, VCF::Light3DBorder, and VCF::TitledBorder. |
|
||||||||||||
|
Draw the border, using the passed in context to draw on. The control argument may be used for specific purposes, but typically it's just used to get the initial bounds for the border to draw within. Implemented in VCF::Basic3DBorder, VCF::ColorEtchedBorder, VCF::EtchedBorder, VCF::Light3DBorder, and VCF::TitledBorder. |
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Border.h
