Rhino C++ API
8.13
|
#include <rhinoSdkPlugIn.h>
Public Member Functions | |
CRhinoFileExportPlugIn () | |
~CRhinoFileExportPlugIn () | |
virtual void | AddFileType (ON_ClassArray< CRhinoFileType > &ext_list, const CRhinoFileWriteOptions &options)=0 |
virtual void | DisplayOptionsDialog (HWND parent, const CRhinoFileType &fileType) |
virtual LRESULT | FileExportPlugInProc (UINT message, WPARAM wParam, LPARAM lParam) |
This will be used to extend this class without breaking the SDK. More... | |
virtual BOOL32 | GetFileDialogPreviewImageAndNotes (const wchar_t *lpsFileName, class CRhinoDib &dib, class CRhinoUiRichEditCtrl &ctrlNotes) |
virtual BOOL32 | OnPaintFileDialogPreviewImage (const wchar_t *lpsFileName, HWND hWnd) |
plugin_type | PlugInType () const override |
virtual int | WriteFile (const wchar_t *lpsFileName, int index, CRhinoDoc &doc, const CRhinoFileWriteOptions &options)=0 |
Public Member Functions inherited from CRhinoPlugIn | |
CRhinoPlugIn () | |
virtual | ~CRhinoPlugIn () |
virtual void | AddPagesToDocumentPropertiesDialog (CRhinoOptionsPageCollection &collection) |
virtual void | AddPagesToObjectPropertiesDialog (CRhinoPropertiesPanelPageCollection &collection) |
virtual void | AddPagesToOptionsDialog (CRhinoOptionsPageCollection &collection) |
virtual BOOL32 | AddToPlugInHelpMenu () const |
virtual BOOL32 | CallWriteDocument (const CRhinoFileWriteOptions &options) |
const ON_SimpleArray< CRhinoCommand * > & | CommandList () const |
bool | DisplayPlugInErrorDialog (const wchar_t *message) const |
const ON_UUID | GetLicenseId () |
virtual void | GetMenuMessageString (HMENU hMenu, UINT nID, ON_wString &wMessage) const |
BOOL32 | GetPlugInFileName (ON_wString &result) const |
BOOL32 | GetPlugInFolder (ON_wString &result) const |
virtual LPUNKNOWN | GetPlugInObjectInterface (const ON_UUID &iid) |
BOOL32 | GetPlugInRegistryKey (ON_wString &result) const |
class CRhPlugInPrivate * | GetPrivateData () |
Get extended data from plug-in. More... | |
BOOL32 | InsertPlugInItemToRhinoMenu (HMENU hTargetMenu, UINT index, MENUITEMINFO *pMi) |
BOOL32 | InsertPlugInMenuToRhinoMenu (HMENU hmenu, int index) |
BOOL32 | InsertPlugInMenuToRhinoMenu (HMENU hmenu, LPCTSTR title) |
bool | IsRhinoCommonPlugIn () const |
virtual void | LoadProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc) |
virtual const wchar_t * | LocalPlugInDescription () const |
virtual const wchar_t * | LocalPlugInName () const |
virtual BOOL32 | OnDisplayPlugInHelp (HWND hWnd) const |
virtual void | OnInitPlugInMenuPopups (WPARAM wparam, LPARAM lparam) |
virtual int | OnLoadPlugIn () |
virtual bool | OnLoadPlugInErrorString (ON_wString &msg) |
virtual BOOL32 | OnPlugInMenuCommand (WPARAM wparam) |
virtual void | OnRegisterPlugIn (bool bDone) |
virtual void | OnSaveAllSettings () |
virtual void | OnUnloadPlugIn () |
virtual const wchar_t * | PlugInDescription () const |
const wchar_t * | PlugInFileName () const |
virtual HICON | PlugInIcon (const ON_2iSize &size) |
virtual GUID | PlugInID () const =0 |
HINSTANCE | PlugInInstance () const |
virtual plugin_load_time | PlugInLoadTime () |
AFX_MODULE_STATE * | PlugInModuleState () const |
virtual const wchar_t * | PlugInName () const =0 |
virtual LRESULT | PlugInProc (UINT message, WPARAM wParam, LPARAM lParam) |
This will be used to extend this class without breaking the SDK. More... | |
void | PlugInTypeString (ON_wString &wResult) const |
virtual const wchar_t * | PlugInVersion () const =0 |
virtual BOOL32 | ReadDocument (CRhinoDoc &doc, ON_BinaryArchive &archive, const CRhinoFileReadOptions &options) |
virtual void | RemoveDocumentPropertiesDialogTabs (CRhinoDocumentPropertiesTabs &tab_manager) |
BOOL32 | RemovePlugInMenuFromRhino (HMENU hTargetMenu) |
virtual void | ResetMessageBoxes () |
virtual bool | SaveAsV3 (const CRhinoFileWriteOptions &options) |
virtual void | SaveProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc) |
void | SaveSettings () |
CRhinoSettings & | Settings () |
virtual BOOL32 | WriteDocument (CRhinoDoc &doc, ON_BinaryArchive &archive, const CRhinoFileWriteOptions &options) |
Public Member Functions inherited from ON_Object | |
ON_Object () ON_NOEXCEPT | |
ON_Object (const ON_Object &) | |
virtual | ~ON_Object () |
virtual ON_AggregateComponentStatus | AggregateComponentStatus () const |
bool | AttachUserData (class ON_UserData *pUserData) |
unsigned int | ClearAllComponentStates () const |
virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
virtual unsigned int | ClearComponentStates (ON_ComponentStatus states_to_clear) const |
void | CopyUserData (const ON_Object &source_object) |
unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
virtual void | DestroyRuntimeCache (bool bDelete=true) |
bool | DetachUserData (class ON_UserData *pUserData) |
virtual void | Dump (ON_TextLog &) const |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
bool | IsKindOf (const ON_ClassId *pClassId) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual void | MemoryRelocate () |
virtual ON_UUID | ModelObjectId () const |
void | MoveUserData (ON_Object &source_object) |
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
virtual ON::object_type | ObjectType () const |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual bool | Read (ON_BinaryArchive &binary_archive) |
virtual unsigned int | SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const |
virtual unsigned int | SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const |
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
int | SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace) |
virtual unsigned int | SizeOf () const |
bool | ThisIsNullptr (bool bSilentError) const |
void | TransformUserData (const class ON_Xform &xform) |
virtual bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) |
int | UserStringCount () const |
virtual bool | Write (ON_BinaryArchive &binary_archive) const |
Additional Inherited Members | |
Static Public Member Functions inherited from CRhinoPlugIn | |
static class CRhinoPlugInRecord * | GetLoadedPlugIn (ON_UUID uuid) |
static class CRhinoPlugInRecord * | GetPlugIn (const wchar_t *lpsFileName) |
static class CRhinoPlugInRecord * | GetPlugIn (int nIndex) |
static class CRhinoPlugInRecord * | GetPlugIn (ON_UUID uuid) |
static bool | GetPlugInList (class ON_ClassArray< CRhinoPlugInRecord > &result, int nPlugInTypes=0xFFFFFFFF) |
static int | LoadPlugIn (const ON_UUID &uuid, bool bQuietly, bool ignore_load_failed) |
static bool | PlugInConstructionPermitted () |
static int | PlugInCount () |
static const wchar_t * | PlugInTypeString (int type) |
static bool | SaveLoadProtectionToRegistry (ON_UUID plugin_uuid, int load_protection) |
Protected Member Functions inherited from CRhinoPlugIn | |
bool | GetLicense () |
bool | GetLicense (unsigned int capabilities, const wchar_t *text_mask) |
bool | GetLicenseOwner (ON_wString ®isteredOwner, ON_wString ®isteredOrganization) |
bool | IsValid (ON_TextLog *text_log=nullptr) const override |
bool | ReturnLicense () |
void | SetLicenseCapabilities (const wchar_t *format_string, CRhinoPlugIn::license_capabilities capabilities, ON_UUID licenseId) |
Protected Attributes inherited from CRhinoPlugIn | |
bool | m_is_rhino_common_plug_in |
class CRhinoFileExportPlugIn
Description: Derive plug-in control object from this class to create a file export plug-in. This class provides interfaces for extending the Rhino file save dialog, drawing custom preview images and writing files.
CRhinoFileExportPlugIn::CRhinoFileExportPlugIn | ( | ) |
CRhinoFileExportPlugIn::~CRhinoFileExportPlugIn | ( | ) |
|
pure virtual |
Description: When Rhino gets ready to display the save file dialog, it calls AddFileType() once for each loaded CMyGeometryExportPlugIn.
Parameters: ON_ClassArray<CRhinoFileType>& ext_list = Append your supported file types to this list const CRhinoFileWriteOptions& opts = File write options,
Example: If your file import plug-in writes "My Geometry Files" that have a ".mygeo" extension, then your AddToFileType(....) would look like
CMyGeometryExportPlugIn::AddToFileType( ON_ClassArray<CRhinoFileType>& ft_list, const CRhinoFileWriteOptions& opts) { CRhinoFileType ft( PlugInID(), L"My Geometry Files (*.mygeo)", L"mygeo"); ft_list.Append( ft); }
|
virtual |
Description: Called when AddFileType was called, a CRhinoFileType was added passing a true as the includeOptionsButtonInFileDialog constructor parameter and the file type is selected in the file save dialog.
Parameters: parent = File dialog box handle to be used as the parent for the plug-in provided options dialog box. const wchar_t* lpsFileName = Name of file int nFileTypeIndex = Index of file extension added to list in AddToFileType() callback. const CRhinoFileReadOptions& options = File read options
Remarks: The plug-in is responsible for opening lpsFile, reading it and creating document geometry.
|
virtual |
This will be used to extend this class without breaking the SDK.
|
virtual |
Description: When a user single clicks on a file in the file open dialog, Rhino displays a preview image of the file's contents and notes associated with the file. If you want to paint a preview image or modify the notes control then override this method and return true. If this method returns false Rhino will clear the preview image.
Returns: true = This plug-in painted preview and/or updated the notes false = This plug-in did not paint, let file dialog paint.
Parameters: lpsFileName = File name (full path) dib = 24 bit DIB which is the size of the preview image window. ctrlNotes = Read-only rich edit control to display file information in
|
virtual |
Description: OBSOLETE - See GetFileDialogPreviewImageAndNotes
When a user single clicks on a file in the file open dialog, Rhino displays a preview image of the file's contents. If you want to paint a preview image then override OnPaintFileDialogPreviewImage() and return true. If OnPaintFileDialogPreviewImage() returns false, then Rhino will clear the preview image. This method is only called if calling OnPaintFileDialogPreviewImageAndNotes() returns false.
Returns: true = This plug-in painted preview. false = This plug-in did not paint, let file dialog paint.
Parameters: const wchar_t* lpsFileName = File name (full path) HWND hWnd = Handle to preview window.
|
inlineoverridevirtual |
Description: Identifies the type of plug-in. Returns: Codes described above. Remarks: Rhino will attempt to cast the one and only plug-in derived object when loading a plug-in. If it does not cast correctly then the plug-in will not be allowed to load.
Implements CRhinoPlugIn.
|
pure virtual |
Description: Rhino calls WriteFile() to create document geometry.
Parameters: const wchar_t* lpsFileName = Name of file to write int nFileTypeIndex = Index of file extension added to list in AddToFileType() callback. CRhinoDoc& doc = Empty document containing nothing but a Default layer. const CRhinoFileWriteOptions& options = File read options
Returns: > 0 = File was successfully written 0 = Not able to write file for some reason < 0 = File writing canceled
Remarks: The plug-in is responsible for opening lpsFile and writing document data to it.