/*
* Copyright 2004 Perforce Software. All rights reserved.
*
* Developed by Data Shades Ltd.
*/
#ifndef INC_P43DS
#define INC_P43DS
#include "Max.h"
#include "MaxHost.h"
#include "PluginOperations.h"
#include "CallbackManager.h"
#include "resource.h"
#include "istdplug.h"
#include "iparamb2.h"
#include "iparamm2.h"
#include <guplib.h>
#include "PerforceActionTable.h"
// Unique menu ID
#define P43DS_MENU_CONTEXT_ID 0x23bf07bb
// Unique plugin ID
#define P43DS_CLASS_ID Class_ID(0x3952bd82, 0x7f961aa9)
#ifdef P43DS_MAIN
#define EXTERN
#else
#define EXTERN extern
#endif // P43DS_MAIN
/*
* Plugin DLL handle.
*/
EXTERN HINSTANCE hInstance;
/*
* Interface to callback handler
*/
EXTERN CallbackManager *callbacks;
extern TCHAR *GetString(StringResID id);
/*
* Plugin is of type GUP
*/
class P43ds : public GUP {
public:
static HWND hParams;
// GUP Methods
DWORD Start();
void Stop();
DWORD_PTR Control( DWORD parameter );
void DeleteThis() { delete this; }
// Loading/Saving
IOResult Save(ISave *isave);
IOResult Load(ILoad *iload);
private:
/*
* Install Perforce menu
*
* manager - The menu manager
* mainMenu - Handle to main menu bar
*/
void InstallPerforceMenu( IMenuManager* manager, IMenu* mainMenu, ActionTable *table );
/*
* Remove any previously installed Perforce menu
*
*/
void RemovePerforceMenu();
/*
* Add another item to the Perforce menu
*
* menu - The Perforce menu handle
* table - The action table
* id - The action id
*/
void AddMenuOption( IMenu *menu, ActionTable *table, int id );
/*
* Add a menu seperator
*
* menu - The Perforce menu handle
*/
void AddMenuSep( IMenu *menu );
/*
* Create and return the action table
*/
ActionTable *CreateActionTable();
};
/*
* Descriptor for plugin
*/
class P43dsClassDesc : public ClassDesc2 {
public:
int IsPublic() { return TRUE; }
void *Create(BOOL loading = FALSE) { return new P43ds(); }
const TCHAR *ClassName() { return GetString(IDS_CLASS_NAME); }
SClass_ID SuperClassID() { return GUP_CLASS_ID; }
Class_ID ClassID() { return P43DS_CLASS_ID; }
const TCHAR *Category() { return _T(""); }
const TCHAR *InternalName() { return _T("P4GT-3dsmax"); } // returns fixed parsable name (scripter-visible name)
HINSTANCE HInstance() { return hInstance; } // returns owning module handle
int NumActionTables() { return 1; }
ActionTable *GetActionTable(int i) { return new PerforceActionTable( hInstance ); }
const MCHAR* GetRsrcString(INT_PTR id) { return id != 0 ? (const MCHAR*)id : NULL; }
};
extern HINSTANCE hInstance;
#endif
# |
Change |
User |
Description |
Committed |
|
#1
|
10140 |
Matt Attaway |
Initial release of the P4GT source code. |
|
|