SDKBrowserContentNode Class Reference

#include <lib_browser.h>

Inheritance diagram for SDKBrowserContentNode:

Detailed Description

Browser content node. A wrapper for calling SDKBrowserContentNodeInfo functions.

Public Member Functions

Int32 Rename (Int32 mode, const String &name)
 
Int32 NewFolder (Int32 mode, const String &name, SDKBrowserContentNodeRef *folder=0)
 
Int32 MoveFrom (SDKBrowserContentNodeRef new_child, Int32 mode, 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 Delete (Int32 mode, 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 Remove (void)
 
- Public Member Functions inherited from SDKReferenceObject
void add_reference (void)
 
void remove_reference (void)
 

Private Member Functions

 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  {
  Directory,
  VirtualDirectory,
  VirtualFile,
  Link,
  ReadOnly,
  Flush,
  NoPreview,
  PrivateFlag0,
  PrivateFlag1,
  PrivateFlag2,
  PrivateFlag3,
  TargetNotFound,
  KeepResident
}
 

SDKBrowserIconFlags

enum  {
  IconNone,
  IconPreviewBitmap,
  IconFolderOpen
}
 

SDKBrowserItemType

enum  {
  BasicItemType,
  SpecificItemType,
  HierarchicalItemType
}
 

SDKBrowserPluginIdentification

enum  { LazyIdentification }
 

Get

SDKBrowserContentNodeInfoGetNodeInfo (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=0) const
 
Bool GetFilename (Filename &f, UInt32 flags=0) const
 
Bool GetNodeTime (UInt32 mode, LocalFileTime *out) const
 
LocalFileTime GetNodeTime (UInt32 mode=GE_FILETIME_MODIFIED) const
 
UInt32 GetNodeFlags (Int64 *out_size=0) const
 

Checks

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

Icon

SDKBrowserIconGetIcon (Int32 state=0, Int32 pref_wh=0) const
 

Miscellaneous

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
}
 

Preset

BaseObjectGetDefaultObject (void)
 
BaseDocumentGetObjectPreset (void)
 
BaseMaterialGetMaterialPreset (void)
 
BaseTagGetTagPreset (void)
 
RenderDataGetRenderDataPreset (void)
 
BaseShaderGetShaderPreset (void)
 
BaseVideoPostGetVideoPostPreset (void)
 
GvNodeGetXPressoPreset (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

Constructor & Destructor Documentation

◆ SDKBrowserContentNode()

SDKBrowserContentNode ( )
private

◆ ~SDKBrowserContentNode()

~SDKBrowserContentNode ( )
private

Member Function Documentation

◆ Alloc()

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

Allocates a content node.

Parameters
[in]infoThe info to allocate the node for.
[in]parentAn optional parent node.
Returns
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.

Parameters
[in]nameThe category name.
[in]local_pathThe local path.
[in]icon_fileThe icon filename.
[in]parentAn optional parent node.
Returns
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.

Parameters
[in]plugin_idThe node plugin ID to free.

◆ GetNodeInfo()

SDKBrowserContentNodeInfo* GetNodeInfo ( Int32  plugin_id = 0) const

Retrieves the SDKBrowserContentNodeInfo for the node.

Parameters
[in]plugin_idThe node plugin ID.
Returns
The node info, or nullptr.

◆ GetTypeID()

Int32 GetTypeID ( void  ) const

◆ GetPlugin()

SDKBrowserPluginRef GetPlugin ( UInt32  flags = 0) const

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

◆ GetName()

String GetName ( void  ) const

Returns 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 = 0 
) const

Retrieves the URL of the content node.

Parameters
[in]flagsCan be set to the optional flag LinkThrough.
[out]idxReserved.
Returns
The URL of the content node.

◆ GetFilename()

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

Retrieves the file name of the node, if applicable.

Parameters
[out]fAssigned the file name of the node.
[in]flagsCan be set to the optional flag LinkThrough.
Returns
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.

Parameters
[in]modeThe mode: GE_FILETIME
Returns
The node time.

◆ GetNodeFlags()

UInt32 GetNodeFlags ( Int64 out_size = 0) const

◆ IsDirectory()

Bool IsDirectory ( void  ) const

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

Returns
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.)

Returns
true if the node is a link, otherwise false.

◆ IsReadOnly()

Bool IsReadOnly ( void  ) const

Checks if the node is read-only.

Returns
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.

Returns
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  )

◆ 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 = 0 
)

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 Delete ( 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().)

Returns
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().)

Returns
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().)

Returns
The material for preset nodes. The caller owns the pointed material.

◆ GetTagPreset()

BaseTag* GetTagPreset ( void  )

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

Returns
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().)

Returns
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().)

Returns
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().)

Returns
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().)

Returns
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.

Returns
The ID of the preset source plugin.