epoc32/include/openfontlinkedtypefaceelementspec.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 * Specification of a single typeface element within a linked typeface specification.
    16 *
    17 */
    18 
    19 
    20 #ifndef OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
    21 #define OPENFONTLINKEDTYPEFACEELEMENTSPEC_H
    22 
    23 /**
    24 Class for specifying a single typeface element within a linked typeface specification.
    25 Its features determine how the typeface is rendered within the linked fonts that use it.
    26 
    27 This class is used to communicate between the server and the rasterizer.
    28 
    29 Another similar but separate class, CLinkedTypefaceElementSpec, will be used client side
    30 and to communicate between the server and the rasterizer.
    31 
    32 WARNING: Class for internal and partner use ONLY.  Compatibility is not guaranteed in future releases.
    33 
    34 @see CLinkedTypefaceElementSpec
    35 
    36 @publishedAll
    37 @released
    38 */
    39 NONSHARABLE_CLASS(COpenFontLinkedTypefaceElementSpec) : public CBase
    40 	{
    41 public:
    42 	/**
    43 	Create a new linked typeface element specification. The name specified must be an existing typeface
    44 	that should be added to the linked typeface. The group ID links this typeface to a linked typeface
    45 	group.
    46 	
    47 	@see CLinkedTypefaceSpecification::Group()
    48 	
    49 	@param aTypefaceName The typeface name for this element
    50 	@param aGroupId The ID of the linked font group this element should belong to
    51 	
    52 	@return The newly created element spec
    53 	*/
    54 	IMPORT_C static COpenFontLinkedTypefaceElementSpec* NewLC(const TDesC& aTypefaceName, TInt aGroupId);
    55 
    56 	/**
    57 	Returns the typeface that this element represents within the linked typeface.
    58 	
    59 	@return	The element typeface name
    60 	*/
    61 	IMPORT_C TPtrC ElementName() const;
    62 	
    63 	/**
    64 	Set whether the element is the canonical (metrics) font. 
    65 	This is the font that provides all the metrics for the linked typeface.
    66 	
    67 	@param aIsCanonical Whether this element is canonical or not
    68 	*/
    69 	IMPORT_C void SetCanonical(TBool aIsCanonical);
    70 	/**
    71 	Returns the element canonical setting.
    72 	@return	The element canonical setting
    73 	*/
    74 	IMPORT_C TBool Canonical() const;
    75 	
    76 	/**
    77 	Returns the group Id specified at construction.
    78 	@return The group Id specified at construction
    79 	 */
    80 	IMPORT_C TInt GroupId() const;
    81 	
    82 	/**
    83 	Returns the path and filename of file containing the font this element represents.
    84 	@return The full path and filename for the font this element represents.
    85 	*/
    86 	IMPORT_C TPtrC FileName() const;
    87 	
    88 	/**
    89 	Default destructor
    90 	*/
    91 	IMPORT_C ~COpenFontLinkedTypefaceElementSpec();
    92 
    93 	/**
    94 	Sets the path and filename of file containing the font this element represents.
    95 
    96 	WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
    97 	
    98 	@param aFileName Path and filename of this element
    99 	*/
   100 	IMPORT_C void SetFileNameL(const TDesC& aFileName);
   101 private:
   102 	/**
   103 	Constructor
   104 	*/
   105 	COpenFontLinkedTypefaceElementSpec(TInt aGroupId);
   106 	void ConstructL(const TDesC& aTypefaceName);
   107 private:
   108 	HBufC*	iElementName;	//The Typeface Name
   109 	HBufC*  iFileName;		//The file containing this typeface
   110 	TBool	iIsCanonical;
   111 	TInt	iGroupId;
   112 	};
   113 
   114 #endif /*OPENFONTLINKEDTYPEFACEELEMENTSPEC_H*/