/*
* Copyright 2004 Perforce Software. All rights reserved.
*
* Developed by Data Shades Ltd.
*/
#include "PhotoshopHost.h"
#include "InterfaceUtils.h"
#include "Translate.h"
#include "..\libp4gt\version.h"
TCHAR *PhotoshopHost::GetName()
{
return _T("P4GT-Photoshop");
}
TCHAR *PhotoshopHost::GetDesc()
{
return _T("P4GT - Photoshop.");
}
TCHAR *PhotoshopHost::GetVersion()
{
return _T(P4GT_VERSION);
}
TCHAR *PhotoshopHost::GetHostVersion()
{
char asciibuff[MAX_HOST_VERSION];
UTIL_Version( asciibuff );
static UniStrBuf buff;
Translate::ToWinChar( asciibuff, &buff );
return buff.Text();
}
int PhotoshopHost::GetNumDocs()
{
int num;
UTIL_NumDocs( &num );
return num;
}
bool PhotoshopHost::GetCurrDocPath( UniStrBuf &buff )
{
if ( currDoc.Length() == 0 ) {
return false;
}
else {
Translate::ToWinChar( currDoc.Text(), &buff );
return true;
}
}
bool PhotoshopHost::IsCurrDocDirty()
{
uint8 dirty;
UTIL_IsDirty( &dirty );
if ( dirty ) {
return true;
}
else {
return false;
}
}
void PhotoshopHost::SaveCurrDoc()
{
UTIL_SaveFile();
}
void PhotoshopHost::LoadDoc( StrPtr *path )
{
StrBuf buff;
Translate::FromWinChar( (TCHAR *)path->Text(), &buff );
UTIL_LoadFile( buff.Text() );
}
void PhotoshopHost::ReloadCurrDoc()
{
UTIL_Reload( currDoc.Text() );
}
void PhotoshopHost::SetCurrentDocPath( char *path )
{
currDoc.Clear();
currDoc = path;
}
bool PhotoshopHost::HasMultiDocs()
{
return true;
}
# |
Change |
User |
Description |
Committed |
|
#1
|
10140 |
Matt Attaway |
Initial release of the P4GT source code. |
|
|