#include <lib_browser.h>
The main browser library class.
Private Member Functions | |
SDKBrowser () | |
~SDKBrowser () | |
SDKBrowserCategory | |
enum | { CategoryPresetNodes, CategoryCatalogNodes, CategoryDriveNodes, CategoryRecentNodes, CategorySearchNodes, ddumdumdimdum } |
SDKBrowserFind | |
enum | { FindExactMatch, FindBestMatch, ForceDirectoryUpdate } |
SDKBrowserFileSystemTypes | |
enum | { Computer, Drive, DriveCD, Folder, FolderOpen, FolderPresets, FolderCatalogs, FolderSearch, Document, ThreeDFile, ImageFile, MovieFile, Preset } |
SDKBrowserPresetDb | |
enum | { UserPresetDb, InvalidPresetDb } |
SDKBrowserPresetLibrary | |
enum | { ReadOnlyPresetLibrary, SystemPresetLibrary, IgnoreROPresetLibrary } |
SDKBrowserPreview | |
enum | { PreviewReplace, PreviewAppend } |
InsertNodeFromDataBase Callback | |
typedef SDKBrowserContentNodeRef | InsertNodeFromDataBase(SDKBrowserContentNodeRef parent, SDKBrowserContentNodeRef existing_node, const SDKBrowserURL &url, const String &name, UInt32 flags, Int32 db_index, void *user_data) |
Open New Browser | |
static Bool | OpenNewBrowser (const SDKBrowserURL &path, UInt32 flags=0) |
static Bool | OpenNewBrowserWithTitle (const SDKBrowserURL &path, const String &custom_title=String(), UInt32 flags=0) |
Category Node | |
static SDKBrowserContentNodeRef | GetCategoryNode (Int32 where) |
Icon | |
static SDKBrowserIcon * | GetIcon (Int32 id, Int32 pref_wh=0) |
static SDKBrowserIcon * | GetIcon (const SDKBrowserURL &url, SDKBrowserPluginRef plugin=0, Int32 flags=0, LocalFileTime *preview_time=0) |
static SDKBrowserIcon * | GetPreviewIcon (SDKBrowserContentNodeRef content, Int32 pref_wh, Int32 flags=SDKBrowserContentNode::IconPreviewBitmap) |
static SDKBrowserIcon * | CreateIcon (BaseBitmap *bm, Bool dont_free) |
static void | ReleaseIcon (SDKBrowserIcon *icon) |
Register Browser Plugin | |
static Bool | RegisterBrowserPlugin (SDKBrowserPluginInterfaceInfo *plugin_info, UInt32 flags=0) |
static Bool | UnregisterBrowserPlugin (SDKBrowserPluginInterfaceInfo *plugin_info) |
Register Preset Library | |
static Int32 | RegisterPresetLibrary (const SDKBrowserURL &domain, const String &name, const Filename &f) |
static Bool | UnregisterPresetLibrary (Int32 db_index, const Filename &f) |
Database Index | |
static Int32 | GetDbIndex (const SDKBrowserURL &url, UInt32 flags=0) |
Preset | |
static Bool | ExistsPreset (const SDKBrowserURL &url) |
static Bool | LoadPreset (Int32 db_index, const SDKBrowserURL &url, Int32 &plugin_id, BaseContainer *bc, void **data, Int *length) |
static Bool | SavePreset (Int32 db_index, const SDKBrowserURL &url, Int32 plugin_id, const BaseContainer *bc, void *data, Int length) |
static Bool | DeletePreset (Int32 db_index, const SDKBrowserURL &url, Int32 plugin_id) |
static Bool | CopyPreset (const SDKBrowserURL &src, const SDKBrowserURL &dst) |
static Bool | GetPresetName (Int32 db_index, const SDKBrowserURL &url, Int32 language_id, String &out_name) |
static Bool | SetPresetName (Int32 db_index, const SDKBrowserURL &url, Int32 language_id, const String &name) |
static Bool | ChangePresetURL (Int32 db_index, const SDKBrowserURL &url, const SDKBrowserURL &new_url, Int32 plugin_id) |
static Bool | GetPresetAnnotation (Int32 db_index, const SDKBrowserURL &url, String &annotation) |
static Bool | SetPresetAnnotation (Int32 db_index, const SDKBrowserURL &url, const String &annotation) |
static Bool | SetPresetPreview (Int32 db_index, const SDKBrowserURL &url, Int32 mode, Int32 preview_quality, BaseBitmap *bm, const LocalFileTime *lft) |
static BaseBitmap * | GetPresetPreview (Int32 db_index, const SDKBrowserURL &url, Int32 frame_idx) |
static Bool | GetPresetAnimationData (Int32 db_index, const SDKBrowserURL &url, Int32 *first_frame_idx, Int32 *last_frame_idx, Float *fps) |
static Bool | SetPresetAnimationData (Int32 db_index, const SDKBrowserURL &url, Int32 first_frame_idx, Int32 last_frame_idx, Float fps) |
static Bool | SavePresetObject (const SDKBrowserURL &url, BaseList2D *bl) |
static Bool | ReadNodesFromDatabase (Int32 db_index, const SDKBrowserURL &base_url, SDKBrowserContentNodeRef base_node, InsertNodeFromDataBase *callback, void *user_data) |
static Bool | CreatePresetNode (Int32 db_index, const SDKBrowserURL &url, Int32 plugin_id, Int32 mode=0) |
static Bool | SetPresetSortOrder (SDKBrowserContentNodeRef *nodes, Int32 cnt) |
static Bool | MountPresetLibrary (const Filename &fn, UInt32 flags, SDKBrowserURL *domain=nullptr) |
Miscellaneous | |
static void | UpdateNotification (SDKBrowserContentNodeRef node, Int32 flags=0) |
static Int32 | PreviewDialogMisc (SubDialog *dlg, void *&private_data, Int32 cmd, Int32 value0=0, Int32 value1=0, void *value2=0, void *value3=0) |
static SDKBrowserContentNodeRef | FindNode (const SDKBrowserURL &url, Int32 flags=FindExactMatch, SDKBrowserContentNodeRef start_from=0) |
static Bool | Identify (const SDKBrowserURL &url, UInt32 flags, SDKBrowserPluginRef *plugin_out) |
Default Object | |
static BaseList2D * | GetDefaultObject (Int32 id, UInt32 flags=0) |
static Bool | SetDefaultObject (BaseList2D *bl, UInt32 flags=0) |
typedef SDKBrowserContentNodeRef InsertNodeFromDataBase(SDKBrowserContentNodeRef parent, SDKBrowserContentNodeRef existing_node, const SDKBrowserURL &url, const String &name, UInt32 flags, Int32 db_index, void *user_data) |
Node insertion callback.
[in] | parent | The parent node. |
[in] | existing_node | An existing node. |
[in] | url | The URL. |
[in] | name | The name. |
[in] | flags | The flags. |
[in] | db_index | The database index. |
[in] | user_data | The callback user data. |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
|
private |
|
private |
|
static |
Opens a new browser at path.
[in] | path | The path to open. |
[in] | flags | The flags. |
|
static |
Opens a new browser at path with a custom title.
[in] | path | The path to open. |
[in] | custom_title | The custom title. |
[in] | flags | The flags. |
|
static |
Gets a category node.
[in] | where | The category. See SDKBrowserCategory. |
|
static |
Gets an icon by ID.
[in] | id | The icon ID. |
[in] | pref_wh | The preferred width/height of the icon. |
|
static |
Gets an icon by URL and plugin ID.
[in] | url | A URL to get the icon for. |
[in] | plugin | A corresponding plugin ID. |
[in] | flags | Reserved. |
[in] | preview_time | An optional preview time. |
|
static |
Retrieves the pointer to a preview icon. If no preview is available the default icon for the type of node will be returned. The browser will cache the icon.
[in] | content | The node for which an icon will be returned. |
[in] | pref_wh | The preferred width/height of the icon. |
[in] | flags | The flags. See SDKBrowserIconFlags. |
|
static |
Creates an icon from a bitmap.
[in] | bm | The bitmap to create the icon from. |
[in] | dont_free | true if the icon bitmap should not be freed. |
|
static |
Releases icon.
[in,out] | icon | The icon to release. |
|
static |
Registers the browser plugin in plugin_info.
[in] | plugin_info | The browser plugin to register. |
[in] | flags | The flags. |
|
static |
Unregisters the browser plugin in plugin_info.
[in] | plugin_info | The browser plugin to unregister. |
|
static |
Registers a preset library.
[in] | domain | The preset domain. |
[in] | name | The name of the database. |
[in] | f | The file name and path. |
Unregisters a preset library.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | f | The file name and path. |
|
static |
Gets the database index of url.
[in] | url | The URL to get the database index for. |
[in] | flags | The flags. |
|
static |
Checks if a preset exists.
[in] | url | The URL of the preset. |
|
static |
Loads data for a preset node in a specific preset database.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[out] | plugin_id | Assigned The ID of the plugin that saved the data. |
[out] | bc | Assigned an information container. Can be nullptr. |
[out] | data | Assigned a memory block with private node data. The memory will be owned by the caller. Can be nullptr. |
[out] | length | Assigned the length of the private node data in bytes. |
|
static |
Saves data for a preset node in a specific preset database.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | plugin_id | The ID of the plugin that saves the data. (This should be the same value as SDKBrowserPluginInterface::GetPluginID().) |
[in] | bc | Pointer to an information container. Can be nullptr. |
[in] | data | Memory block with private node data. The caller owns the memory block. Can be nullptr. |
[in] | length | The length of the private node data in bytes. |
|
static |
Deletes data for a preset node in a specific preset database.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | plugin_id | The ID of the plugin that saves the data. (This should be the same value as SDKBrowserPluginInterface::GetPluginID().) |
|
static |
Copies presets.
[in] | src | The URL of the source preset. |
[in] | dst | The URL of the destination preset. |
|
static |
Retrieves the language specific name of a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | language_id | The language ID. LanguageDefault for the default language. See SDKBrowserLanguage. |
[out] | out_name | Assigned the preset name. |
|
static |
Sets the language specific name of a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | language_id | The language ID. LanguageDefault for the default language. See SDKBrowserLanguage. |
[in] | name | The new name.. |
|
static |
Changes the preset URL.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | new_url | The new URL. |
[in] | plugin_id | The ID of the plugin that saved the data (this should be the same value as SDKBrowserPluginInterface::GetPluginID()). |
|
static |
Retrieves the annotation string of a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[out] | annotation | Assigned the annotation. |
|
static |
Sets the annotation string of a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | annotation | The new annotation. |
|
static |
Sets the preview bitmap of a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | mode | The mode. See SDKBrowserPreview. |
[in] | preview_quality | The new preview quality. See SDKBrowserPreviewQuality. |
[in] | bm | The preview bitmap. Copied. |
[in] | lft | The preview time. Copied. |
|
static |
Gets the preview bitmap for a preset.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | frame_idx | The frame index, for movie clip previews. |
|
static |
Retrieves the animation data for an animated preset preview.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[out] | first_frame_idx | Assigned the number of the first frame. |
[out] | last_frame_idx | Assigned the number of the last frame. |
[out] | fps | Assigned the frames per second. |
|
static |
Sets the animation data for an animated preset preview.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL of the preset node. |
[in] | first_frame_idx | The number of the first frame. |
[in] | last_frame_idx | The number of the last frame. |
[in] | fps | Assigned the frames per second. |
|
static |
Saves a BaseList2D object as preset. An already existing node with the url will be replaced.
[in] | url | The URL of the preset node. There must be an existing node for the URL! |
[in] | bl | The base list object. |
|
static |
Reads nodes from a database.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | base_url | The base URL. |
[in] | base_node | The base node. |
[in] | callback | The callback. |
[in] | user_data | The user data for the callback. |
|
static |
Creates a new preset node.
[in] | db_index | The database index. Use UserPresetDb for the user preset library, or a value from GetDbIndex() or RegisterPresetLibrary(). |
[in] | url | The URL to create the preset node for. |
[in] | plugin_id | The ID of the plugin for the preset node (this should be the same value as SDKBrowserPluginInterface::GetPluginID()). |
[in] | mode | The preset mode. |
|
static |
Used to define a custom preset order for a directory.
When iterating through the nodes in a directory the content browser will return them in the order that is specified in the array nodes.
BodyPaint 3D for example uses this function to change the order of the brush presets.
[in] | nodes | The nodes array. |
[in] | cnt | The length of the nodes array. |
|
static |
Mounts a preset library.
[in] | fn | The file name of the library to load. |
[in] | flags | The flags. See SDKBrowserPresetLibrary. |
[out] | domain | Assigned the domain of the preset, can be nullptr. |
|
static |
Tells the browser about changes in node.
[in] | node | The modified node (or parent node). |
[in] | flags | Reserved. |
|
static |
Private.
|
static |
Retrieves the browser content node corresponding to url.
[in] | url | The URL of the node. |
[in] | flags | The flags. See SDKBrowserFind. |
[in] | start_from | An optional start node. |
|
static |
Identifies url.
[in] | url | The URL to identify. |
[in] | flags | The flags. |
[in] | plugin_out | Assigned the corresponding plugin, if found. |
|
static |
Retrieves a default object of type id if available.
[in] | id | The object type. |
[in] | flags | The flags. |
|
static |
Sets a default object for the type of bl, overwriting older default library objects for this type.
[in] | bl | The new default object. The object is cloned. The caller owns the pointed object. |
[in] | flags | The flags. |