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

📄 c4_cview.hpp

📁 windRiver提供的的Zinc5.3完整源码,文档非常齐全
💻 HPP
📖 第 1 页 / 共 2 页
字号:
                                    double      dPercentFromYCenterCoord,
                                    double      dPercentFromZCenterCoord );
                    // Lets the user add chart-model data which will auto-
                    // generate a 3D-text-marker at the percentage position
                    // coordinates.  Each legend-markers will be right-shifted
                    // and will have the default palette color of its numerical
                    // order in the sequence of legend additions.

    cf_DataGroup&   setLabelTitle(  const char      *p_strTitleLabel,
                                    cf_ChartTitle   enumChartTitleSelector,
                                    double          dPercentFromXCenterCoord,
                                    double          dPercentFromYCenterCoord,
                                    double          dPercentFromZCenterCoord );
                    // Lets the user add chart-model data which will auto-
                    // generate a main/sub-titles at the percentage position
                    // coordinates.  Each title-markers will be centered
                    // and will have the default color of CF_BLACK.

    cf_DataGroup&   setLabelTitle(  const char      *p_strTitleLabel,
                                    cf_ChartTitle   enumChartTitleSelector );
                    // Default method places titles at the following coords:


    //========================================================================
    // Facilitate the parent Chart-Control's display/text-attrib(...) methods:
    //========================================================================
    cf_DispAttribs* attribAxisItemDisp( cf_ChartAxis  enumChartAxisSelector );
    cf_TextAttribs* attribAxisItemText( cf_ChartAxis  enumChartAxisSelector );

    cf_DispAttribs* attribAxisNameDisp( cf_ChartAxis  enumChartAxisSelector );
    cf_TextAttribs* attribAxisNameText( cf_ChartAxis  enumChartAxisSelector );

    cf_DispAttribs* attribChartFaceDisp( cf_ChartFace enumChartFaceSelector );

    cf_DispAttribs* attribDataGroupDisp( int iDataGroupNumber );
    cf_TextAttribs* attribDataGroupText( int iDataGroupNumber );
                    // Note: Data-groups not yet created will be new-ed!

    cf_DispAttribs* attribLegendDisp( int iUserLegendNumber );
    cf_TextAttribs* attribLegendText( int iUserLegendNumber );
                    // Note: Legends not yet created will be default/new-ed!

    cf_DispAttribs* attribTitleDisp( cf_ChartTitle   enumChartTitleSelector );
    cf_TextAttribs* attribTitleText( cf_ChartTitle   enumChartTitleSelector );



    //==================================================================
    // Facilitate the parent Chart-Control's behavior(...) methods:
    //==================================================================
    cf_3DGridTickSeries*
                    axisBehavior(   cf_ChartAxis    enumChartAxisSelector,
                                    double          dFreqTicksToData,
                                    int             iRatioLabelsToTicks,
                                    int             iRatioGridsToTicks,
                                    int             iRatioMajorToMinor,
                                    double          dPercentTickSizeToChart,
                                    long            lFlags );

    cf_3DGridTickSeries*
                    axisDataSource( cf_ChartAxis    enumChartAxisSelector,
                                    cf_AxisData     enumAxisDataSource,
                                    BOOL            bNewState );

    cf_3DGridTickSeries*
                    axisTicks(  cf_ChartAxis    enumChartAxisSelector,
                                double          dFreqTicksToData,
                                int             iRatioMajorToMinor,
                                double          dPercentTickSizeToChart,
                                long            lFlags );
    cf_3DGridTickSeries*
                    axisGrids(  cf_ChartAxis    enumChartAxisSelector,
                                int             iRatioGridsToTicks,
                                long            lFlags );

    cf_3DGridTickSeries*
                    axisLabels( cf_ChartAxis    enumChartAxisSelector,
                                int             iRatioLabelsToTicks,
                                long            lFlags );


    double          axisRangeMin();
    double          axisRangeMax();
    BOOL            axisRangePref(  double  dMinCandidate,
                                    double  dMaxCandidate );


    BOOL            axisRangeIncludesOrigin( BOOL bForceOriginInclusion );
    BOOL            axisRangeIncludesOriginIs();

    BOOL            axisRangeIncludesOrigin( double dWithinNumDataDeltas );
    double          axisRangeIncludesOrigin();



    //===================================================================
    // Facilitate the parent Chart-Control's chart-typing(...) methods:
    //===================================================================
    BOOL            chartType( cf_ChartType enumNewChartType );
    cf_ChartType    chartType();

    BOOL            chartDispMode( cf_DispMode enumNewDispMode );
    cf_DispMode     chartDispMode();

    BOOL            chartIndexMode( cf_IndexMode enumNewIndexMode );
    cf_IndexMode    chartIndexMode();


    //=================================================================
    // Facilitate the parent Chart-Control's geom/view(...) methods:
    //=================================================================
    BOOL            geomViewAngle(  cf_DispMode enumNewDispMode );
    BOOL            geomViewAngle(  double  dXAngleZeroToPositive90,
                                    double  dYAngleZeroToNegative90 );


    //=================================================================
    // Facilitate the parent Chart-Control's chart-reset(...) methods:
    //=================================================================
    void            resetAll( BOOL  bForceImmediateReDraw );
    void            resetData( BOOL  bForceImmediateReDraw );
    void            resetLabels( BOOL  bForceImmediateReDraw );
    void            resetLegends( BOOL  bForceImmediateReDraw );
    void            resetTitles( BOOL  bForceImmediateReDraw );



    //========================================================================
    // Facilitate the parent Chart-Control's chart-display-mode(...) methods:
    //========================================================================
    void            disp3DBmp( BOOL bNewState );

    BOOL            disp3DBmpIs();
                    // Get/Set the ON/OFF status of the Chart's 3D-Bitmap(s).

    void            dispColorBackground( bf_Color   bf_clrNewVal );
                    // Goal -- synchronize chart-engine background color(s)
                    // with this color sent by the parent chart-control.

    BOOL            draw( bf_Display  *p_bf_dspFromParentControl );
                    //*************************************************
                    // Goal -- pass the display context from the parent
                    // chart-control to the encapsulated chart-engine
                    // draw() member methods.  A crucial method!
                    //*************************************************

    void            updateDisplayMetrics( bf_Display *p_bf_dspHasChanged );
                    //*******************************************************
                    // Called by this chart-view's parent chart-control to
                    // respond to display re-sizes, re-sets, context-changes.
                    // Goals -- pass the display-context to the chart-engine's
                    // geom-kernel for geom-recalculation, and then apply
                    // the geom-changes to the chart-engine and its objects.
                    //********************************************************

