Exemple #1
0
void WINAPI EXP_NAME(SetStartupInfo)(const struct PluginStartupInfo *pInfo)
{
    ModuleNumber=pInfo->ModuleNumber;
    apiMenu=pInfo->Menu;
    apiGetMsg=pInfo->GetMsg;
#if defined(WINPORT_DIRECT)
    apiDialogInit=pInfo->DialogInit;
    apiDialogRun=pInfo->DialogRun;
    apiDialogFree=pInfo->DialogFree;
    apiSendDlgMessage=pInfo->SendDlgMessage;
    apiSnprintf = pInfo->FSF->snprintf;
#else
    apiDialog=pInfo->Dialog;
    apiCharTable=pInfo->CharTable;
#endif
    apiText=pInfo->Text;
    apiEditorControl=pInfo->EditorControl;
    _tstrcpy(PluginRootKey, pInfo->RootKey);
    _tstrcpy(PluginRootKey+_tstrlen(PluginRootKey), sDirIncSearch);
#ifdef VIEWVER_SUPPORT
    apiViewerControl=pInfo->ViewerControl;
    iViewerStatusColor=pInfo->AdvControl(ModuleNumber, ACTL_GETCOLOR,(void*)COL_VIEWERSTATUS);
#endif
    RestoreConfig();
}
	//---------------------------------------------------------------------------
	DirectoryIterator::DirectoryIterator(const char* directoryPath, bool recursive)
		:mImpl(new Impl)
	{
		if (directoryPath && _tstrlen(directoryPath) != 0){			
			mImpl->mRecursive = recursive;
			if (recursive){
				mImpl->mRecursiveIterator = boost::filesystem::recursive_directory_iterator(directoryPath);
			}
			else{
				mImpl->mIterator = boost::filesystem::directory_iterator(directoryPath);
			}
		}
	}