SDKBrowserContentNode Class Reference Library » Browser

#include <lib_browser.h>

Inheritance diagram for SDKBrowserContentNode:

详细描述

Browser content node. A wrapper for calling SDKBrowserContentNodeInfo 函数。

公共成员函数

Int32   Rename ( Int32 mode, const String &name)
Int32   NewFolder ( Int32 mode, const String &name, SDKBrowserContentNodeRef *folder=nullptr)
Int32   MoveFrom ( SDKBrowserContentNodeRef new_child, Int32 模式, CopyMoveCallback *callback, void *private_data, BaseThread *thread=nullptr)
Int32   CopyFrom ( SDKBrowserContentNodeRef new_child, Int32 mode, const String *rename, CopyMoveCallback *callback, void *private_data, BaseThread *thread=nullptr)
Int32   删除 ( Int32 模式, CopyMoveCallback *callback, void *private_data, BaseThread *thread=nullptr)
-  Public Member Functions inherited from SDKRTreeNode
SDKRTreeNodeRef   GetUp (void)
SDKRTreeNodeRef   GetDown (void)
SDKRTreeNodeRef   GetNext (void)
SDKRTreeNodeRef   GetPred (void)
void  InsertUnder ( SDKRTreeNodeRef parent)
void  移除 (void)
-  Public Member Functions inherited from SDKReferenceObject
void  add_reference (void)
void  remove_reference (void)

私有成员函数

  SDKBrowserContentNode ()
  ~SDKBrowserContentNode ()

Alloc/Free

static SDKBrowserContentNodeRef   Alloc ( SDKBrowserContentNodeInfo *info, SDKBrowserContentNodeRef parent=0)
static SDKBrowserContentNodeRef   AllocCategoryNode (const String &name, const String &local_path, const Filename &icon_file= Filename (), SDKBrowserContentNodeRef parent=0)
static void  FreeNodes ( Int32 plugin_id)

SDKBrowserNodeTypeID

enum   {
   TypeUnknown ,
   TypeCategory ,
   TypeFileSystem ,
   TypePreset ,
   TypeCatalog ,
   TypeMaterial
}

SDKBrowserNodeFlags

enum   {
   目录 ,
   VirtualDirectory ,
   VirtualFile ,
   链接 ,
   ReadOnly ,
   Flush ,
   NoPreview ,
   PrivateFlag0 ,
   PrivateFlag1 ,
   PrivateFlag2 ,
   PrivateFlag3 ,
   TargetNotFound ,
   KeepResident
}

SDKBrowserIconFlags

enum   {
   IconNone ,
   IconPreviewBitmap ,
   IconFolderOpen
}

SDKBrowserItemType

enum   {
   BasicItemType ,
   SpecificItemType ,
   HierarchicalItemType
}

SDKBrowserPluginIdentification

enum   { LazyIdentification }

Get

SDKBrowserContentNodeInfo GetNodeInfo ( Int32 plugin_id=0) const
Int32   GetTypeID (void) const
SDKBrowserPluginRef   GetPlugin ( UInt32 flags=0) const
String   GetName (void) const
String   GetTypeName ( Int32 mode) const
Int32   GetNodeURL ( SDKBrowserURL &url, UInt32 flags=0) const
SDKBrowserURL   GetNodeURL ( UInt32 flags=0, Int32 *idx=nullptr) const
Bool   GetFilename ( Filename &f, UInt32 flags=0) const
Bool   GetNodeTime ( UInt32 模式, LocalFileTime *out) const
LocalFileTime   GetNodeTime ( UInt32 mode= GE_FILETIME_MODIFIED ) const
UInt32   GetNodeFlags ( Int64 *out_size=nullptr) const

Checks

Bool   IsDirectory (void) const
Bool   IsLink (void) const
Bool   IsReadOnly (void) const
Bool   IsFlushed (void) const

Icon

SDKBrowserIcon GetIcon ( Int32 state=0, Int32 pref_wh=0) const

杂项

Int32   UpdateDirectory (void)
Int32   PrivateCall ( Int32 plugin_id, Int32 node_type, Int32 selector, void *data)

