⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 co1_tlin.hpp

📁 windRiver提供的的Zinc5.3完整源码,文档非常齐全
💻 HPP
字号:
////////////////////////////////////////
// Start of File: CO1_TLIN.HPP
////////////////////////////////////////

#ifndef CO1_TLIN_HPP			// Avoid multiple includes...
#define CO1_TLIN_HPP	TRUE	// ...holds to a terminal #endif below...

//===================================================================
//
// COPYRIGHT NOTICE:  This code is protected by Copyright!
//
// Copyright (c) 1994, 1995, 1996, 1997 by DPC Technology.
// All rights reserved. 
//
// See files "cf_copyr.txt" and "cf_licen.txt" for details of 
// copyright and license specifications, and contact information.
//
//===================================================================

//
// Master Header File Listing:
//
// #include    <cf_api/co1_tlin.hpp>
// Chart Framework "2D/3D Text Line (w/ Rotated Font)" object.
//

//--------------------------------------------------------------------
// Include Chart Framework class or ID defs/headers this file needs.
// Paths are relative to the IDE's (global) include path: ~/cfrz
//--------------------------------------------------------------------
class		cf_String;
#include    <cf_api/c0_dystr.hpp>

class		bf_Display;
class		cf_AutoScaleFontSpec;
#include    <cf_api/c0_tatb.hpp>

class		cf_3DPoint;
class		cf_3DPolyLine;
#include    <cf_api/co1_plin.hpp>

//
// Declare a ChartFolio "Text Line" zApp class.
//
// Class cf_3DTextLine is derived from class cf_3DPolyLine --
// it abstracts a set of graphable ZPIC points, marking the endpoints
// of a "marker line", and associated text that will be displayed
// along the marker line, in the direction from the first point 
// to the last point.
//
class CF_EXPORT	cf_3DTextLine : 
		public 
		cf_3DPolyLine

{

public:

	cf_3DTextLine(	const char *a_cUserLabel = "Axis Label" );
	// Default ctor to generates a "default" cf_3DTextLine with
	// end-point (1) == 0,0,0, and end-point (2) = 100, 0, 0:

	virtual	~cf_3DTextLine();
	        

	cf_AutoScaleFontSpec*	autoScaleFontSpec();
	
	void	autoScaleFontSpec( cf_AutoScaleFontSpec 
								*p_cf_asfsUseThisSpec );


	int		calcFontOrientation();	


	BOOL	colorUsingDispBack();
	void	colorUsingDispBack( BOOL bNewState );


	BOOL	dispLabel();
	void	dispLabel( BOOL bNewState );

	BOOL	dispLine();
	void	dispLine( BOOL bNewState );


	void	draw2D( bf_Display *p_bf_dspOutputDisplay );
	void	draw3D( bf_Display *p_bf_dspOutputDisplay );

	//
	// Reset this Line's endpoints:
	//
	void	endPoints(	cf_3DPoint	cf_3dpPoint1, 
						cf_3DPoint	cf_3dpPoint2 );
	
	void	endPoints(	double 	dPoint1X,
		 				double	dPoint1Y,
		 				double	dPoint1Z,

		 				double	dPoint2X,
		 				double	dPoint2Y,
		 				double	dPoint2Z  );


	BOOL		isActive();
	BOOL		isActive( BOOL bNewState );


	cf_String*	labelIs();
	void		labelIs( cf_String *p_cf_strUseThisString );
	void		labelIs( const char *a_cStringConst ); 
	BOOL		labelSet();


	void		labelPlacedVertAboveLine( BOOL bNewState );
	BOOL		labelPlacedVertAboveLine();
	
	void		labelPlacedVertBelowLine( BOOL bNewState );
	BOOL		labelPlacedVertBelowLine();

	void		labelPlacedVertCentOnLine( BOOL bNewState );
	BOOL		labelPlacedVertCentOnLine();

	void		labelPlacedHorizLeftOnLine( BOOL bNewState );
	BOOL		labelPlacedHorizLeftOnLine();

	void		labelPlacedHorizRightOnLine( BOOL bNewState );
	BOOL		labelPlacedHorizRightOnLine();

	void		labelPlacedHorizCentOnLine( BOOL bNewState );
	BOOL		labelPlacedHorizCentOnLine();


	void		on();
	void		off();	


private:

	BOOL			bIsActive;
					// we may be "on", we may be "off"...

	BOOL			bDoWeDrawLabel;	
	BOOL			bDoWeDrawLine;	
	BOOL			bUseDispBackColor;
					// Because sometimes we DON'T wanna!...

	cf_String		cf_strLineLabel;
					// Gets printed from the head of the Marker Line.

	cf_AutoScaleFontSpec	*p_cf_asfsForLabel;
							//
							// ...using this distinct (auto-scale) 
							// font spec for the labels...
							//
							// (Note that this will use a default
							// c-tor which will *probably* be = 
							// "10 pt ariel".)
							//


	//
	// The default POSITIONING of the TEXT BOX is CENTERED
	// (vertically AND horizontally ) along the pictTextLine's 
	// screen projection line, however, this can be toggled to 
	// Shift the Draw Point to any of the Text Box's four corners, 
	// or the Center Point, with the labelPlaced*() functions above:
	//
	BOOL		bHorizShiftLeft;
	BOOL		bHorizShiftRight;
	BOOL		bHorizCentered;
	
	BOOL		bVertShiftUp;
	BOOL		bVertShiftDown;
	BOOL		bVertCentered;

};	//
	// End of cf_3DTextLine declaration.
	//

#endif		// Terminates include re-definition protection

////////////////////////////////////////
// END of File: CO1_TLIN.HPP
////////////////////////////////////////  

			

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -