Rhino C++ API  8.6
Public Member Functions | List of all members
CRhinoFileType Class Reference

#include <rhinoSdkPlugIn.h>

Public Member Functions

 CRhinoFileType ()
 
 CRhinoFileType (const CRhinoFileType &src)
 
 CRhinoFileType (GUID guid, const wchar_t *lpsDescription)
 
 CRhinoFileType (GUID guid, const wchar_t *lpsDescription, const wchar_t *lpsExt, bool includeOptionsButtonInFileDialog=false)
 
 CRhinoFileType (GUID guid, const wchar_t *lpsDescription, const wchar_t *lpsExt1, const wchar_t *lpsExt2, bool includeOptionsButtonInFileDialog=false)
 
 CRhinoFileType (GUID guid, const wchar_t *lpsDescription, const wchar_t *lpsExt1, const wchar_t *lpsExt2, const wchar_t *lpsExt3, bool includeOptionsButtonInFileDialog=false)
 
 ~CRhinoFileType ()
 
void AddFileTypeExtension (const wchar_t *lpsExt)
 
bool DisplayOptionsDialog () const
 
const wchar_t * FileTypeDescription () const
 
void FileTypeDescription (const wchar_t *lpsDescription)
 
const wchar_t * FileTypeExtension (int) const
 
GUID FileTypePlugInID () const
 
int GetStoredFileTypeIndex (int value_if_not_stored) const
 
CRhinoFileTypeoperator= (const CRhinoFileType &src)
 
void SetDisplayOptionsDialog (bool value)
 
void SetFileTypeIndex (int index)
 
void SetFileTypePlugInID (GUID guid)
 

Detailed Description

Used by CRhinoFileImport and CRhinoFileExport file plug-ins to add file extensions to the standard Rhino file dialog box.

Constructor & Destructor Documentation

◆ CRhinoFileType() [1/6]

CRhinoFileType::CRhinoFileType ( )

◆ CRhinoFileType() [2/6]

CRhinoFileType::CRhinoFileType ( const CRhinoFileType src)

◆ CRhinoFileType() [3/6]

CRhinoFileType::CRhinoFileType ( GUID  guid,
const wchar_t *  lpsDescription 
)

Description: constructor Parameters: GUID guid = Plug-in ID of the CRhinoFileImportPlugIn/CRhinoFileExportPlugIn const wchar_t* lpsDescription = Description of the file displayed in the open file dialog

◆ CRhinoFileType() [4/6]

CRhinoFileType::CRhinoFileType ( GUID  guid,
const wchar_t *  lpsDescription,
const wchar_t *  lpsExt,
bool  includeOptionsButtonInFileDialog = false 
)

Description: constructor Parameters: GUID guid = Plug-in ID of the CRhinoFileImportPlugIn/CRhinoFileExportPlugIn const wchar_t* lpsDescription = Description of the file displayed in the open file dialog const wchar_t* lpsExt = file extension (without the "*.") includeOptionsButtonInFileDialog = If true the file open/save dialog will include a Options button when this file type is selected and will call CRhinoFileImportPlugIn::DisplayOptionsDialog or CRhinoFileExportPlugIn::DisplayOptionsDialog as appropriate when the button is clicked on.

◆ CRhinoFileType() [5/6]

CRhinoFileType::CRhinoFileType ( GUID  guid,
const wchar_t *  lpsDescription,
const wchar_t *  lpsExt1,
const wchar_t *  lpsExt2,
bool  includeOptionsButtonInFileDialog = false 
)

Description: constructor Parameters: GUID guid = Plug-in ID of the CRhinoFileImportPlugIn/CRhinoFileExportPlugIn const wchar_t* lpsDescription= Description of the file displayed in the open file dialog const wchar_t* lpsExt1 = file extension (without the "*.") const wchar_t* lpsExt2 = another file extension associated with this file type includeOptionsButtonInFileDialog = If true the file open/save dialog will include a Options button when this file type is selected and will call CRhinoFileImportPlugIn::DisplayOptionsDialog or CRhinoFileExportPlugIn::DisplayOptionsDialog as appropriate when the button is clicked on.

◆ CRhinoFileType() [6/6]

CRhinoFileType::CRhinoFileType ( GUID  guid,
const wchar_t *  lpsDescription,
const wchar_t *  lpsExt1,
const wchar_t *  lpsExt2,
const wchar_t *  lpsExt3,
bool  includeOptionsButtonInFileDialog = false 
)

Description: constructor Parameters: GUID guid = Plug-in ID of the CRhinoFileImportPlugIn/CRhinoFileExportPlugIn const wchar_t* lpsDescription= Description of the file displayed in the open file dialog const wchar_t* lpsExt1 = file extension (without the "*.") const wchar_t* lpsExt2 = alternate file extension associated with this file type const wchar_t* lpsExt3 = another file extension associated with this file type includeOptionsButtonInFileDialog = If true the file open/save dialog will include a Options button when this file type is selected and will call CRhinoFileImportPlugIn::DisplayOptionsDialog or CRhinoFileExportPlugIn::DisplayOptionsDialog as appropriate when the button is clicked on.

◆ ~CRhinoFileType()

CRhinoFileType::~CRhinoFileType ( )

Member Function Documentation

◆ AddFileTypeExtension()

void CRhinoFileType::AddFileTypeExtension ( const wchar_t *  lpsExt)

Description: Add file extension or alternate if called more than once.

◆ DisplayOptionsDialog()

bool CRhinoFileType::DisplayOptionsDialog ( ) const

Description: If true then the file open/save dialog will include an options button and call the associated plug-in's DisplayOptionsDialog when the button is clicked. Returns: Returns true then the file open/save dialog will include an options button and call the associated plug-in's DisplayOptionsDialog when the button is clicked.

◆ FileTypeDescription() [1/2]

const wchar_t* CRhinoFileType::FileTypeDescription ( ) const

Description: Get description associated with this file extensions

◆ FileTypeDescription() [2/2]

void CRhinoFileType::FileTypeDescription ( const wchar_t *  lpsDescription)

Description: Set file description (or you can set it in the constructor)

◆ FileTypeExtension()

const wchar_t* CRhinoFileType::FileTypeExtension ( int  ) const

Description: Get file extension (returns NULL if index is out of range)

◆ FileTypePlugInID()

GUID CRhinoFileType::FileTypePlugInID ( ) const

Description: ID of the plug-in that reads these files (or you can set it in the constructor) Returns: GUID = Plug-in ID that reads/writes this file type

◆ GetStoredFileTypeIndex()

int CRhinoFileType::GetStoredFileTypeIndex ( int  value_if_not_stored) const

Description: Get index value saved with SetFileTypeIndex. This is used for figuring out the index of a file type that a plug-in originally defined because the filter list on the file open/save dialogs re-sort indices based what we think is the best way to sort on a given day. Currently we are sorting alphabetically by file description. Parameters: value_if_not_stored = value to return if SetFileTypeIndex was never called for this class instance

◆ operator=()

CRhinoFileType& CRhinoFileType::operator= ( const CRhinoFileType src)

◆ SetDisplayOptionsDialog()

void CRhinoFileType::SetDisplayOptionsDialog ( bool  value)

Description: Call this method to tell Rhino if the file type plug-in supports the options feature.

◆ SetFileTypeIndex()

void CRhinoFileType::SetFileTypeIndex ( int  index)

◆ SetFileTypePlugInID()

void CRhinoFileType::SetFileTypePlugInID ( GUID  guid)

Description: Set ID of the plug-in that reads these files (or you can set it in the constructor) Parameter: GUID guid = ID of plug-in that reads this file type