Title class

The Title object draws main, X, and Y axis titles for a parent plot or overlay object.


Synopsis

Header file:		ncarg/hlu/Title.h
Class name:		titleClass
Class pointer:		NhltitleClass
Fortran class function:	NHLFTITLECLASS
Superclass:		View
Composite classes:	<None>

Resources

Local resources

+---------------------------------------------------------------+
|			Title Resource Set			|
|---------------------------------------------------------------|
| NAME				TYPE			ACCESS	|
|	CLASS				DEFAULT			|
|===============================================================|
| tiDeltaF                      NhlTFloat               RCSG    |
|       TiDeltaF                        1.5                     |
|---------------------------------------------------------------|
| tiUseMainAttributes           NhlTBoolean             RCSG    |
|       TiUseMainAttributes             False                   |
|---------------------------------------------------------------|
| tiMainOn                      NhlTBoolean             RCSG    |
|       TiMainOn                        <Dynamic>               |
|---------------------------------------------------------------|
| tiMainString                  NhlTString              RCSG    |
|       TiMainString                    "Main"                  |
|---------------------------------------------------------------|
| tiMainSide                    NhlTPosition            RCSG    |
|       TiMainSide                      NhlTOP                  |
|---------------------------------------------------------------|
| tiMainPosition                NhlTPosition            RCSG    |
|       TiMainPosition                  NhlCENTER               |
|---------------------------------------------------------------|
| tiMainOffsetXF                NhlTFloat               RCSG    |
|       TiMainOffsetXF                  0.0                     |
|---------------------------------------------------------------|
| tiMainOffsetYF                NhlTFloat               RCSG    |
|       TiMainOffsetYF                  0.0                     |
|---------------------------------------------------------------|
| tiMainJust                    NhlTJustification       RCSG    |
|       TiTitleJust                     "CenterCenter"          |
|---------------------------------------------------------------|
| tiMainFont                    NhlTFont                RCSG    |
|       Font                            0                       |
|---------------------------------------------------------------|
| tiMainFontColor               NhlTColorIndex          RCSG    |
|       TiTitleFontColors               "Foreground             |
|---------------------------------------------------------------|
| tiMainFontHeightF             NhlTFloat               RCSG    |
|       TiTitleFontHeightsF             0.025                   |
|---------------------------------------------------------------|
| tiMainFontAspectF             NhlTFloat               RCSG    |
|       TiTitleFontAspectsF             1.3125                  |
|---------------------------------------------------------------|
| tiMainConstantSpacingF        NhlTFloat               RCSG    |
|       TiTitleConstantSpacingsF        0.0                     |
|---------------------------------------------------------------|
| tiMainFontThicknessF          NhlTFloat               RCSG    |
|       TiTitleFontThicknessF           1.0                     |
|---------------------------------------------------------------|
| tiMainFuncCode                NhlTCharacter           RCSG    |
|       TiTitleFuncCodes                :                       |
|---------------------------------------------------------------|
| tiMainFontQuality             NhlTFontQuality         RCSG    |
|       TiTitleFontQualities            NhlHIGH                 |
|---------------------------------------------------------------|
| tiMainAngleF                  NhlTFloat               RCSG    |
|       TiTitleAnglesF                  0.00                    |
|---------------------------------------------------------------|
| tiMainDirection               NhlTTextDirection       RCSG    |
|       TiMainDirection                 NhlACROSS               |
|---------------------------------------------------------------|
| tiXAxisOn                     NhlTBoolean             RCSG    |
|       TiXAxisOn                       <Dynamic>               |
|---------------------------------------------------------------|
| tiXAxisString                 NhlTString              RCSG    |
|       TiXAxisString                   "XAxis"                 |
|---------------------------------------------------------------|
| tiXAxisSide                   NhlTPosition            RCSG    |
|       TiXAxisSide                     NhlBOTTOM               |
|---------------------------------------------------------------|
| tiXAxisPosition               NhlTPosition            RCSG    |
|       TiXAxisPosition                 NhlCENTER               |
|---------------------------------------------------------------|
| tiXAxisOffsetXF               NhlTFloat               RCSG    |
|       TiXAxisOffsetXF                 0.0                     |
|---------------------------------------------------------------|
| tiXAxisOffsetYF               NhlTFloat               RCSG    |
|       TiXAxisOffsetYF                 0.0                     |
|---------------------------------------------------------------|
| tiXAxisJust                   NhlTColorIndex          RCSG    |
|       TiTitleJust                     "CenterCenter"          |
|---------------------------------------------------------------|
| tiXAxisFont                   NhlTFont                RCSG    |
|       Font                            0                       |
|---------------------------------------------------------------|
| tiXAxisFontColor              NhlTColorIndex          RCSG    |
|       TiTitleFontColors               "Foreground"            |
|---------------------------------------------------------------|
| tiXAxisFontHeightF            NhlTFloat               RCSG    |
|       TiTitleFontHeightsF             0.025                   |
|---------------------------------------------------------------|
| tiXAxisFontAspectF            NhlTFloat               RCSG    |
|       TiTitleFontAspectsF             1.3125                  |
|---------------------------------------------------------------|
| tiXAxisConstantSpacingF       NhlTFloat               RCSG    |
|       TiTitleConstantSpacingsF        0.0                     |
|---------------------------------------------------------------|
| tiXAxisFontThicknessF         NhlTFloat               RCSG    |
|       TiTitleFontThicknessF           1.0                     |
|---------------------------------------------------------------|
| tiXAxisFuncCode               NhlTCharacter           RCSG    |
|       TiTitleFuncCodes                :                       |
|---------------------------------------------------------------|
| tiXAxisFontQuality            NhlTFontQuality         RCSG    |
|       TiTitleFontQualities            NhlHIGH                 |
|---------------------------------------------------------------|
| tiXAxisAngleF                 NhlTFloat               RCSG    |
|       TiTitleAnglesF                  0.0                     |
|---------------------------------------------------------------|
| tiXAxisDirection              NhlTTextDirection       RCSG    |
|       TiXAxisDirection                NhlACROSS               |
|---------------------------------------------------------------|
| tiYAxisOn                     NhlTBoolean             RCSG    |
|       TiYAxisOn                       <Dynamic>               |
|---------------------------------------------------------------|
| tiYAxisString                 NhlTString              RCSG    |
|       TNhlTStringiYAxisString                   "YAxis"                 |
|---------------------------------------------------------------|
| tiYAxisSide                   NhlTPosition            RCSG    |
|       TiYAxisSide                     NhlLEFT                 |
|---------------------------------------------------------------|
| tiYAxisPosition               NhlTPosition            RCSG    |
|       TiYAxisPosition                 NhlCENTER               |
|---------------------------------------------------------------|
| tiYAxisOffsetXF               NhlTFloat               RCSG    |
|       TiYAxisOffsetXF                 0.0                     |
|---------------------------------------------------------------|
| tiYAxisOffsetYF               NhlTFloat               RCSG    |
|       TiYAxisOffsetYF                 0.0                     |
|---------------------------------------------------------------|
| tiYAxisJust                   NhlTJustification       RCSG    |
|       TiTitleJust                     "CenterCenter"          |
|---------------------------------------------------------------|
| tiYAxisFont                   NhlTFont                RCSG    |
|       Font                            0                       |
|---------------------------------------------------------------|
| tiYAxisFontColor              NhlTColorIndex          RCSG    |
|       TiTitleFontColors               "Foreground"            |
|---------------------------------------------------------------|
| tiYAxisFontHeightF            NhlTFloat               RCSG    |
|       TiTitleFontHeightsF             0.025                   |
|---------------------------------------------------------------|
| tiYAxisFontAspectF            NhlTFloat               RCSG    |
|       TiTitleFontAspectsF             1.3125                  |
|---------------------------------------------------------------|
| tiYAxisConstantSpacingF       NhlTFloat               RCSG    |
|       TiTitleConstantSpacingsF        0.0                     |
|---------------------------------------------------------------|
| tiYAxisFontThicknessF         NhlTFloat               RCSG    |
|       TiTitleFontThicknessF           1.0                     |
|---------------------------------------------------------------|
| tiYAxisFuncCode               NhlTCharacter           RCSG    |
|       TiTitleFuncCodes                :                       |
|---------------------------------------------------------------|
| tiYAxisFontQuality            NhlTFontQuality         RCSG    |
|       TiTitleFontQualities            NhlHIGH                 |
|---------------------------------------------------------------|
| tiYAxisAngleF                 NhlTFloat               RCSG    |
|       TiTitleAnglesF                  90.0                    |
|---------------------------------------------------------------|
| tiYAxisDirection              NhlTTextDirection       RCSG    |
|       TiYAxisDirection                NhlACROSS               |
+---------------------------------------------------------------+

