Make the display mode of the "FileTree" widget extendable (see #5090)