class SRGWizSheet
This class allows user to interactively configure their chart at runtime. When started, the class will make a copy of the user's graph. Inside this wizard, all the modification is effective only on the copy of the graph. After exit from the wizard, user's can call SaveGraph function to copy the modified graph inside the wizard back to the user's graph. If the graph user passed in does not contain any component, the wizard will start from three easy steps to help user choose a graph type with a basic layout to work with. If the graph does contain some components, then the wizard will start right to the page to let user configurate their graphs
Defined in: WizSheet.h
BOOL m_bGraphEmpty
Flag if the passed in graph has any component in it
CSize m_viewSize
The size of the drawing area of the chart given form the constructor
SRGWizView* m_pGraphView
Actual view port rectangle in the wizard
SRGWizView* m_pGraphView
The drawing area of the wizard
CMainPage m_NewMain
The main setup page of the wizard
CAdvancedPage m_Advanced
The advanced setup page of the wizard.
The integer identifier of the currently selected component
BOOL m_bAllowTracking
Set to TRUE if tracking is allowed.
SRGToolTipCtrl m_ToolTip
A tool tip control to help to show some tip for some of the controls
CObArray m_Layouts
ToolTip text for the view area
CObArray m_Layouts
Store all the layout information
DWORD m_nChartType
Graph type user selected from the Chart layout page
int m_nCurIndex
The current index of the layout information of the topleft image on
CHART_API virtual void LoadCustomStandChart(CListBox& listBox)
Override this function to load custom created chart into the list box, by default, it does nothing
CHART_API virtual void LoadStandardChart(CListBox& listBox)
Load the all the standard chart type of Objective Chart into the lis tbox
CHART_API virtual void LoadCustomLayout(CObArray& layoutInfo)
Override this function to add custom layout, by default it does nothing
CHART_API virtual void LoadLayout(LPCTSTR lpResName, LPCTSTR lpResType)
Load some default layout from resource.
CHART_API virtual void LoadTypeResource(CComboBox& combo, LPCTSTR lpResName, LPCTSTR lpResType)
Fills the combobox from the specified resource file -- see CMainPage::LoadGraphType
CHART_API virtual void FillAxisType()
Override this function to add custom axis type
CHART_API virtual void FillAxisType()
Load the supporting axis type based on the graph type selected
CHART_API virtual void LoadGraphType(LPCTSTR lpResName, LPCTSTR lpResType)
Override this function to load custom graph types
CHART_API virtual void LoadGraphType(LPCTSTR lpResName, LPCTSTR lpResType)
Load the standard graph types
CHART_API virtual void SetCustomAxisStyle(SRGraphDisplay* pDisplay, DWORD dwAxisStyle)
Override this function to load a custom axis type
CHART_API virtual void SetCustomGraphStyle(SRGraphDisplay* pDisplay, DWORD dwGraphStyle)
Override this function to load a custom graph type
CHART_API virtual void SetGraphStyle(SRGraphDisplay* pd)
Sets the graph type for the display component according to user selection
CHART_API virtual void SetAxisStyle(SRGraphDisplay* pd)
Sets the axis type for the display component according to user selection
CHART_API virtual void SetupGraph(UINT nWhichPage)
Setup the specified page of the graph
CHART_API virtual void OnDeleteComponent()
Called to delete a component from the list.
CHART_API virtual void DoAdvancedButton()
Completes Layout portion and initiates Configuration part of Wizard
CHART_API virtual ~SRGWizSheet()
Destructor
CHART_API afx_msg void OnSysCommand(UINT nID, LPARAM lParam)
Handles SC_CLOSE message to prevent unintentional termination of the wizard
CHART_API afx_msg void OnApplyNow()
Message handler, called when the Apply button is clicked -- only applies changes
CHART_API afx_msg void OnOK()
Message handler called when click OK button in the wizard.
CHART_API afx_msg LRESULT OnChangeComponentType(WPARAM, LPARAM)
Message handler, called when the user selects a different component the combobox --
CHART_API afx_msg LRESULT OnChangeGraphType(WPARAM wParam, LPARAM lParam)
Message handler, called when the user changes the graph type from the main page
CHART_API afx_msg LRESULT OnChangeAxisType(WPARAM wParam, LPARAM lParam)
Message handler, called when the user changes the axis type of the chart.
CHART_API afx_msg LRESULT OnChangeComponentName(WPARAM wParam, LPARAM lParam)
Message handler, called when user change the component name in the component list
CHART_API afx_msg LRESULT OnNeedRedraw(WPARAM wParam, LPARAM lParam)
Message handler, called when any property page changes a graph setting that
CHART_API afx_msg void OnNextButton()
Handles Next button click to navigate to next page of Wizard
CHART_API afx_msg void OnBackButton()
Handles Back button click to navigate to previous page of Wizard
CFillStyle m_FillPage
Fill Style setup page
CFontStyle m_FontPage
Font Style setup page
CHART_API virtual BOOL EnableGeneralSetting(SRGraphComponent* gc)
Wizard call this function to decide whether to prevent user from modifying the
CHART_API virtual BOOL EnableFillSetting(SRGraphComponent* gc)
Wizard call this function to decide whether to prevent user from modifying the
CHART_API virtual BOOL EnableFontSetting(SRGraphComponent* gc)
Wizard call this function to decide whether to prevent user from modifying the
CHART_API virtual void RegisterToolTips()
Register some of the controls on the pages to have tool
CHART_API virtual void OnReArrangeComponent(int nSrcIndex, int nDestIndex)
Move component from one place to another.
CHART_API virtual void AddCustomComponents(SRGComboBox& combo)
Override this function to add user derived component to the available
CHART_API virtual void SwitchView(BOOL bUseScroll)
Switch between view with scroll bar or not
CHART_API virtual void AddToComponentComboBox(LPCTSTR lpszName, SRGraphComponent* pc)
Add the component with the given name to the graph
CHART_API void AddPage(CPropertyPage* page, LPCTSTR lpszCaption = NULL)
Adds a new property page to the sheet and optionally set the caption for its tab
CHART_API virtual void CopyGraph(SRGraph* pFromGraph, SRGraph* pToGraph, BOOL bCopyData = TRUE)
Copies the graph and its data using CSharedFile serialization
CHART_API virtual void SaveGraph(BOOL bSaveGraphData = FALSE)
Saves the local copy of the graph configuration to the user suppied graph object without modifying the user's data
CHART_API virtual BOOL InitializePages()
Initializes the property pages from the settings of the user supplied graph
CHART_API void SetShadowStyle(SRGraphStyle* pStyle, UINT nType)
Sets the shadow style bits in a SRGraphStyle object
CHART_API void SetMainPageOf(SRGraphComponent* gc)
Sets a component's style from the selections in the Main page -- called
CHART_API void SetFontStyleOf(SRGraphComponent* pc)
Setup the font style of the component from the settings in the Font Style page
CHART_API void SetFillStyleOf(SRGraphComponent* pc)
Setup the fill style of the component from the settings in the Fill Style page
CHART_API virtual CString GetComponentName(SRGraphComponent* gc)
Create a name for this component that will be visible in the component list of
CHART_API virtual CString GetNewSuffix()
Create a new suffix to prevent the name collision.
CHART_API virtual void ShowScopeSection(BOOL bShow)
Show or hide the controls related to the scope settings depending on the type
CHART_API virtual void OnAddComponent()
Add the user selected component to the graph.
CHART_API void InitMainPage(SRGraphComponent* gc)
Initializes the controls in the Main page that are common to all components
CHART_API void InitFillPage(SRGraphComponent* pc)
Sets the controls of the fill style page from the component data
CHART_API void InitFontPage(SRGraphComponent* pc)
Sets the controls of the font style page from the component data
SRGraph* m_pRemoteGraph
Pointer to store the address of the user supplied graph
SRGraph* m_pGraph
Local copy of the user's graph
BOOL m_bUseOutData
Flag indicate whether the wizard will use the data of the passed graph or generate dummy data