Public Member Functions

AttachMatDlgUser Class Reference

Search for all occurrences

Detailed Description

See also:
Class Object, Class Modifier.

Description:
This class is available in release 3.0 and later only.

This class provides a general way for objects to handle the attach materials dialog presented when users attach objects to each other. To use this class do the following:

1) Subclass your modifier or editable object off this class as shown below. Implement the four functions that give access to the attach/condense options.

2) Now your class simply calls the global DoAttachMatOptionDialog() function, which deals with the parameters uniformly for all users. The implementation in Edit Spline is like so:

class EditSplineMod : public Modifier, ..., AttachMatDlgUser
{
    . . .
        static int attachMat;
    static BOOL condenseMat;
    . . .
}
// from AttachMatDlgUser
    int GetAttachMat() { return attachMat; }
    void SetAttachMat(int value) { attachMat = value; }
    BOOL GetCondenseMat() { return condenseMat; }
    void SetCondenseMat(BOOL sw) { condenseMat = sw; }
And the statics are defined as:

int EditSplineMod::condenseMat = FALSE;
int EditSplineMod::attachMat = ATTACHMAT_NEITHER;

#include <imtl.h>

Inheritance diagram for AttachMatDlgUser:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~AttachMatDlgUser ()
virtual int  GetAttachMat ()=0
virtual BOOL  GetCondenseMat ()=0
virtual void  SetAttachMat (int value)=0
virtual void  SetCondenseMat (BOOL sw)=0

Constructor & Destructor Documentation

virtual ~AttachMatDlgUser ( ) [inline, virtual]
Remarks:
Destructor.
{;}

Member Function Documentation

virtual int GetAttachMat ( ) [pure virtual]
Remarks:
Returns the attach material setting. One of the following values:

ATTACHMAT_IDTOMAT

Match material IDs to material.

ATTACHMAT_MATTOID

Match Material to Material IDs.

ATTACHMAT_NEITHER

Do not modify Material IDs or Material.

Implemented in PatchObject, and SplineShape.

virtual BOOL GetCondenseMat ( ) [pure virtual]
Remarks:
Returns the condense material and IDs settings.

Implemented in PatchObject, and SplineShape.

virtual void SetAttachMat ( int  value ) [pure virtual]
Remarks:
Sets the attach material value.
Parameters:
int value

One of the following values:

ATTACHMAT_IDTOMAT

Match material IDs to material.

ATTACHMAT_MATTOID

Match Material to Material IDs.

ATTACHMAT_NEITHER

Do not modify Material IDs or Material.

Implemented in PatchObject, and SplineShape.

virtual void SetCondenseMat ( BOOL  sw ) [pure virtual]
Remarks:
Sets the condense material and IDs setting.
Parameters:
BOOL sw

TRUE for on; FALSE for off.

Implemented in PatchObject, and SplineShape.


AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser
AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser AttachMatDlgUser