I am looking to display the material preview for cycles, eevee, and grease pencil in the 3D View Editor, but am having trouble when adding the material preview control.
You most likely initialized the gui but it does not call its draw function when it calls it own draw function for the block.
The block is the basic gui element in Blender and in this case works as a floating panel. Or popup as Blender calls them.
I am actually in the same place, wanting to update my custom icon based GUI and looking into draw functions. I would advice to search for the similar code and see exactly how it triggers the draw update.
The preview rendering code is currently tied to the properties editor and hardcoded notifiers, and also assumes there to only exist one preview render in each editor. Search the C code for sbuts->preview to see the relevant code.
I’m not immediately sure what the right solution is.