Change segment editor button layout

Thank you very much for your reply. I have built 3dslicer. I want to realize the function of vertical toolbar in the figure below, but I don’t know how to start. I hope you can give me a direction. Thank you again
toolBar