thumbbrowse (lxthumbbrowse.h)

From The Foundry MODO SDK wiki
Jump to: navigation, search
There are security restrictions on this page


DirThumbBrowser Drop Preview

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.

(1) SDK: Declarations
 #define LXu_DTBDROPPREVIEW              "7ccfca70-79d5-42ed-a5bf-5dfd5bc3262b"
 #define LXa_DTBDROPPREVIEW              "dtbdroppreview"

Mark nothing at all in the browser.

(2) SDK: ILxDTBDropPreview interface
         LXxMETHOD(  LxResult,
 MarkNone) (
         LXtObjectID               self);

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.

(3) SDK: ILxDTBDropPreview interface
         LXxMETHOD(  LxResult,
 MarkGridPos) (
         LXtObjectID               self,
         const char               *path,
         unsigned int              x,
         unsigned int              y);

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

(4) SDK: ILxDTBDropPreview interface
         LXxMETHOD(  LxResult,
 MarkEntry) (
         LXtObjectID               self,
         const char               *path);

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.

(5) SDK: ILxDTBDropPreview interface
         LXxMETHOD(  LxResult,
 MarkBetween) (
         LXtObjectID               self,
         const char               *path,
         int                       markBefore);

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.

(6) SDK: ILxDTBDropPreview interface
         LXxMETHOD(  LxResult,
 MarkAnywhere) (
         LXtObjectID               self,
         const char               *path);

DirThumbBrowser Group Sort Order Override

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.

(7) SDK: Declarations
 #define LXu_DTBGROUPSORTOVERRIDE        "0da992be-74c8-4c25-a402-c69216e52dfb"
 #define LXa_DTBGROUPSORTOVERRIDE        "dtbgroupsortoverride"

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.

(8) SDK: ILxDTBGroupSortOverride interface
         LXxMETHOD(  LxResult,
 SetArguments) (
         LXtObjectID               self,
         const char               *args);

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.

(9) SDK: ILxDTBGroupSortOverride interface
         LXxMETHOD(  int,
 Sort) (
         LXtObjectID               self,
         const char               *string1,
         const char               *string2);

Empty Command Python user class.

(10) PY: DTBGroupSortOverride method
 pass