这是VCF框架的代码

源代码在线查看: border.h

软件大小: 6365 K
上传用户: simoncxl
关键词: VCF 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#ifndef _VCF_BORDER_H__				#define _VCF_BORDER_H__				//Border.h								/*				Copyright 2000-2004 The VCF Project.				Please see License.txt in the top level directory				where you installed the VCF.				*/												#if _MSC_VER > 1000				#   pragma once				#endif												namespace VCF				{																#define BORDER_CLASSID		"3126B221-2819-11d4-B53A-00C04F0196DA"								/**				\class Border Border.h "vcf/ApplicationKit/Border.h"				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. 				\p				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.				\p				Since a Border is derived from a Component, the owning component				will clean up any memory for the component.				*/				class APPLICATIONKIT_API Border : public Component {				public:													Border() {}					Border( Component* owner ) : Component(owner) {}									virtual ~Border(){};									/**					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.					*/					virtual void paint( Control* control, GraphicsContext* context ) = 0;									/**					paints a border in the given bounds on the context					@param Rect the rectangle that makes up the outer most region					of the border					@param GraphicsContext the context on which to paint the border					*/					virtual void paint( Rect* bounds, GraphicsContext* context ) = 0;									/**					\p					Returns a client rect in which contained components may live.					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										@param Rect* - the initial bounds to calculate a new client rectangle					from.					@param Control* - a control that may provide additional information										@return Rect the new (possibly adjusted) client rectangle					*/					virtual Rect getClientRect( Rect* initialBounds, Control* control ) = 0;								};								};												/**				*CVS Log info				*$Log$				*Revision 1.4  2006/04/07 02:35:21  ddiego				*initial checkin of merge from 0.6.9 dev branch.				*				*Revision 1.3.2.1  2006/03/14 02:25:46  ddiego				*large amounts of source docs updated.				*				*Revision 1.3  2005/07/09 23:14:51  ddiego				*merging in changes from devmain-0-6-7 branch.				*				*Revision 1.2.4.1  2005/03/06 22:50:58  ddiego				*overhaul of RTTI macros. this includes changes to various examples to accommadate the new changes.				*				*Revision 1.2  2004/08/07 02:49:05  ddiego				*merged in the devmain-0-6-5 branch to stable				*				*Revision 1.1.2.4  2004/07/14 21:54:41  ddiego				*attempts to fix problem with borders and drawing on common controls.				*Sort of works on editor control. There is a subtle repaint problem in painting				*damaged portions of the control.				*				*Revision 1.1.2.3  2004/06/06 07:05:29  marcelloptr				*changed macros, text reformatting, copyright sections				*				*Revision 1.1.2.2  2004/04/29 03:43:12  marcelloptr				*reformatting of source files: macros and csvlog and copyright sections				*				*Revision 1.1.2.1  2004/04/28 00:28:14  ddiego				*migration towards new directory structure				*				*Revision 1.10.4.1  2004/04/26 21:58:38  marcelloptr				*changes for dir reorganization: _VCF_MACRO_H__				*				*Revision 1.10  2003/12/18 05:15:58  ddiego				*merge from devmain-0-6-2 branch into the stable branch				*				*Revision 1.9.4.2  2003/10/28 04:06:11  ddiego				*updated the GraphicsContext and ContextPeer classes to support				*slider control drawing. adjusted the Slider control accordingly.				*Also changed some of the GraphicsKit headers to conform to the				*current header style.				*				*Revision 1.9.4.1  2003/09/12 00:09:33  ddiego				*added better tabbing behaviour - fixed an earlier bug.				*Code is easier to understand and it simplified the implementation				*a bit as well				*Moved around the RTTI definitions for various Appkit classes to a				*single inline and stripped them from the various class headers				*				*Revision 1.9  2003/05/17 20:37:09  ddiego				*this is the checkin for the 0.6.1 release - represents the merge over from				*the devmain-0-6-0 branch plus a few minor bug fixes				*				*Revision 1.8.2.1  2003/03/23 03:23:48  marcelloptr				*3 empty lines at the end of the files				*				*Revision 1.8  2003/02/26 04:30:39  ddiego				*merge of code in the devmain-0-5-9 branch into the current tree.				*most additions are in the area of the current linux port, but the major				*addition to this release is the addition of a Condition class (currently				*still under development) and the change over to using the Delegate class				*exclusively from the older event handler macros.				*				*Revision 1.7.2.1  2002/12/27 23:04:35  marcelloptr				*Improved macros for automatic import/export of libraries. - Warning fixes. - Other Minor Changes.				*				*Revision 1.7  2002/11/18 00:46:08  ddiego				*this is the merge over of all the bug fixes and features (mostly				*VCF Builder stuff) from the devmain-0-5-8 branch				*				*Revision 1.6.4.1  2002/10/01 20:34:58  ddiego				*borders				*				*Revision 1.6  2002/09/12 03:26:03  ddiego				*merged over the changes from the devmain-0-5-5b branch				*				*Revision 1.5.12.1  2002/08/06 02:57:35  ddiego				*added base X11 files for GraphicsKit and made sure that the GraphicsKit compiles				*under linux (GCC). There is now a new dir under build/xmake called GraphicsKit				*where the xmake build script lives. This checkin also includes the base X11				*include (as part of GraphicsKitPrivate.h), as well as linking to the X11 libs				*				*Revision 1.5  2002/01/24 01:46:48  ddiego				*added a cvs "log" comment to the top of all files in vcf/src and vcf/include				*to facilitate change tracking				*				*/												#endif // _VCF_BORDER_H__															

相关资源