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

📄 co1_gts.hpp

📁 windRiver提供的的Zinc5.3完整源码,文档非常齐全
💻 HPP
📖 第 1 页 / 共 2 页
字号:
    // for creating a new grid/tick marker for an Axis Series
    // from a double value that will be interpreted according
    // to a derived Axis Serie's context. They return a pointer
    // to the newly activated marker.
    //----------------------------------------------------------
    virtual
        cf_3DTextMarker*
                markAxisAt( double      dAtUserVal,
                            cf_TickSize enumTickSize
                                        = CF_TICK_MAJOR );
                // Our most important virtual base method -- the
                // "heart" of the grid/tick/series derivation tree!

        cf_3DTextMarker*
                markAxisAt( double      dAtUserVal,
                            double      dValueForLabel,
                            cf_TickSize enumTickSize
                                        = CF_TICK_MAJOR );

        cf_3DTextMarker*
                markAxisAt( double      dAtUserVal,
                            const char  *a_cStringForLabel,
                            cf_TickSize enumTickSize
                                        = CF_TICK_MAJOR );

    //-------------------------------------------------------------
    // These protected "update from data model" methods are
    // typically invoked by the public ApplyDataUpdate()
    // method above, according to the state of the "update
    // behavior member vars" the programmer/user has set
    // up via the public methods above...
    //-------------------------------------------------------------
    void    updateDataRange(    double  dWithinRangeMin,
                                double  dWithinRangeMax );

    void    updateFromDataGroupsList( cf_ChartModel *p_cf_cmodlDataSource );

    void    updateFromDomainItems( cf_ChartModel *p_cf_cmodlDataSource );

    void    updateFromRangeValues( cf_ChartModel *p_cf_cmodlDataSource );
    void    updateFromRangeValSums( cf_ChartModel *p_cf_cmodlDataSource );

    void    updateOverDataRange( cf_ChartModel *p_cf_cmodlDataSource );
    void    updateOverDataRangeSums( cf_ChartModel *p_cf_cmodlDataSource );
            // These two BOTH call the updateRange( min, max )
            // method (above) after they set up their range limits.


    //--------------------------------------------------------
    // Protected members that manage the array(s) of
    // 3D Text Markers that compose this Grid/Tick Series:
    //--------------------------------------------------------
    cf_ChartEngine  *p_cf_engParentEngine_;
                    // Within the run-time context of a parent chart/engine.

    cf_ChartAxis    enumCurrAxisType_;

    double  dEngDataXMax, dEngDataXMin;
    double  dEngDataYMax, dEngDataYMin;
    double  dEngDataZMax, dEngDataZMin;
            // ...with these data ranges...

    double  dEngVirtXMax, dEngVirtXMin;
    double  dEngVirtYMax, dEngVirtYMin;
    double  dEngVirtZMax, dEngVirtZMin;
            // ...and these virtual ranges...

    void    gatherEngineDataVirtRanges();
            // ...gathered by this protected member method...

    double  dEngDataXDim, dEngDataYDim, dEngDataZDim;
    double  dEngVirtXDim, dEngVirtYDim, dEngVirtZDim;
            // ...which yields these dimensions to generate
            // cf_3DTextMarker objects (according to a given
            // chart engine's current dimensions)...

    cf_DyArr    da_p_cf_3dtmMarkerArray;
    int         iNumMarkAllocs;
                // ...This cf_3DGridTickSeries will coordinate the
                // creation, destruction, manipulation, and display
                // of a set of cf_3DTextMarkers along an given axis...

    cf_3DTextMarker *p_cf_3dtmAxisLabel_;
                    // Along with a "label" marker.

    BOOL    bIsActive;
            // I.e. the user may turn this series OFF (or ON)...

    //-------------------------------------------------------
    // We have to maintain a "geometry state" for our
    // collection of "Text Marker" Objects:
    //-------------------------------------------------------
    double  dTransX, dTransY, dTransZ;
    double  dScaleFacX, dScaleFacY, dScaleFacZ;
            // We'll need to keep track of how much this object
            // has been translated, or scaled, so we can "backtrack"
            // or reverse any operations on its components.

    double  dVirtXMax, dVirtXMin;
    double  dVirtYMax, dVirtYMin;
    double  dVirtZMax, dVirtZMin;
            // Used in geometric calcs for XYZ scaling & xlation.

    //---------------------------------------------------------
    // The individual markers in this series will all
    // share some properties, such as a single set of
    // "display attributes, (for rendering) and a single
    // (auto-scale) font spec for their labels...
    //---------------------------------------------------------
    double      dTickSizeRatio; // C-tor inits = 0.05;
                // Grids lines span a chart dimension.  This ratio
                // specifies how big the tick-marks will be in
                // comparison to this dimension.

    //-------------------------------------------------------
    // Vars to control update behavior for this axis series:
    //-------------------------------------------------------
    BOOL    bUseDataGroupsList;     // C-tor inits to FALSE;
    BOOL    bUseDataRange;          // C-tor inits to FALSE;
    BOOL    bUseDataRangeSums;      // C-tor inits to FALSE;
    BOOL    bUseDomainItems;        // C-tor inits to FALSE;
    BOOL    bUseRangeValues;        // C-tor inits to FALSE;
    BOOL    bUseRangeValSums;       // C-tor inits to FALSE;

    BOOL    bUsePrefModelDomainFactor;  // C-tor inits to TRUE;
    BOOL    bUsePrefModelRangeFactor;   // C-tor inits to TRUE;

    int     iPrefModelDomainFactor;     // C-tor inits to 10 (ten).
    int     iPrefModelRangeFactor;      // C-tor inits to 10 (ten).

    int     iFreqTicksToDomainItems;    // C-tor inits to 1 (one).
    double  dFreqTicksToRangeValues;    // C-tor inits to 1 (one).

    int         iFreqGridsToTicks;      // C-tor inits to 0 (zero).
    int         iFreqTextsToTicks;      // C-tor inits to 1 (one).

    int         iFreqMajorToMinor_;     // C-tor init to 0 (zero).
    cf_TickSize enumCurrTickSize_;      // C-tor inits to CF_TICK_MAJOR,
                                        // Alternates based on Major/Minor-Freq

    BOOL    bDispForceMaxTickText;      // C-tor inits to FALSE.
    BOOL    bDispForceMinTickText;      // C-tor inits to FALSE.

    BOOL    bDispWithHiddenTicks;       // C-tor inits to FALSE;
    BOOL    bDispWithInvertedTicks_;    // C-tor inits to FALSE;

    cf_3DTextMarker *p_cf_3dtmMaxTick;  // C-tor inits these to NULL,
    cf_3DTextMarker *p_cf_3dtmMinTick;  // and added marks update them.

};  // End of cf_3DGridTickSeries declaration.


