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

📄 b0_fonts.hpp

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

#ifndef B0_FONTS_HPP			// Avoid multiple includes...
#define B0_FONTS_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/b0_fonts.hpp>
// Base Framework abstractions of "font-specifier",
// "display-font", and "display-font-info" objects.
//
// These objects are used during display output operations.
// NOTE: Heavy Dependencies between b0_fonts.hpp and b0_dspla.hpp!
//

//
// Include the Zinc base headers.


//--------------------------------------------------------------------
// Include Chart Framework class or ID defs/headers this file needs.
// Paths are relative to the IDE's (global) include path: ~/cfrz
//--------------------------------------------------------------------

class		bf_DynaString;
#include 	<cf_api/c0_dystr.hpp>

class		cf_2DRect;
#include    <cf_api/c0_dimen.hpp>

class		bf_DispLogFontDim;
class		bf_Display;
#include    <cf_api/b0_dspla.hpp>
            // Unfortunately, there's quite a bit of dependency
			// between these two files and sets of objects...

//
// Make any definitions this file needs to know about:
//
// 		The zApp-based enum definitions are in the
// 		zApp header file: enumdef.hpp
//
typedef int			bf_FontFamily;
typedef int			bf_FontPitch;
typedef int			bf_StockFont;
					//
					// Map onto the Base Framework's
					// "Font Family" & "Font Pitch"
					// enumerated var definitions:
					//


//
// Map a Chart Framework "Base Framework Font Spec" Object onto
// the Underlying Framework's "Base Framework Font Spec" object:
//
class CF_EXPORT	bf_FontSpec
{

public:

	bf_FontSpec();

	bf_FontSpec(	const char      *a_cFontName,
					cf_2DRect		bf_2drWidthAndHeight,
					int				iWeight,
					bf_FontFamily	bf_ffEnumFamilyType = 0,    // BNR
					bf_FontPitch	bf_fpEnumPitchType	= 0,  // BNR
					int				iStyleFlags 		= 0 );
									//
									// We typically use style flag = 0;
									//

	bf_FontSpec(	const char      *a_cFontName,
					cf_2DRect		cf_strWidthAndHeight,
					int				iWeight,
					bf_FontFamily	bf_ffEnumFamilyType,
					bf_FontPitch	bf_fpEnumPitchType,
					int				iStyleFlags			= 0,
					int				iEscapementAngle	= 0,
					int				iOrientationAngle	= 0 );
									//
									// We typically use style flag = 0;
									//

	bf_FontSpec(	const char          *a_cFontName,
					bf_DispLogFontDim	bf_dlfdWidthAndHeight,
					int					iWeight,
					bf_FontFamily		bf_ffEnumFamilyType = 0,  // BNR
					bf_FontPitch		bf_fpEnumPitchType = 0,   // BNR
					int					iStyleFlags
							 			= 0,
					int					iEscapementAngle
										= 0,
					int					iOrientationAngle 
										 = 0 );
										//
										// We typically use style flag = 0;
										//
	
	bf_FontSpec (ZafLogicalFont);
							 			
									
	~bf_FontSpec();

	cf_String		fsp_faceName();
	int				fsp_size () { return size_; }
	BOOL			fsp_isInternal () { return is_internal_; }
	ZafLogicalFont	fsp_zfont () { return zfont_; }

private:

	cf_String		name_;
	int				size_;
	ZafLogicalFont	zfont_;
	BOOL			is_internal_;

};	//
	// End of bf_FontSpec Declaration.
	//



//
// Map a Chart Framework "Base Framework Font" Object onto 
// the Underlying Framework's "Base Framework Font" object:
//
class CF_EXPORT	bf_Font
{

public:

	bf_Font ();
	bf_Font (bf_FontSpec& spec);
	bf_Font (ZafLogicalFont);
	~bf_Font();

	BOOL				isInternal () { return is_internal_; }
	void				setZafFont (ZafLogicalFont zf) { zfont_ = zf; }
	ZafLogicalFont		getZafFont () { return zfont_; }
	int					getSize () { return size_; }
	cf_String			getName () { return name_; }


private:

	ZafLogicalFont		zfont_;
	int					size_;
	cf_String			name_;
	BOOL				is_internal_;

};


//
// Map a Chart Framework "Display-Context Font" Object onto 
// the Underlying Framework's "Display-Context Font" object:
//
// This class is primarily used by the "Auto-Scale Font Spec" class.
//
class CF_EXPORT	bf_FontInfo
{

public:

	bf_FontInfo( bf_Display *p_bf_dspCurrentDisplay );

	~bf_FontInfo();

	bf_FontFamily	fnfo_family();
	bf_FontPitch	fnfo_pitch();

	int			fnfo_height();
	int			fnfo_width();
	int			fnfo_weight();

	BOOL	fnfo_isItalic();
	BOOL	fnfo_isUnderlined();
	BOOL	fnfo_isStruckOut();
			//
			// We modify these method name with a "fnfo_" prefix 
			// to insure we are CLEARLY mapped away from the 
			// base framework...
			//

};	//
	// End of bf_FontInfo Declaration.
	//

#endif		// Terminates include re-definition protection

//////////////////////////////////////
// END of File: B0_FONTS.HPP
//////////////////////////////////////
			

⌨️ 快捷键说明

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