SDKBrowserPluginInterfaceInfo Class Reference

abstract

#include <lib_browser.h>

详细描述

Interface for browser plugins.

公共成员函数

  SDKBrowserPluginInterfaceInfo ()
SDKBrowserPluginRef   GetPlugin (void) const

Private Attributes

SDKBrowserPluginRef   plugin

Friends

class  SDKBrowser

SDKBrowserTab

enum   {
   PreviewTab ,
   InfoTab ,
   PrivateTab0 ,
   PrivateTab1 ,
   PrivateTab2 ,
   PrivateTab3 ,
   PrivateTab4 ,
   PrivateTab5 ,
   PrivateTab6 ,
   PrivateTab7
}

SDKBrowserItemType

enum   {
   BasicItemType ,
   SpecificItemType ,
   HierarchicalItemType
}

SDKBrowserIdentification

enum   { SlowIdentification }

SDKBrowserOpen

enum   { Merge }

Plugin ID

virtual Int32   GetPluginID ( String *plugin_name=nullptr)=0

Identify

virtual Bool   Identify (const SDKBrowserURL &url, UChar *probe, Int32 size, UInt32 flags)=0

类型

virtual String   GetTypeName (const SDKBrowserContentNodeRef node, const SDKBrowserURL *url, Int32 mode)=0
virtual void  GetTypeNames ( Int32 模式, maxon::BaseArray < String > &strings)=0

Preview Bitmap

virtual SDKBrowserPreviewData OpenPreviewBitmap ( BaseThread *thread, const SDKBrowserContentNodeRef node, const SDKBrowserURL *url, SDKBrowserPreviewInfo *info)=0
virtual void  ClosePreviewBitmap ( SDKBrowserPreviewData *data)=0
virtual BaseBitmap GetPreviewBitmap ( SDKBrowserPreviewData *data, Int32 w, Int32 h, Int32 quality)=0

Preview Dialog

virtual SubDialog OpenPreviewDialog ( SDKBrowserContentNodeRef node, Int32 tab_id)=0
virtual Int32   ClosePreviewDialog ( SDKBrowserContentNodeRef node, SubDialog *s)=0
virtual Int32   UpdatePreviewDialog ( SDKBrowserContentNodeRef node, SubDialog *s)=0

Open

virtual Bool   Open ( SDKBrowserContentNodeRef node, const SDKBrowserURL *url, Int32 flags)=0

Icon

virtual SDKBrowserIcon GetIcon (const SDKBrowserURL &url, Int32 pref_wh=0)=0

Member Enumeration Documentation

◆  anonymous enum

anonymous enum
Enumerator
PreviewTab 

Preview tab.

InfoTab 

Info tab.

PrivateTab0 

Plugin specific tab 0.

PrivateTab1 

Plugin specific tab 1.

PrivateTab2 

Plugin specific tab 2.

PrivateTab3 

Plugin specific tab 3.

PrivateTab4 

Plugin specific tab 4.

PrivateTab5 

Plugin specific tab 5.

PrivateTab6 

Plugin specific tab 6.

PrivateTab7 

Plugin specific tab 7.

◆  anonymous enum

anonymous enum
Enumerator
BasicItemType 

The basic item type (i.e. image, or sound file); this string is language dependent.

SpecificItemType 

More specific item type, like "JPEG image file"; this string is language dependent.

HierarchicalItemType 

Hierarchical item type.

◆  anonymous enum

anonymous enum
Enumerator
SlowIdentification 

You are allowed to try the best possible identification, even if it is slow.

◆  anonymous enum

anonymous enum
Enumerator
Merge 

Merge nodes.

构造函数 & 析构函数文档编制

◆  SDKBrowserPluginInterfaceInfo()

SDKBrowserPluginInterfaceInfo ( )

Constructor.

成员函数文档编制

◆  GetPlugin()

SDKBrowserPluginRef GetPlugin ( void  ) const

Retrieves the corresponding plugin.

返回
The browser plugin reference.

◆  GetPluginID()

virtual Int32 GetPluginID ( String plugin_name = nullptr )
pure virtual

Called to retrieve the ID and name of the plugin.

参数
[in] plugin_name Assigned the name of the plugin, unless the pointer is nullptr .
返回
A unique plugin ID. Must be obtained from http://www.plugincafe.com

◆  Identify()

virtual Bool Identify ( const SDKBrowserURL url ,
UChar probe ,
Int32   size ,
UInt32   flags  
)
pure virtual

