/************************************************************

	MenuItemMain.cpp

	This is a plug-in module for VectorWorks.
	It creates a menu item that is used for testing path plug-ins.

	Copyright © Nemetschek North America, Inc  2004.
	All Rights Reserved.

************************************************************/


#if _WINDOWS
#include <Windows.h>
#include "GSWinSDK.h"	// Graphsoft Required.
#else
#include "StdHeaders.h"
#endif


#include <MiniCadCallBacks.h>
#include <MiniCadExternals.h>
#include "CustomObjects.h"

#include <GSString.h>
#include <RecordHandler.h>



// Because we include MenuMain.cpp in the project, the low level setup operations
// are performed on our behalf by SDK code. The CallBackPtr is already stored in gCBP
// and can be used throughout this external

// See MiniCADHookIntf.h for a description



long MenuMain(long action, long /*message1*/, long &/*userData*/)
{
	switch (action) {
		case kMenuInitGlobals: {
				/*
					This action is called when an overlay is activated and serves the
					primary purpose of allowing the external function to define any
					defaults and global information and to initialize data space that
					may be stored in userData.
 				*/

				break;
			}
		case kMenuDisposeGlobals: {
				/*
					This action is called when a workspace is deactivated and serves
					the primary purpose of allowing the external function to dispose
					data space that may be stored in userData.
 				*/

				break;
			}
		case kMenuItemDisplayContextualHelp: {
			if (GS_DisplayContextualHelp(gCBP, "net.nemetschek.help.????????-????-????-????-???????????")) {
				return kMenuItemHasContextualHelp;
			}
			break;
		}
			
		case kMenuDoInterface: {

                break;
			}
	}
 	return 0L;
}

long DangerousMenuMain(long /*action*/, long /*message1*/, long & /*userData*/)
{
	// This entry point gets kMenuCheckHilite & kMenuNotify messages, which must be handled very carefully
	return 0L;
}
