Image icons in selection lists

#include <x/w/image_param_literals.H>

x::w::listlayoutmanager ll;

x::w::hierindent new_indent{++i_indent};

ll->insert_items(i+1, {
    x::w::hierindent{new_ident},
    "bullet2.sxg"_image,
    "Lorem Ipsum"
});

Selection list items are ordinary labels, or text strings. The list layout manager's insert_items() method is one of the methods that add new items to the list. Its second parameter is a std::vector of x::w::list_item_params. This is a variant datatype that has several possible values. This specifies both the new items themselves, as strings, unicode strings, or x::w::text_param; as well as any additional options for the new item that follows the option (an x::w::hierindent in this example).

"filename"_image specifies an image that gets loaded from a file, an x::w::image_param. hierlist.C creates a list with two columns, so one new logical list item consists of two actual list items, which are always an x::w::image_param and a text string, as shown here.

Images specified by x::w::image_param get loaded from the current directory or from the current display theme's directory. Images can be gif, png, jpg, or sxg images. sxg is the LibCXX Widget Toolkit's scalable image format. hierlist.C uses the "bullet2.sxg" image from the current display theme. The loaded bullet icon, accordingly, gets scaled according to the current display theme's settings. gif, png and jpg images always get loaded with their fixed image size, irrespective of the current display theme's scale.