Called to identify a file.

参数
[in] url The file URL.
[in] probe The start of a small chunk of data from the start of the file for testing this file type. Usually the probe size is 1024 bytes.
[in] size The probe size.
[in] flags The identification flags. See SDKBrowserIdentification above.
返回
true if the plugin can handle the file, otherwise false .

◆  GetTypeName()

virtual String GetTypeName ( const SDKBrowserContentNodeRef   node ,
const SDKBrowserURL url ,
Int32   mode  
)
pure virtual

Called to retrieve the kind of data that is handled by the plugin. For example "Image", "Scene", "Material" etc.

参数
[in] node A browser node. Can be nullptr .
[in] url A URL. Can be nullptr .
[in] mode The mode. See SDKBrowserItemType above.
返回
A string describing the data, according to mode .

◆  GetTypeNames()

virtual void GetTypeNames ( Int32   mode ,
maxon::BaseArray < String > &  strings  
)
pure virtual

Called to retrieve the descriptions for all kinds of data that will be handled by the plugin.

参数
[in] mode The mode. See SDKBrowserItemType above.
[out] strings Strings to fill.

◆  OpenPreviewBitmap()

virtual SDKBrowserPreviewData * OpenPreviewBitmap ( BaseThread thread ,
const SDKBrowserContentNodeRef   node ,
const SDKBrowserURL url ,
SDKBrowserPreviewInfo info  
)
pure virtual

Called to open a preview bitmap.

参数
[in] thread The current thread.
[in] node A node.
[in] url A URL.
[in] info The preview information.
返回
The preview handle.

◆  ClosePreviewBitmap()

virtual void ClosePreviewBitmap ( SDKBrowserPreviewData data )
pure virtual

Called to close the preview bitmap in data.

参数
[in] data A preview handle.

◆  GetPreviewBitmap()

virtual BaseBitmap * GetPreviewBitmap ( SDKBrowserPreviewData data ,
Int32   w ,
Int32   h ,
Int32   quality  
)
pure virtual

Called to retrieve the preview bitmap from a handle.

参数
[in] data The preview handle.
[in] w The width in pixels.
[in] h The height in pixels.
[in] quality The quality. See SDKBrowserPreviewQuality above.
返回
The preview bitmap. The caller owns the returned bitmap and has to call BaseBitmap::Free() to free it.

◆  OpenPreviewDialog()

virtual SubDialog * OpenPreviewDialog ( SDKBrowserContentNodeRef   node ,
Int32   tab_id  
)
pure virtual

Called to retrieve a plugin specific preview sub-dialog for the content node preview.

参数
[in] node A node.
[in] tab_id The tab ID. See SDKBrowserTab above.
返回
The plugin preview sub-dialog. Inherit this from SDKBrowserPreviewDialog .

◆  ClosePreviewDialog()

virtual Int32 ClosePreviewDialog ( SDKBrowserContentNodeRef   node ,
SubDialog s  
)
pure virtual

Called when the preview sub-dialog is not used anymore.

参数
[in] node A node.
[in] s The sub-dialog to close.
返回
The active tab ID. Used to open the next preview dialog in the same tab.

◆  UpdatePreviewDialog()

virtual Int32 UpdatePreviewDialog ( SDKBrowserContentNodeRef   node ,
SubDialog s  
)
pure virtual

Called to update the current preview sub-dialog.

参数
[in] node A node.
[in] s The sub-dialog to update.
返回
The active tab ID. Used to open the next preview dialog in the same tab.

◆  Open()

virtual Bool Open ( SDKBrowserContentNodeRef   node ,
const SDKBrowserURL url ,
Int32   flags  
)
pure virtual

Called to open a content node.

参数
[in] node A node.
[in] url A URL.
[in] flags The flags. See SDKBrowserOpen above.
返回
true if successful, otherwise false .

◆  GetIcon()

virtual SDKBrowserIcon * GetIcon ( const SDKBrowserURL url ,
Int32   pref_wh = 0  
)
pure virtual

Called to retrieve an icon for a kind of file (does not have to be a preview for this specific file).

参数
[in] url A URL.
[in] pref_wh The preferred width/height of the icon.
返回
The browser icon for url . The caller owns the returned icon and has to call SDKBrowserIcon::Free() to free it.

Friends And Related Function Documentation

◆  SDKBrowser

friend class SDKBrowser
friend

Member Data Documentation

◆  plugin

SDKBrowserPluginRef plugin
private