iXrefCtrl.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003     FILE: iXrefCtrl.h
00004 
00005     DESCRIPTION: Public interface for the XRef controller.
00006 
00007     CREATED BY: Richard Laperriere
00008 
00009     HISTORY: April 5th, 2005    Creation
00010 
00011     Copyright (c) 2005, All Rights Reserved.
00012 
00013 *****************************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "..\ifnpub.h"
00018 #include "..\control.h"
00019 
00021 #define IID_XREF_CTRL Interface_ID(0x501064f, 0x4026738f)
00022 
00023 //==============================================================================
00024 // Class IXRefCtrl
00025 //
00027 
00029 class IXRefCtrl : public Control, public FPMixinInterface
00030 {
00031 public:
00032 
00034 
00037     static bool Is_IXRefCtrl(Animatable& animatable);
00038 
00039     using FPMixinInterface::GetInterface;
00041 
00044     static IXRefCtrl* GetInterface(InterfaceServer& is);
00045 
00047 
00052     virtual Control* GetSourceCtrl(bool resolveNestedXRef = false) const = 0;
00053 
00055 
00058     virtual FPInterfaceDesc* GetIXRefCtrlDesc() = 0;
00059 
00062     virtual void ResetOffsetTM() = 0;
00063 
00064     // -- from FPMixinInterface
00065     virtual Interface_ID GetID()            {return IID_XREF_CTRL;}
00066     virtual FPInterfaceDesc* GetDesc()      {return GetIXRefCtrlDesc();}
00067 
00068     // --- Function publishing
00069     enum {
00070         kfpGetSourceCtrl,
00071         kfpResetOffsetTM,
00072     };
00073 
00074     BEGIN_FUNCTION_MAP
00075         FN_1(kfpGetSourceCtrl, TYPE_CONTROL, GetSourceCtrl, TYPE_bool);
00076         VFN_0(kfpResetOffsetTM, ResetOffsetTM);
00077     END_FUNCTION_MAP
00078 };
00079 
00080 //==============================================================================
00081 // Class IXRefCtrl inlined methods
00082 //==============================================================================
00083 
00084 inline bool IXRefCtrl::Is_IXRefCtrl(Animatable& animatable)
00085 {
00086     return ((animatable.SuperClassID() == CTRL_MATRIX3_CLASS_ID) &&
00087             (animatable.ClassID() == XREFCTRL_CLASS_ID));
00088 }
00089 
00090 inline IXRefCtrl* IXRefCtrl::GetInterface(InterfaceServer& is)
00091 {
00092     return static_cast<IXRefCtrl*>(is.GetInterface(IID_XREF_CTRL));
00093 }
00094