All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

ApplicationFrame Class CATAfrCommandHeaderRep

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---CATAfrCommandHeaderRep
 

Usage: you can derive this class.


public class CATAfrCommandHeaderRep

Base class to create a customized representation for a command header.
Role:This class is the base class to create a customized representation for a CATCommandHeader class. This customized command header must derive from the CATAfrDialogCommandHeader class, and must implement the CATIAfrCommandHeaderRep interface. This interface contains three methods to overload the default representation of the command header into a toolbar, the menubar or a contextual menu. In most cases, only one method creates an instance of a class deriving from CATAfrCommandHeaderRep, and the two others create nothing.

The Build method is automatically called just after the instantiation of the class deriving from CATAfrCommandHeaderRep. This method generally creates dialog object, whose the dialog parent is the first argument of the constructor, and that you retrieve with the GetDialogParent method.

It is strongly recommended to read User Interfaces articles about command header into the CAA Encyclopedia before to creating such classes. You will learn how to manage the multi-representation, and more generally how to "refresh" all the instances of the representations.


Constructor and Destructor Index


o CATAfrCommandHeaderRep(CATDialog*,CATString&)
Constructs a customized representation for a command header.
o ~CATAfrCommandHeaderRep()

Method Index


o Build()
Creates the customized representation.
o GetDialogParent(CATDialog**)
Retrieves the dialog parent.

Constructor and Destructor


o CATAfrCommandHeaderRep
public CATAfrCommandHeaderRep( const CATDialog* iParent,
CATString& iCommandName)
Constructs a customized representation for a command header.
Parameters:
iParent
The Dialog parent of dialog objects created by the
Build method.
iCommandName
The name of the command. It is the argument of the
CATCommand class constructor. This name can be the same for all instances of the current class.
o ~CATAfrCommandHeaderRep
public virtual ~CATAfrCommandHeaderRep()

Methods


o Build
public virtual HRESULT Build()= 0
Creates the customized representation.
Role:This method instantiates Dialog objects whose the dialog parent is the value returned by the GetDialogParent method.
Returns:
an HRESULT value
o GetDialogParent
public HRESULT GetDialogParent( const CATDialog** ioParent)
Retrieves the dialog parent.
Parameters:
ioParent
The first argument of the
CATAfrCommandHeaderRep constructor.
Returns:
an HRESULT value
Legal Values:
  1. S_OK if success
  2. E_FAIL otherwise

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

Copyright © 2003, Dassault Systèmes. All rights reserved.