Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Chart User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

3.7 Style Class

A single style class controls the visual and operating styles of Objective Chart's visual components and data items alike. Each component and data object contains an SRGraphStyle member. There is also an SRGraphStyle member in SRGraph. All classes that have a style object store it in their m_Style data member.

SRGraphStyle is used in the visual components to define background fill, border, and shadow styles. It is also used to choose the type of chart, chart labeling scheme, chart axis type, legend style, and other information.

A style object is also used in all data objects and data lists to define the visual appearance of the data or data series. It controls the data item's color, fill pattern, frame, and shape. By allowing each individual data item to be styled independently, Objective Chart provides maximum flexibility. For example, special data items can be highlighted.

The style object is common to both components and data because it is possible to define and use a component as a data item on a chart. None of the standard chart types do this now, but the potential is there should the need ever arise.

Style settings are stored in a compact bit-oriented fashion. Four 32-bit DWORD variables within the style object hold many bit flags. For this reason, the SRGraphStyle class has a comprehensive set of Getxxxx and Setxxxx routines. These functions ensure that changing one style setting never interferes with the other data in the same variable. They also isolate the user code from implementation details of the various style masks, which is subject to change in future versions. Always use these supplied functions. Do not attempt to construct bit patterns ad-hoc and place them directly into the style variables.

The style access functions are listed in Chapter 7, "Customizing a Chart."

SRGraphStyle is derived directly from CObject, as Figure 12 demonstrates.

Figure 12: Style class hierarchy



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.