The best source of information is toolbar.ini file. You can find there ready examples of toolbars. Your custom toolbar template should be placed in design/(yourdesign)/templates/toolbar/full/your_toolbar_tpl or in design/(yourdesign)/templates/toolbar/line/your_toolbar_tpl depends on view.