Servers are sorted by an ordinal set as a server tag.


The server indicates which badges an entry supports with this method. This determines if those badges are even present at all.



class ILxDTBBadgeOverride

Certain badges in the browser can be overridden by specific clients. The implementation case is the cloud asset browser, where the star rating badge and cloud badge are need to change based on if the user has set their own star rating, and if the version of the file on disk is newer, older, or doesn’t exist with respect to the version in the cloud. ILxDTBBadgeOverride provides two methods that are implemented by the client to override badges. These are caleld with an object with an ILxDirCacheEntry interface. If it also has an ILxMergedDirCacheEntry interface, then the client can look at the individual entries that make up this merged entry so that it can decide what the cloud badge should be. The client is expected to fail gracefully (ie: return NOTIMPL) for any paths that it doesn’t support, so that other clients can try them. For star ratings, the StarRatingOveride() method is used, while simpler badges use the BadgeOverride() method. When the user clicks a badge, the appropriate method is called so the client can take whatever action it deems fit.

Public Functions

LxResult BadgesSupported(LXtObjectID self, LXtObjectID entry, int *badges)
LxResult BadgeIsAlwaysVisible(LXtObjectID self, LXtObjectID entry, int badge)

This indicates if an action badge should always be visible, or visible only when the mouse is over th thumbnail. This is useful for the download badge when the asset isn’t yet downloaded. Setting this to false will make it vsiible only when the mouse is over the thumbnail, and is useful to for the downlooad badge when the asset is already downloaded, allowing the user to re-download it.

LxResult BadgeOverride(LXtObjectID self, LXtObjectID entry, int badge, char *buf, int len)
LxResult BadgeTooltip(LXtObjectID self, LXtObjectID entry, int badge, char *buf, int len)

Get a tooltip string (as a message table lookup in the form of @table@messsage@) to display for the badge. This is most useful for the download badge, as the icon tends to be different depending on if the local copy is newer or older than the cloud copy.

LxResult BadgeStarRatingOverride(LXtObjectID self, LXtObjectID entry, int *rating, char *buf, int len)

The star rating badge returns two things: a star rating as an number from 0-5, and an alternate image for the star rating. This allows cloud ratings to be visually distinct from local ratings, although the name field can be empty if the default star icon should be used. As above, this should return NOTIMPL if the client can’t support the file.

LxResult BadgeAction(LXtObjectID self, LXtObjectID entry, int badge)

When the user clicks on a badge, this method is called so that the client can perform an action. If the server doesn’t handle actions on this entry, it should return NOTIMPL.

LxResult BadgeStarRatingAction(LXtObjectID self, LXtObjectID entry, int rating)

Similarly, this is called when the user changes the star rating. Again, this should return NOTIMPL if the entry isn’t handled.


BadgeOverride() is passed a flag indicating which badge is being overridden. Currently only the “download” badge is supported, but more may be added in the future. If the client wants to override the badge, this should return success and indirectly return the name of the icon resource representing the badge to display. Note that returning success and an empty name is valid, and indicates that you want no badge displayed. This is different from returning NOTIMPL, as an empty name keeps other clients from being able to test for badges.


class ILxDTBDropPreview

The DirThumbBrowser (which commonly used to show files and folders in the Preset Browser) supports a prevew interface for drag and drop. More specifically, it provides a way to change which drop mark is shown in the browser based on how the drop server will apply it.

Public Functions

LxResult MarkNone(LXtObjectID self)

Mark nothing at all in the browser.

LxResult MarkGridPos(LXtObjectID self, const char *path, unsigned int x, unsigned int y)

When the browser is in grid mode, this marks a drop location within a directory as given by its path and the x/y coordinates of the grid cell. If not in grid mode, this does nothing. Note that this is the only option available in grid mode, and all other methods save MarkNone() will return NOTIMPL when in grid mode. Similarly, this method is not available when not in grid mode.

LxResult MarkEntry(LXtObjectID self, const char *path)

Mark a specific file or directory for the drop via its path. If the file/dir is not visible, this does nothing. This is most useful when dropping a file into a directory, or when the drop would change the file being dropped on (say, by changing its thumbnail, or overwriting an existing file).

LxResult MarkBetween(LXtObjectID self, const char *path, int markBefore)

This draws drop marker between two adjacent files or directories. The path of one of these entries the markBefore flag are provided. When the flag is true, the mark draws before the entry’s thumbnail, and when false it is drawn after. This is commonly used for manual sorting, or (more rarely) when you know where a newly-created file will be inserted into the sorted list.

LxResult MarkAnywhere(LXtObjectID self, const char *path)

For some operations, you just want to mark “anywhere” in the browser. What this really means is anywhere within the directory. This is commonly used when the drop would create a new file in that directory, but you don’t know exactly where it will show up realtive to the other files.


class ILxDTBGroupSortOverride

Primarily meant for baked apps, this allows a server to define the sort order for groups in the browse when the view is set to show mutliple groups at once. It does not affect the DirBrowser attached to the thumb browser/list.

Public Functions

LxResult SetArguments(LXtObjectID self, const char *args)

After being instanced, an optional argument string is passed to this method, or it may not be called at all if no arguments have been set.

int Sort(LXtObjectID self, const char *string1, const char *string2)

This method is called to filter two strings relative to each other. Returning a number less than zero indicates that the first string sorts earlier than the second, while a number greater than zero sorts the second one first. Zero means the two strings are equal. This is standard strcmp()-style return codes.

Note that the sort method must be thread safe.