SDKBrowserOperation

enum   {
   CheckOperation ,
   PrepareOperation ,
   PerformOperation
}

SDKBrowserOperationResult

enum   {
   OperationSuccessful ,
   RenameNotPermitted ,
   MoveNotPermitted ,
   CopyNotPermitted ,
   DeleteNotPermitted ,
   NewFolderNotPermitted ,
   RenameError ,
   MoveError ,
   CopyError ,
   DeleteError ,
   UnsupportedNodeType ,
   UserCancelled
}

预置

BaseObject GetDefaultObject (void)
BaseDocument GetObjectPreset (void)
BaseMaterial GetMaterialPreset (void)
BaseTag GetTagPreset (void)
RenderData GetRenderDataPreset (void)
BaseShader GetShaderPreset (void)
BaseVideoPost GetVideoPostPreset (void)
GvNode GetXPressoPreset (void)
Int32   GetPresetSourcePluginID (void)

Member Enumeration Documentation

◆  anonymous enum

anonymous enum
Enumerator
TypeUnknown 
TypeCategory 

Unknown type.

TypeFileSystem 

Node is a category folder.

TypePreset 

Node represents a file or folder in the file system.

TypeCatalog 

Node represents some kind of setting/preset.

TypeMaterial 

Node is a catalog (that might link to another node).

Node is virtual material.

◆  anonymous enum

anonymous enum
Enumerator
Directory 

Is a directory (or generally speaking a tree branch).

VirtualDirectory 

Is a file that contains data that is displayed as children (e.g. a material library).

VirtualFile 

Is a directory that is represented as a file.

Link 

Is a link to a source node (e.g. a catalog node).

ReadOnly 

Cannot be modified.

Flush 

Likely to be deleted soon.

NoPreview 

Preview for this item is not be available (unknown file format).

PrivateFlag0 

Private flag 0 , free for plugins nodes to use.

PrivateFlag1 

Private flag 1 , free for plugins nodes to use.

PrivateFlag2 

Private flag 2 , free for plugins nodes to use.

PrivateFlag3 

Private flag 3 , free for plugins nodes to use.

TargetNotFound 

The file (node) linked by a catalog cannot be found.

KeepResident 

Keep resident.

◆  anonymous enum

anonymous enum
Enumerator
IconNone 

No icon.

IconPreviewBitmap 

Preview bitmap.

IconFolderOpen 

Folder open.

◆  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
LazyIdentification 

For SDKBrowserContentNode::GetPlugin() only.

◆  anonymous enum

anonymous enum
Enumerator
CheckOperation 

Check if the node (and its children) can be moved/copied/deleted (to the requested destination).

PrepareOperation 

Collect information about the number of items and their size.

PerformOperation 

Perform the move/copy/delete operation.

◆  anonymous enum

anonymous enum
Enumerator
OperationSuccessful 

Operation successful.

RenameNotPermitted 

Rename not permitted. 0x80000001 .

MoveNotPermitted 

Move not permitted. 0x80000002 .

CopyNotPermitted 

Copy not permitted. 0x80000004 .

DeleteNotPermitted 

Delete not permitted. 0x80000008 .

NewFolderNotPermitted 

New folder not permitted. 0x80000010 .

RenameError 

Rename error. 0x80000100 .

MoveError 

Move error. 0x80000200 .

CopyError 

Copy error. 0x80000400 .

DeleteError 

Delete error. 0x80000800 .

UnsupportedNodeType 

Unsupported node type. 0xa0000000L .

UserCancelled 

User canceled. 0xc0000000L

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

◆  SDKBrowserContentNode()

SDKBrowserContentNode () private

◆  ~SDKBrowserContentNode()

~ SDKBrowserContentNode () private

成员函数文档编制

◆  Alloc()

static SDKBrowserContentNodeRef Alloc ( SDKBrowserContentNodeInfo info ,
SDKBrowserContentNodeRef   parent = 0  
)
static

Allocates a content node.

参数
[in] info The info to allocate the node for.
[in] parent An optional parent node.
返回
The allocated content node, or nullptr if the allocation failed.

