Rhino C++ API
8.14
|
#include <RhinoSdkDirectoryManager.h>
Public Types | |
enum | FileTypes { ftOpen = 0, ftSave = ftOpen, ftImport, ftExport, ftTemplate, ftBitmap, ftRender, ftScreenCapture = ftRender, ftSaveDisplay = ftRender, ftTextures, ftBump, ftToolbarCollection, ftToolbarBitmapExport, ftToolbarBitmapImport = ftToolbarBitmapExport, ftCommandFile, ftRun, ftReadFile, ftCommandAlias, ftPlugIn, ftRhino3dmFile, ftWorksession, ftAttachReferenceFile, ftCount, force_32bit_file_types = 0xFFFFFFFF } |
Public Member Functions | |
int | AppendSearchPath (const wchar_t *lps) |
FileTypes | ConvertRhinoGetFileDialogDialogType (int ft) |
Helper function for internal use. More... | |
void | DeleteSearchPath (int i) |
BOOL32 | DirectoryFromFileName (const wchar_t *lpsFileName, ON_wString &dir) |
BOOL32 | GetDefaultDirectory (FileTypes ft, ON_wString &result) |
BOOL32 | InsertSearchPath (int i, const wchar_t *lps) |
void | LoadProfile (CRhinoProfileContext &PC) |
void | SaveProfile (CRhinoProfileContext &PC) |
const wchar_t * | SearchPath (int i) const |
int | SearchPathCount () const |
const wchar_t * | SearchPathCountEntry () const |
const wchar_t * | SearchPathEntryPrefix () const |
const wchar_t * | SearchPathKey () const |
BOOL32 | SetDefaultDirectory (FileTypes ft, const wchar_t *lpsDirectory) |
BOOL32 | SetDefaultDirectoryFromFileName (FileTypes ft, const wchar_t *lpsFileName) |
void | SetWorkingDirectory (const wchar_t *lpsDirectory) |
Protected Member Functions | |
const wchar_t * | Entry (FileTypes) |
void | Initialize () |
const wchar_t * | Key () |
void | Save () |
Should only be called once by CRhinoApp::ExitInstance() More... | |
Protected Attributes | |
ON_wString | m_dir_list [ftCount] |
ON_ClassArray< ON_wString > | m_search_path |
Friends | |
class | CRhinoApp |
Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.
int CRhinoDirectoryManager::AppendSearchPath | ( | const wchar_t * | lps | ) |
Description: Add directory to end of search path. Parameters: lps [in] - Directory to add. Returns: Index of new directory or -1 if an error occurred.
FileTypes CRhinoDirectoryManager::ConvertRhinoGetFileDialogDialogType | ( | int | ft | ) |
Helper function for internal use.
void CRhinoDirectoryManager::DeleteSearchPath | ( | int | i | ) |
Description: Remove user directory from CRhinoFileUtilities::FindFile Parameters: i [in] - Index of directory to delete. Returns:
BOOL32 CRhinoDirectoryManager::DirectoryFromFileName | ( | const wchar_t * | lpsFileName, |
ON_wString & | dir | ||
) |
Description: Extract directory name from complete file name. Parameters: lpsFileName [in] - File name to parse. dir [out] - Will contain directory name. Returns: Returns TRUE lpsFileName is not NULL, empty and is a full path.
|
protected |
BOOL32 CRhinoDirectoryManager::GetDefaultDirectory | ( | FileTypes | ft, |
ON_wString & | result | ||
) |
Description: Get default directory for various file I/O operations Parameters: ft [in] - File operation result [out] - Receives default directory name Returns: Returns TRUE if ft is valid otherwise returns FALSE.
|
protected |
BOOL32 CRhinoDirectoryManager::InsertSearchPath | ( | int | i, |
const wchar_t * | lps | ||
) |
Description: Insert directory to into search path Parameters: i [in] - Position in list to insert new directory. lps [in] - Directory to add. Returns: TRUE if index in range and lps points to a valid directory.
|
protected |
void CRhinoDirectoryManager::LoadProfile | ( | CRhinoProfileContext & | PC | ) |
|
protected |
Should only be called once by CRhinoApp::ExitInstance()
void CRhinoDirectoryManager::SaveProfile | ( | CRhinoProfileContext & | PC | ) |
const wchar_t* CRhinoDirectoryManager::SearchPath | ( | int | i | ) | const |
Description: Iterate user directories CRhinoFileUtilities::FindFile will look in. Parameters: i [in] - Directory index Returns: NULL if index is out of range otherwise full path to folder
int CRhinoDirectoryManager::SearchPathCount | ( | ) | const |
Description: Number of user directories CRhinoFileUtilities::FindFile will look in. Returns: Returns number of user folders CRhinoFileUtilities::FindFile will search when looking for files.
const wchar_t* CRhinoDirectoryManager::SearchPathCountEntry | ( | ) | const |
Description: Returns entry which can be used with RhinoApp().m_PC reading and writing functions. Returns: Entry which can be used with RhinoApp().m_PC reading and writing functions to get the number of custom search paths saved.
const wchar_t* CRhinoDirectoryManager::SearchPathEntryPrefix | ( | ) | const |
Description: Returns entry which can be used with RhinoApp().m_PC reading and writing functions. Returns: Entry which can be used with RhinoApp().m_PC reading and writing functions to get enumerate custom search path registry entries. The first entry will be SearchPathEntryPrefix() + L"00" up to count - 1;
const wchar_t* CRhinoDirectoryManager::SearchPathKey | ( | ) | const |
Description: Returns key which can be used with RhinoApp().m_PC reading and writing functions. Returns: Key which can be used with RhinoApp().m_PC reading and writing functions.
Description: Set default directory for various file I/O operations Parameters: ft [in] - File operation lpsDirectory [in] - New default directory for specified file operations Returns: Returns TRUE ft is valid and something placed in result.
BOOL32 CRhinoDirectoryManager::SetDefaultDirectoryFromFileName | ( | FileTypes | ft, |
const wchar_t * | lpsFileName | ||
) |
Description: Set default directory for various file I/O operations. Parameters: ft [in] - File operation lpsFileName [in] - MUST be a fully qualified path. Strips file name from end and calls SetDefaultDirectory Returns: Returns TRUE ft is valid and lpsFileName is not NULL or an empty string.
void CRhinoDirectoryManager::SetWorkingDirectory | ( | const wchar_t * | lpsDirectory | ) |
Description: Sets all file operations to the same default folder Parameters: lpsDirectory [in] - New default directory for all file operations
|
friend |
|
protected |
|
protected |