Dialog CATDlgToolsOptionsFrame

Usage: you can derive this class.


public class CATDlgToolsOptionsFrame

Special frame to be used in the Tools/Options tab pages.
Role: The CATDlgToolsOptionsFrame enables you to define sections of standardized aspect within a tab page.

Beware! The use of the CATDlgGridConstraints style is mandatory inside the ToolsOptions frame.
The structure of the frame is as follows:

 Title -----Separator-----
       ___________________
 Icon |                   |
      |                   |
      |   Options Frame   |
      |                   |
      |                   |
      |___________________|
 ---Invisible Separator---
 


Constructor and Destructor Index


o CATDlgToolsOptionsFrame(CATDialog*,CATString&,CATString&,CATDlgStyle)
Constructs a Tools/Options frame.
o ~CATDlgToolsOptionsFrame()

Method Index


o GetOptionsFrame()
Returns the "Options Frame".
o SetSensitivity(CATULong&)
Sets the sensitivity for the whole frame.

Constructor and Destructor


o CATDlgToolsOptionsFrame
public CATDlgToolsOptionsFrame( iParent,
const iIdentifier,
const iIconFileName,
iStyle=NULL)
Constructs a Tools/Options frame.
Parameters:
iParent
The parent of the frame.
iIdentifier
The identifier of the frame. It enables you to set the frame title in a CATNls file.
iIdentifier.HeaderFrame.Global.Title = "My Frame Title"; 

where:

iIdentifier
The identifier of the CATDlgToolsOptionsFrame
HeaderFrame.Global
Required keyword
Title
The keyword for a title
iIconFileName
The name of the file containing the associated icon without the extension. This file is stored in one of the directories under CNext/resources/graphic.
iStyle
The style of the frame. There are always a title and a separator at the top of the frame. The style manages the frame layout depending on whether there is an icon or not, and whether the frame is the last one.
Legal Values:
Default (NULL)
The frame contains a visible icon and a bottom invisible separator.
CATDlgToolsOptionsNoIcon
The frame doesn't contain any icon and the "Options Frame" is aligned with the title. Set iIconFileName to "".
CATDlgToolsOptionsInvisibleIcon
The frame doesn't contain any icon but the "Options Frame" is shifted as if there were an icon. Set iIconFileName to "".
CATDlgToolsOptionsBottomFrame
To be used only for the last frame in the page. It removes the bottom invisible separator.

The styles CATDlgToolsOptionsNoIcon and CATDlgToolsOptionsInvisibleIcon are mutually exclusive. Each of them can be combined with the CATDlgToolsOptionsBottomFrame style.

o ~CATDlgToolsOptionsFrame
public virtual ~CATDlgToolsOptionsFrame()

Methods


o GetOptionsFrame
public virtual GetOptionsFrame()
Returns the "Options Frame".
Role: To retrieve the frame into which you can include your own controls.

If you wish the objects within the Options Frame to fit into the whole width, you need to invoke the command SetGridColumnResizable command. Here is a code example: Let us consider the dialog class that includes CATDlgToolsOptionFrame instances. Suppose this class is named CATxxx
 ...
 CATDlgToolsOptionsFrame * pFrame1 = 
          new CATDlgToolsOptionsFrame(this, "Frame1" , 
                                      "I_MyIcon", CATDlgToolsOptionsBottomFrame);
 CATDlgFrame *pOptionsFrame1 = pFrame1->GetOptionsFrame();
 CATDlgCheckButton *pCheck1  = new CATDlgCheckButton(pOptionsFrame1,"Check1");
 CATDlgMultiList *pMultiList1  = new CATDlgMultiList(pOptionsFrame1,"MultiList1");
 //
 // The retrieved "Options Frame", pOptionsFrame1, is the parent of the created check button, and multiple list. 
 //
 //Both components are attached on 4 sides, and laying over 1 column and 1 row in the OptionsFrame1
 // pCheck1 is in the 0,0 box, pMultiList1 in the 0,1 box.
 pCheck1       -> SetGridConstraints(0,0,1,1,CATGRID_4SIDES); 
 pMultiList1   -> SetGridConstraints(0,1,1,1,CATGRID_4SIDES);
 //Now we want the multiple list to fit the entire OptionsFrame width. Thus the column 1 should be resizable.
 OptionsFrame1 -> SetGridColumnResizable(1,1);
 ...
 
CATDlgFrame *pOptionsFrame1 = pFrame1->GetOptionsFrame(); ...

The resources for your controls are set in the CATxxx.CATNls and/or CATxxx.CATRsc. For example the text for the created check button is set as follows:

Frame1.IconAndOptionsFrame.OptionsFrame.Check1.Title = "Check this option"; 

where:

Frame1
The identifier of the CATDlgToolsOptionsFrame
IconAndOptionsFrame.OptionsFrame
Required keyword
Check1
The identifier of the check button
Title
The keyword for a title
o SetSensitivity
public virtual SetSensitivity( const iSensitivity)
Sets the sensitivity for the whole frame.
Parameters:
iSensitivity
The frame sensitivity.
Legal Values:
CATDlgEnable
The frame is sensitive
CATDlgDisable
The frame is not sensitive

This object is included in the file: CATDlgToolsOptionsFrame.h
If needed, your Imakefile.mk should include the module: CATDlgStandard

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.