////////////////////////////////////////
// Start of File: C0_DATB.HPP
////////////////////////////////////////

#ifndef C0_DATB_HPP            // Avoid multiple includes...
#define C0_DATB_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/c0_datb.hpp>
// Chart Framework abstraction of a "display attributes" collection.
//

//--------------------------------------------------------------------
// Include Chart Framework class or ID defs/headers this file needs.
// Paths are relative to the IDE's (global) include path: ~/cfrz
//--------------------------------------------------------------------
#include    <cf_api/cf_defs.h>
            // defines typedefs for this charting framerowk...

class       bf_Color;
#include    <cf_api/b0_color.hpp>

class       bf_Display;
#include    <cf_api/b0_dspla.hpp>
            //
            // which has typedefs for bf_PenStyle and bf_BrushHatch
            //
            // Note that this class is NOT dependent upon the 
            // base framework classes -- it uses only objects 
            // from the "b0_*.hpp" files.
            //

//
// Declare a chart frame "Display Attribute" class.
//
// Class cf_DispAttribs holds a set of Display Attributes 
// in an envelope/letter relationship -- this object is 
// the envelope for the display attributes.  This object
// is typically held itself in another letter/envelope
// relationship, where is acts as the letter...
//
// As a mapping layer from the chart objects to the base framework,
// this object is placed at level 0 (zero) in the chart frame
// hierarchy...
//
class CF_EXPORT   cf_DispAttribs

{

public:

    cf_DispAttribs();   // Std (and default) c-tor:

    ~cf_DispAttribs(); // Std (and non-virtual) d-tor:

    cf_DispAttribs  operator=( const cf_DispAttribs &cr_cf_datbSource );
                        //  Defines a '=' (assignment) Operator:


//  BOOL            active();
//  void            active( BOOL bNewState );
                    // Users may want to turn this set of attribs on/off.


    bf_Color        colorBrush();
    void            colorBrush( const bf_Color &cr_bf_clrNewVal );
    bf_Color        colorPen();
    void            colorPen( const bf_Color &cr_bf_clrNewVal );
                    // Users may want to get/set group color attribs.


    BOOL            markWhen2D();
    void            markWhen2D( BOOL bNewState );
    BOOL            markWhen3D();
    void            markWhen3D( BOOL bNewState );
                    // User objects can turn 2D/3D markings on/off.


//  void            on();
//  void            off();
                    // Set methods which are synonyms of this->active( BOOL ).


    void            popBrushAttribs( bf_Display *p_bf_dspTarget ); 
    void            popPenAttribs( bf_Display *p_bf_dspTarget ); 
                    // Modularizes "pop" and "delete" ops 
                    // for display attribs. 

    void            pushBrushAttribs( bf_Display *p_bf_dspTarget ); 
    void            pushPenAttribs( bf_Display *p_bf_dspTarget );
                    // Modularizes "new" and "push" ops 
                    // for display attribs. 


    bf_BrushHatch   styleBrushHatch();
//    void            styleBrushHatch( const  bf_BrushHatch 
//                                            &cr_bf_bhatNewVal );
    void            styleBrushHatch( bf_BrushHatch bf_bhatNewVal );
    
    bf_PenStyle     stylePen();
//    void            stylePen( const bf_PenStyle 
//                                    &cr_bf_pstyNewVal );
    void            stylePen( bf_PenStyle bf_pstyNewVal );
    int             stylePenWidth();
    void            stylePenWidth( int iNewVal );
                    // Users may want to get/set group style attribs.

private:

    BOOL                bIsActive;
                        // We may be "on", we may be "off"...
                        // The c-tor default state is "off" (FALSE).

    bf_Color           bf_clrGroupPen;
    bf_Color           bf_clrGroupBrush;
                        // Yet another set of attributes for user objects.
                        // The c-tor default state for pen color is Black.
                        // The c-tor default state for brush color is White.

    bf_PenStyle        bf_pstyGroupPen;
    int                 iGroupPenWidth;
                        // Yet another set of attributes for user objects.
                        // The c-tor default state for pen style is 
                        // an enum bf_PenStyle, "CF_PS_SOLID".
                        // The c-tor default state for pen width is 1.

    bf_BrushHatch      bf_bhatGroupBrush;
                        // Yet another attribute for user objects.
                        // C-tor inits to "NoHatch" enum state.

    BOOL                bMarkWhen2D;    // C-tor inits = FALSE;
    BOOL                bMarkWhen3D;    // C-tor inits = FALSE;
                        // Some objects will want to render markers
                        // in either 2D or 3D mode.
    
};  //
    // End of cf_DispAttribs declaration.
    //

#endif      // Terminates include re-definition protection

////////////////////////////////////////
// END of File: C0_DATB.HPP
////////////////////////////////////////  

            