protected:

    cf_ChartModel   *p_ViewsModel_;
                    //--------------------------------------------------------
                    // Holding the user-data for the chart-engine to render.
                    //--------------------------------------------------------

    BOOL            bWasViewsModelNewed_;
                    // We MAY new the pointer above -- BUT -- we may also be
                    // borrowing some ELSE's pointer!  So avoid double deletes.
                    // Note that this value is typically TRUE.

    cf_ChartEngine  *p_ViewsEngine_;
                    //--------------------------------------------------------
                    // Generates sets of 2D/3D chart-objects from user-data
                    //--------------------------------------------------------

    BOOL            bWasViewsEngineNewed_;
                    // Same rationale as above -- avoid double-deletes!
                    // Note that this value is typically true.

    BOOL            bIsActivatedForControlsDisplay_;
                    // Tracks if (at least one) engine-to-control/display
                    // synchronization has yet occured. C-tor inits FALSE,
                    // and the first call from the parent chart-control
                    // to this chart-view's activate(...) method sets true.

private:

    void            ctorInit(   cf_ChartType    enumChartType,
                                cf_DispMode     enumDispMode,
                                cf_IndexMode    enumIndexMode );
                    // Multiple c-tors may share commmon init-functionality.

    void            rz_doNothing();
                    // template for a Rogue-Wave zApp-specific helper-method.

};  // End of cf_ChartView Declaration.

#endif

/////////////////////////////////////////
// END of File: C4_CVIEW.HPP
/////////////////////////////////////////

⌨️ 快捷键说明

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