◆  AllocCategoryNode()

static SDKBrowserContentNodeRef AllocCategoryNode ( const String name ,
const String local_path ,
const Filename icon_file = Filename() ,
SDKBrowserContentNodeRef   parent = 0  
)
static

Allocates a category node.

参数
[in] name The category name.
[in] local_path The local path.
[in] icon_file The icon filename.
[in] parent An optional parent node.
返回
The allocated category node, or nullptr if the allocation failed.

◆  FreeNodes()

static void FreeNodes ( Int32   plugin_id )
static

Frees all SDKBrowserContentNodeInfo of the plugin and remove the nodes from the tree.

参数
[in] plugin_id The node plugin ID to free.

◆  GetNodeInfo()

SDKBrowserContentNodeInfo * GetNodeInfo ( Int32   plugin_id = 0 ) const

Retrieves the SDKBrowserContentNodeInfo for the node.

参数
[in] plugin_id The node plugin ID.
返回
The node info, or nullptr .

◆  GetTypeID()

Int32 GetTypeID ( void  ) const

返回 SDKBrowserContentNodeInfo::GetTypeID() for the node.

◆  GetPlugin()

SDKBrowserPluginRef GetPlugin ( UInt32   flags = 0 ) const

Returns SDKBrowserContentNodeInfo::GetPlugin(flags) for the node.

◆  GetName()

String GetName ( void  ) const

返回 SDKBrowserContentNodeInfo::GetName() for the node.

◆  GetTypeName()

String GetTypeName ( Int32   mode ) const

Returns SDKBrowserContentNodeInfo::GetTypeName(mode) for the node.

◆  GetNodeURL() [1/2]

Int32 GetNodeURL ( SDKBrowserURL url ,
UInt32   flags = 0  
) const

Returns SDKBrowserContentNodeInfo::GetNodeURL(url, flags) for the node.

◆  GetNodeURL() [2/2]

SDKBrowserURL GetNodeURL ( UInt32   flags = 0 ,
Int32 idx = nullptr  
) const

Retrieves the URL of the content node.

参数
[in] flags Can be set to the optional flag LinkThrough .
[out] idx Reserved.
返回
The URL of the content node.

◆  GetFilename()

Bool GetFilename ( Filename f ,
UInt32   flags = 0  
) const

Retrieves the file name of the node, if applicable.

参数
[out] f Assigned the file name of the node.
[in] flags Can be set to the optional flag LinkThrough .
返回
true if the node is a filename, false if it is something else (e.g. a preset node).

◆  GetNodeTime() [1/2]

Bool GetNodeTime ( UInt32   mode ,
LocalFileTime out  
) const

Returns SDKBrowserContentNodeInfo::GetNodeTime(mode, out) for the node.

◆  GetNodeTime() [2/2]

LocalFileTime GetNodeTime ( UInt32   mode = GE_FILETIME_MODIFIED ) const

Gets the node time specified by mode .

参数
[in] mode The mode: GE_FILETIME
返回
The node time.

◆  GetNodeFlags()

UInt32 GetNodeFlags ( Int64 out_size = nullptr ) const

返回 SDKBrowserContentNodeInfo::GetNodeFlags() for the node.

◆  IsDirectory()

Bool IsDirectory ( void  ) const

Checks if the node is a directory or a tree branch.

返回
true if the node is a directory or tree branch, otherwise false .

◆  IsLink()

Bool IsLink ( void  ) const

Checks if the node is a link to another node. (Call GetNodeURL() with LinkThrough flag to get the destination URL.)

返回
true if the node is a link, otherwise false .

◆  IsReadOnly()

Bool IsReadOnly ( void  ) const

Checks if the node is read-only.

返回
true if the node is read-only, otherwise false .

◆  IsFlushed()

Bool IsFlushed ( void  ) const

Checks if the node is going to be flushed. If so do not create new database entries for it.

返回
true if the node is about to be flushed, otherwise false .

◆  GetIcon()