//=================================================================
// Declare a specialized derivation of the Chart
// Framework "Grid/Tick Mark Series"BASE class with
// special behaviors for a SPECIFIC engine axis
//=================================================================

//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the UPPER X-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkBackFaceX : 
        public 
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkBackFaceX( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkBackFaceX();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkBackFaceX declaration


//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the LOWER X-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkBottomFaceX :
        public
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkBottomFaceX( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkBottomFaceX();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkBottomFaceX declaration


//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the LEFT Y-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkLeftFaceY :
        public
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkLeftFaceY( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkLeftFaceY();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkLeftFaceY declaration


//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the RIGHT Y-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkBackFaceY : 
        public 
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkBackFaceY( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkBackFaceY();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkBackFaceY declaration


//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the LEFT Z-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkLeftFaceZ : 
        public 
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkLeftFaceZ( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkLeftFaceZ();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkLeftFaceZ declaration



//----------------------------------------------------------
// Special behaviors (e.g. "updates") for the RIGHT Z-Axis
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkBottomFaceZ :
        public
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkBottomFaceZ( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkBottomFaceZ();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...

};  // end of class cf_3DGTS_AutoMarkBottomFaceZ declaration



//----------------------------------------------------------
// Special behaviors (e.g. "updates") for POLAR marks
// -- around a polar origin, e.g. for Pie Chart "Tick Marks"
//----------------------------------------------------------
class CF_EXPORT   cf_3DGTS_AutoMarkPolarFloor : 
        public
        cf_3DGridTickSeries
{

public:

    cf_3DGTS_AutoMarkPolarFloor( cf_ChartEngine *p_cf_engINowBelongTo );

    virtual ~cf_3DGTS_AutoMarkPolarFloor();

    virtual
    cf_3DTextMarker*    markAxisAt( double      dAtUserVal,
                                    cf_TickSize enumTickSize
                                                = CF_TICK_MAJOR );
                        // Derived RE-implementation acts according
                        // to instantiated context...
                        // Note that in this implementation, param
                        // dAtUserVal is a RADIAN value.

};  // end of class cf_3DGTS_AutoMarkPolarFloor declaration

//---------------------------------------------------------------
// End of "Auto-Updating-Axis" Grid/Tick Mark Series Derivations.
//---------------------------------------------------------------

#endif

////////////////////////////////////////
// END of File: CO1_GTS.HPP
////////////////////////////////////////

⌨️ 快捷键说明

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