home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Houseplan Collection
/
HRCD2005.ISO
/
data1.cab
/
Zusatz
/
3DS
/
DATA2.Z
/
ArConEventSink.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-08-17
|
11KB
|
158 lines
// ArConEventSink.cpp : implementation file
//
#include "stdafx.h"
#include "ArConEventSink.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ArConEventSink
IMPLEMENT_DYNCREATE(ArConEventSink, CCmdTarget)
ArConEventSink::ArConEventSink()
{
EnableAutomation();
}
ArConEventSink::~ArConEventSink()
{
}
void ArConEventSink::OnFinalRelease()
{
// When the last reference for an automation object is released
// OnFinalRelease is called. The base class will automatically
// deletes the object. Add additional cleanup required for your
// object before calling the base class.
CCmdTarget::OnFinalRelease();
}
BEGIN_MESSAGE_MAP(ArConEventSink, CCmdTarget)
//{{AFX_MSG_MAP(ArConEventSink)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(ArConEventSink, CCmdTarget)
//{{AFX_DISPATCH_MAP(ArConEventSink)
DISP_FUNCTION_ID(ArConEventSink, "ProgramExit", 1, ProgramExit, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(ArConEventSink, "LoadDialog", 2, LoadDialog, VT_EMPTY, VTS_I4 VTS_I4 VTS_DISPATCH)
DISP_FUNCTION_ID(ArConEventSink, "EndDialog", 3, EndDialog, VT_EMPTY, VTS_I4 VTS_BOOL)
DISP_FUNCTION_ID(ArConEventSink, "ExecuteMenuItem", 4, ExecuteMenuItem, VT_EMPTY, VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "GotOneClick", 5, GotOneClick, VT_EMPTY, VTS_BOOL VTS_R4 VTS_R4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "ButtonChange", 6, ButtonChange, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_BOOL VTS_BOOL VTS_BOOL)
DISP_FUNCTION_ID(ArConEventSink, "HowMove", 7, HowMove, VT_EMPTY, VTS_I4 VTS_R4 VTS_R4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "HowInput", 8, HowInput, VT_EMPTY, VTS_I4 VTS_R4 VTS_R4 VTS_R4 VTS_R4 VTS_I4 VTS_PDISPATCH)
DISP_FUNCTION_ID(ArConEventSink, "SaveDialogDefaults", 9, SaveDialogDefaults, VT_EMPTY, VTS_I4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "DialogActivation", 10, DialogActivation, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_BOOL)
DISP_FUNCTION_ID(ArConEventSink, "LoadComplete", 11, LoadComplete, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION_ID(ArConEventSink, "LoadBuilding", 12, LoadBuilding, VT_EMPTY, VTS_PDISPATCH VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "LoadStart", 13, LoadStart, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(ArConEventSink, "SaveStart", 14, SaveStart, VT_EMPTY, VTS_BSTR VTS_I4 VTS_BOOL VTS_PI4)
DISP_FUNCTION_ID(ArConEventSink, "SaveBuilding", 15, SaveBuilding, VT_EMPTY, VTS_I4 VTS_PDISPATCH)
DISP_FUNCTION_ID(ArConEventSink, "HowSnap", 16, HowSnap, VT_EMPTY, VTS_I4 VTS_R4 VTS_R4 VTS_I4 VTS_R4)
DISP_FUNCTION_ID(ArConEventSink, "HowStatusLineRedraw", 17, HowStatusLineRedraw, VT_EMPTY, VTS_I4 VTS_R4 VTS_R4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "ProjectClosed", 18, ProjectClosed, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DDoubleClick", 19, Graphics2DDoubleClick, VT_EMPTY, VTS_PDISPATCH)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DSelectionChanged", 20, Graphics2DSelectionChanged, VT_EMPTY, VTS_PDISPATCH VTS_R4 VTS_R4 VTS_BOOL VTS_BOOL VTS_BOOL VTS_R4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DDeleted", 21, Graphics2DDeleted, VT_EMPTY, VTS_PDISPATCH VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DMove", 22, Graphics2DMove, VT_EMPTY, VTS_PDISPATCH VTS_R4 VTS_R4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DEndMoving", 23, Graphics2DEndMoving, VT_EMPTY, VTS_PDISPATCH VTS_BOOL VTS_BOOL VTS_BOOL)
DISP_FUNCTION_ID(ArConEventSink, "NewCurrentProject", 24, NewCurrentProject, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DStartMoving", 25, Graphics2DStartMoving, VT_EMPTY, VTS_PDISPATCH VTS_R4 VTS_R4 VTS_R4 VTS_BOOL VTS_I4 VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "InputModeChanged", 26, InputModeChanged, VT_EMPTY, VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "ProjectChange", 27, ProjectChange, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(ArConEventSink, "ChangeNotify", 28, ChangeNotify, VT_EMPTY, VTS_PDISPATCH VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "Object3DDoubleClicked", 29, Object3DDoubleClicked, VT_EMPTY, VTS_PDISPATCH VTS_PDISPATCH VTS_PBOOL VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "TextureDropped", 30, TextureDropped, VT_EMPTY, VTS_PDISPATCH VTS_PDISPATCH VTS_I4 VTS_PDISPATCH VTS_BSTR VTS_R4 VTS_R4 VTS_R4 VTS_PBOOL VTS_PBOOL VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DStoryHeightsChanged", 31, Graphics2DStoryHeightsChanged, VT_EMPTY, VTS_PDISPATCH)
DISP_FUNCTION_ID(ArConEventSink, "Graphics2DObjectTransform", 32, Graphics2DObjectTransform, VT_EMPTY, VTS_DISPATCH VTS_PVARIANT)
DISP_FUNCTION_ID(ArConEventSink, "RoofDoubleClicked", 33, RoofDoubleClicked, VT_EMPTY, VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "UserPanelAdjustSize", 34, UserPanelAdjustSize, VT_EMPTY, VTS_I4 VTS_PI4 VTS_PI4 VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "UserPanelPosChanged", 35, UserPanelPosChanged, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "UserPanelRightClicked", 36, UserPanelRightClicked, VT_EMPTY, VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "ExternalViewsVisibilityChanged", 37, ExternalViewsVisibilityChanged, VT_EMPTY, VTS_I4)
DISP_FUNCTION_ID(ArConEventSink, "Object3DInserted", 38, Object3DInserted, VT_EMPTY, VTS_DISPATCH VTS_DISPATCH VTS_DISPATCH VTS_PVARIANT VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "WorldObject3DDoubleClicked", 39, WorldObject3DDoubleClicked, VT_EMPTY, VTS_DISPATCH VTS_DISPATCH VTS_I4 VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "WorldObject3DMoved", 40, WorldObject3DMoved, VT_EMPTY, VTS_DISPATCH VTS_DISPATCH VTS_DISPATCH VTS_PVARIANT)
DISP_FUNCTION_ID(ArConEventSink, "WorldObject3DTextureDropped", 41, WorldObject3DTextureDropped, VT_EMPTY, VTS_DISPATCH VTS_I4 VTS_R4 VTS_R4 VTS_R4 VTS_DISPATCH VTS_I4 VTS_BSTR VTS_BSTR VTS_PBOOL)
DISP_FUNCTION_ID(ArConEventSink, "WorldObject3DMaterialDropped", 42, WorldObject3DMaterialDropped, VT_EMPTY, VTS_DISPATCH VTS_I4 VTS_R4 VTS_R4 VTS_R4 VTS_DISPATCH VTS_I4 VTS_DISPATCH VTS_DISPATCH VTS_PBOOL)
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
BEGIN_INTERFACE_MAP(ArConEventSink, CCmdTarget)
INTERFACE_PART(ArConEventSink, DIID__ArConEvents, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ArConEventSink message handlers
void ArConEventSink::ProgramExit()
{
PostQuitMessage(0);
}
void ArConEventSink::GotOneClick(BOOL /*valid*/, float /*x*/, float /*y*/, long /*id*/) {}
void ArConEventSink::LoadDialog(long /* dialogID */, long /* ArConDlgToken */, LPDISPATCH /* dialogObject */) { }
void ArConEventSink::EndDialog(long /*dialogID*/, BOOL /*ok*/) { }
void ArConEventSink::ExecuteMenuItem(long /* menuId */) {}
void ArConEventSink::ButtonChange(long /*btnId*/, long /*evnt*/, long /*selectedIndex*/, BOOL /*pressed*/, BOOL /*visible*/, BOOL /*enabled*/) { }
void ArConEventSink::HowMove(long /*btnId*/, float /*x*/, float /*y*/, long /*viewHandle*/) { }
void ArConEventSink::HowInput(long /*btnId*/, float /*x*/, float /*y*/, float /*dirX*/, float /*dirY*/, long /*state*/, LPDISPATCH /*CutView*/) { }
void ArConEventSink::SaveDialogDefaults(long /*dlgId*/, long /*token*/) { }
void ArConEventSink::DialogActivation(long /*dlgId*/, long /*ArConDlgToken*/, long /*subObjectCount*/, BOOL /*activated*/) { }
void ArConEventSink::LoadComplete(BOOL /*successfull*/) { }
void ArConEventSink::LoadBuilding(LPDISPATCH /*aBuilding*/, long /*SaveNo*/) { }
void ArConEventSink::LoadStart() { }
void ArConEventSink::SaveStart(LPCTSTR /*FileName*/, long /*NumBuildings*/, BOOL /*isAutoSave*/, long* /*numChunksToSave*/) { }
void ArConEventSink::SaveBuilding(long /*BuildingNo*/, LPDISPATCH /*aBuilding*/) { }
void ArConEventSink::HowSnap(long /*btnId*/, float /*x*/, float /*y*/, long /*viewHandle*/, float /*snapDistance*/) { }
void ArConEventSink::HowStatusLineRedraw(long /*btnId*/, float /*x*/, float /*y*/, long /*viewHandle*/) { }
void ArConEventSink::ProjectClosed()
{
PostQuitMessage(0);
}
void ArConEventSink::Graphics2DDoubleClick(LPDISPATCH /*ob*/) { }
void ArConEventSink::Graphics2DSelectionChanged(LPDISPATCH /*obj*/, float /*x*/, float /*y*/, BOOL /*selected*/, BOOL /*extended*/, BOOL /*hasAlreadyBeenSelected*/, float /*pixelScale*/, long /*snapRadius*/) { }
void ArConEventSink::Graphics2DDeleted(LPDISPATCH /*obj*/, BOOL * /*allowDelete*/) { }
void ArConEventSink::Graphics2DMove(LPDISPATCH /*obj*/, float /*x*/, float /*y*/, long /*viewHandle*/) { }
void ArConEventSink::Graphics2DEndMoving(LPDISPATCH /*obj*/, BOOL /*aborted*/, BOOL /*extended*/, BOOL /*copied*/) { }
void ArConEventSink::NewCurrentProject()
{
}
void ArConEventSink::Graphics2DStartMoving(LPDISPATCH /* obj */, float /* x */, float /* y */, float /* pixelFactor */, BOOL /* extended */, long /* markerIndex */, BOOL * /* allowMove */) { }
void ArConEventSink::InputModeChanged(long /* newMode */)
{
}
void ArConEventSink::ProjectChange() { }
void ArConEventSink::ChangeNotify(LPDISPATCH /* obj */, long /* events */) { }
void ArConEventSink::Object3DDoubleClicked(LPDISPATCH /*obj3D*/, LPDISPATCH /*obj2D*/, BOOL * /*redrawObject*/, BOOL * /*redrawAll*/) { }
void ArConEventSink::TextureDropped(LPDISPATCH /*obj2D*/, LPDISPATCH /*obj3D*/, long /*matIndex*/, LPDISPATCH /*objTexture*/, LPCTSTR /*droppedTextureName*/, float /*x*/, float /*y*/, float /*z*/, BOOL * /*redraw*/, BOOL * /*redrawWholeScene*/, BOOL * /*autoExchangeTexture*/) { }
void ArConEventSink::Graphics2DStoryHeightsChanged(LPDISPATCH /*obj2D*/) { }
void ArConEventSink::Graphics2DObjectTransform(LPDISPATCH /*obj2D*/, VARIANT* /*matrix*/) { }
void ArConEventSink::RoofDoubleClicked(BOOL * /*showDialog*/) { }
void ArConEventSink::UserPanelAdjustSize(long /*ButtonInfo*/, long * /*width*/, long * /*height*/, BOOL * /*ok*/) { }
void ArConEventSink::UserPanelPosChanged(long /*ButtonInfo*/, long /*left*/, long /*top*/, long /*right*/, long /*bottom*/) { }
void ArConEventSink::UserPanelRightClicked(long /*ButtonInfo*/) { }
void ArConEventSink::ExternalViewsVisibilityChanged(long /*newVisFlags*/) { }
void ArConEventSink::Object3DInserted(IObject3D * /* Obj */, IWallSegment * /* SnapWallSeg */, IObject3D * /* SnapObj */, VARIANT * /* Position */, VARIANT_BOOL * /* PositionChanged */) { }
void ArConEventSink::WorldObject3DDoubleClicked(IObject3D * /* selObj */, IObject3D * /* clickedObj */, long /* objectPartID */, VARIANT_BOOL * /*Modified*/) { }
void ArConEventSink::WorldObject3DMoved(IObject3D * /* obj */, IWallSegment * /* snappingWallSeg */, IObject3D * /* snappingObject */, VARIANT * /* MC_WC */) { }
void ArConEventSink::WorldObject3DTextureDropped(IObject3D * /* obj */, long /* event */, float /* hitX */, float /* hitY */, float /* hitZ */, IMaterial * /* pickedMat */, long /* objectPartID */, LPCTSTR /* oldTexName */, LPCTSTR /* newTexName */, VARIANT_BOOL * /* mayDrop */) { }
void ArConEventSink::WorldObject3DMaterialDropped(IObject3D * /* obj */, long /* event */, float /* hitX */, float /* hitY */, float /* hitZ */, IMaterial * /* pickedMat */, long /* objectPartID */, IMaterial * /*oldMat*/, IMaterial * /*newMat*/, VARIANT_BOOL * /* mayDrop */) { }