SDKBrowserIcon * GetIcon ( Int32   state = 0 ,
Int32   pref_wh = 0  
) const

Returns SDKBrowserContentNodeInfo::GetIcon(state, pref_wh) for the node.

◆  UpdateDirectory()

Int32 UpdateDirectory ( void  )

返回 SDKBrowserContentNodeInfo::UpdateDirectory() for the node.

◆  PrivateCall()

Int32 PrivateCall ( Int32   plugin_id ,
Int32   node_type ,
Int32   selector ,
void *  data  
)

Returns SDKBrowserContentNodeInfo::PrivateCall(plugin_id, node_type, selector, data) for the node.

◆  Rename()

Int32 Rename ( Int32   mode ,
const String name  
)

Returns SDKBrowserContentNodeInfo::Rename(mode, name) for the node.

◆  NewFolder()

Int32 NewFolder ( Int32   mode ,
const String name ,
SDKBrowserContentNodeRef folder = nullptr  
)

Returns SDKBrowserContentNodeInfo::NewFolder(mode, name, folder) for the node.

◆  MoveFrom()

Int32 MoveFrom ( SDKBrowserContentNodeRef   new_child ,
Int32   mode ,
CopyMoveCallback callback ,
void *  private_data ,
BaseThread thread = nullptr  
)

Returns SDKBrowserContentNodeInfo::MoveFrom(new_child, mode, callback, private_data, thread) for the node.

◆  CopyFrom()

Int32 CopyFrom ( SDKBrowserContentNodeRef   new_child ,
Int32   mode ,
const String rename ,
CopyMoveCallback callback ,
void *  private_data ,
BaseThread thread = nullptr  
)

Returns SDKBrowserContentNodeInfo::CopyFrom(new_child, mode, rename, callback, private_data, thread) for the node.

◆  Delete()

Int32 删除 ( Int32   mode ,
CopyMoveCallback callback ,
void *  private_data ,
BaseThread thread = nullptr  
)

Returns SDKBrowserContentNodeInfo::Delete(mode, callback, private_data, thread) for the node.

◆  GetDefaultObject()

BaseObject * GetDefaultObject ( void  )

Retrieves the object of default nodes. (Wrapper for PrivateCall() .)

返回
The object of default nodes. The caller owns the pointed object.

◆  GetObjectPreset()

BaseDocument * GetObjectPreset ( void  )

Retrieves the document with presets for preset nodes. (Wrapper for PrivateCall() .)

返回
The document with presets for preset nodes. The caller owns the pointed document.

◆  GetMaterialPreset()

BaseMaterial * GetMaterialPreset ( void  )

Retrieves the material for preset nodes. (Wrapper for PrivateCall() .)

返回
The material for preset nodes. The caller owns the pointed material.

◆  GetTagPreset()

BaseTag * GetTagPreset ( void  )

Retrieves the tag for preset nodes. (Wrapper for PrivateCall() .)

返回
The tag for preset nodes. The caller owns the pointed tag.

◆  GetRenderDataPreset()

RenderData * GetRenderDataPreset ( void  )

Retrieves the render data for preset nodes. (Wrapper for PrivateCall() .)

返回
The render data for preset nodes. The caller owns the pointed render data.

◆  GetShaderPreset()

BaseShader * GetShaderPreset ( void  )

Retrieves the shader for preset nodes. (Wrapper for PrivateCall() .)

返回
The shader for preset nodes. The caller owns the pointed shader.

◆  GetVideoPostPreset()

BaseVideoPost * GetVideoPostPreset ( void  )

Retrieves the video post for preset nodes. (Wrapper for PrivateCall() .)

返回
The video post for preset nodes. The caller owns the pointed video post.

◆  GetXPressoPreset()

GvNode * GetXPressoPreset ( void  )

Retrieves the Xpresso node for preset nodes. (Wrapper for PrivateCall() .)

返回
The XPresso node for preset nodes. The caller owns the pointed XPresso node.

◆  GetPresetSourcePluginID()

Int32 GetPresetSourcePluginID ( void  )

Gets the ID of the preset source plugin.

返回
The ID of the preset source plugin.