I know how to do this in C, but I will try to do it in C ++. First of all, use ComboBox to display your menu, which you will fill using TreeModel .
Create a TreeModelColumnRecord , following the example here ; you only need one Gdk::Pixbuf column to display your line images.
Pass the TreeModelColumnRecord constructor. Fill ListStore Gdk::Pixbuf images of your line patterns and pass this to the constructor of your ComboBox ( ListStore inherits from TreeModel ).
source share