Composite resources

The Title object class intercepts all the resources of its child TextItem objects. Therefore, there are no composite resources that can be set for the Title object class.

Superclass resources

You may set any resources belonging to the superclasses of the Title object class, including:

Description

The Title object class draws titles around the viewport defined by the vpXF, vpYF, vpWidthF, and vpHeightF. There are three titles drawn by the Title object, the Main title, the X-Axis title and the Y-Axis title. The Main title by default is centered above the viewport. The X-Axis title is centered below the viewport and the Y-Axis title is centered to the left of the viewport. These default positions can be adjusted by various resources.

The names of the resources used to configure the text attributes of the titles are formed in a consistent way from the corresponding TextItem resources. The name of the individual title is prepended to the TextItem resource name. For example, the TextItem resource for setting the string to draw is txString. For the three individual titles, the Title object provides the string resources tiMainString, tiXAxisString, and tiYAxisString. All other text attribute resources for the titles are constructed in the same fashion. However, note that the Title object has its own resources for positioning the titles relative to its viewport, and therefore does not recognize the TextItem positioning resources, txPosXF and txPosYF. Also the Title object does not support perimeter outlines or fill of the area occupied by the text string.

The resources for adjusting the position of the titles are tiDeltaF, tiMainPosition, tiMainSide, tiMainOffsetXF, tiMainOffsetYF. Similarly named resources are available for the X-Axis and Y-Axis as well. tiDeltaF applies to all titles. It is a multiplier that defines how far from the viewport edge titles should be placed. The distance is computed by multiplying tiDeltaF by the appropriate font height. tiMainPosition can be set to NhlLEFT, NhlCENTER or NhlRIGHT specifying what part of the viewport the Main title will be centered above or below. tiMainSide determines what side of the viewport the main title is placed. It is a resource of type NhlPosition, that can be set to either of the values NhlTOP or NhlBOTTOM. Similar resources apply to the X-Axis and Y-Axis. The resources tiMainOffsetXF and tiMainOffsetYF are available to displace text in NDC coordinates from its default position.

When the X-Axis and the Main title share the same side of the viewport the Title object makes sure the two titles will not overlap. The Main title is always placed outside of the X-Axis title when they are on the same side.


Support functions

The Title object does not define any support functions, but inherits all the support functions available to its superclass.

Status

1: The tiUseMainAttributes resource currently does not copy the values of tiMainFontQuality and tiMainFontColor as one might expect it should. It does copy the value of tiMainAngleF even though the default value for the Y-Axis is different from the default values for the Main and X-Axis titles. This needs attention.


See also


Copyright

Copyright 1987,1988,1989,1991,1993,1994,1995
University Corporation for Atmospheric Research
All Rights Reserved

Reference Manual Control Panel

NG4 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.13 $ $Date: 1995/07/26 23:30:36 $