- 1 DirThumbBrowser Drop Preview
- 2 DirThumbBrowser Group Sort Order Override
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: LXu_DTBDROPPREVIEW, etc. defines
Mark nothing at all in the browser.
(2) SDK: DTBDropPreview::MarkNone
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: DTBDropPreview::MarkGridPos
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: DTBDropPreview::MarkEntry
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: DTBDropPreview::MarkBetween
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: DTBDropPreview::MarkAnywhere
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: LXu_DTBGROUPSORTOVERRIDE, etc. defines
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: DTBGroupSortOverride::SetArguments
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: DTBGroupSortOverride::Sort
Empty Command Python user class.
(10) PY: empty DTBGroupSortOverride user class