//
//	Copyright © 2005 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#include "StdAfx.h"

#include "VWFC/PluginSupport/VWPluginMenuApp.h"

using namespace VWFC::PluginSupport;

VWPluginMenuApp::VWPluginMenuApp()
{
	fpMenuChunkInfo		= NULL;
	fResult				= 0;
}

VWPluginMenuApp::~VWPluginMenuApp()
{
}

void VWPluginMenuApp::InitializeApp()
{
}

void VWPluginMenuApp::DeinitializeApp()
{
}

TXString VWPluginMenuApp::GetContextualHelpID() const
{
	return TXString();
}

void VWPluginMenuApp::DoInterface()
{
}

bool VWPluginMenuApp::GetItemEnabled()
{
	return true;
}

long VWPluginMenuApp::GetUserData() const
{
	return 0;
}

void VWPluginMenuApp::SetUserData(long /*userData*/)
{
}

long VWPluginMenuApp::GetResult() const
{
	return fResult;
}

void VWPluginMenuApp::SetResult(long result)
{
	fResult	= result;
}

void VWPluginMenuApp::SetMenuChunkInfo(MenuChunkInfo* pMenuChunkInfo)
{
	fpMenuChunkInfo		= pMenuChunkInfo;
}

void VWPluginMenuApp::NotifyCallback(EMenuCallbackEvent /*event*/)
{
}

void VWPluginMenuApp::RegisterForCallback(EMenuCallbackEvent event)
{
	OSType		whichChange	= (OSType) event;
	::GS_RegisterMenuForCallback( gCBP, ::GS_GetMyMenuCommandIndex( gCBP ), whichChange );
}

void VWPluginMenuApp::UnRegisterForCallback(EMenuCallbackEvent event)
{
	OSType		whichChange	= (OSType) event;
	::GS_UnregisterMenuForCallback( gCBP, ::GS_GetMyMenuCommandIndex( gCBP ), whichChange );
}

long VWPluginMenuApp::OnDefaultEvent(long action, long message)
{
	return 0;
}
