BaKoMa TeX
Toolbars Customization
This description is for BaKoMa TeX 11.0 or later.
NOTE: Toolbar customisation was introduced in version 10.80.
However, some styles has been added in V 11.0. So that some styles in this description will be
undefined in V 10.80.
Toolbars
Before making own toolbars take attention that you can add/remove any button in User Toolbar.Toolbar folders
Beginning from BaKoMa TeX 10.80 main programs (TeXWord, TeXCode/Centaur, DVIEW) download definitions of advanced toolbars from Toolbars subfolders. To add own toolbar user can just drop toolbar defintion into such folders:
PROGRAM | DIRECTORY |
TeXWord | $TEXDIR/BaKoMa/TeXWord/Toolbars |
TeXCode/Centaur | $TEXDIR/BaKoMa/TeXCode/Toolbars |
DVIEW | $TEXDIR/BaKoMa/DVIEW/Toolbars |
Where $TEXDIR is BaKoMa TeX installation folder.
OPERATING SYSTEM | $TEXDIR Value |
Windows | C:\BaKoMa TeX (may be changed at install) |
MacOS | /Applications/BaKoMa TeX/.bakoma |
Linux | /opt/bakoma |
Toolbar definition
Toolbar is defined as PostScript dictionary with following keys:
KEY | TYPE | VALUE/DESCRIPTION |
/Type | Name | /Toolbar |
/Name | Name | uniqual key identifying toolbar. |
/Label | String | the label which will be appeared in 'Window' menu to show/hide toolbar. |
/Show | Boolean | [Optional] defines default state (Shown/Hidden) of the toolbar. |
/Style | Integer | [Optional] /WXAUI_{ flags } Flags (See wxWidgets/wxAuiToolBar) |
/Size | [Int Int] | [Optional] Currently ignored, used to set typical size of tool bitmap |
/Childs | Array | array of tools or controls, whose will be appeared on toolbar |
/Extension | Array | [Optional] array of tools, whose will be appeared in toolbar menu |
Values of WXAUI_ flags (for /Style key of previous table):
FLAG | DECRIPTION |
TB_TEXT | Shows the text in the toolbar buttons; by default only icons are shown. |
TB_NO_TOOLTIPS | Don't show tooltips on wxAuiToolBar items. |
TB_NO_AUTORESIZE | Do not auto-resize the wxAuiToolBar |
TB_GRIPPER | Shows a gripper on the wxAuiToolBar. |
TB_OVERFLOW | The wxAuiToolBar can contain overflow items. |
TB_VERTICAL | Using this style forces the toolbar to be vertical and be only dockable to the left or right sides of the window whereas by default it can be horizontal or vertical and be docked anywhere. |
TB_HORZ_LAYOUT | Shows the text and the icons alongside, not vertically stacked. This style must be used with TB_TEXT |
TB_HORIZONTAL | Analogous to TB_VERTICAL, but forces the toolbar to be horizontal, docking to the top or bottom of the window. |
TB_PLAIN_BACKGROUND | Draw a plain background (based on parent) instead of the default gradient background. |
/Extension
Extension is array of following elements:
Kind | TYPE | VALUE/DESCRIPTION |
Separator | Name | /SEPARATOR |
Tool | Dictionary | See description below |
/Childs
Childs is array of following elements:
Kind | TYPE | VALUE/DESCRIPTION |
Separator | Name | /SEPARATOR - separator |
Label | String | any string adds label on toolbar. |
Spacing | Integer | any integer adds space, value >= 1000 - stretchable space. |
Tool | Dictionary | When '/Type' key is missed or defined as '/Tool' it is assumed to be tool. |
Control | Dictionary | Control Dictionary must include '/Type' key which defines type of control. |
Tool Dictionary
Tool is special form of Control which is more flexible and may be adjusted by toolbar flags.
KEY | TYPE | VALUE/DESCRIPTION |
/ID | integer | which will be passed to handler (keep them uniqual for all tools and controls in one toolbar) |
/Icon | string | icon name. |
/Label | string | [Optional] text which will be shown below icon when proper style of toolbar. |
/Tip | string | [Optional] tooltip which will be displayed when mouse is over tool icon. |
/Action | proc|name | [Optional] it is command attached to tool (see Actions) |
Control Dictionary
KEY | TYPE | VALUE/DESCRIPTION |
/Type | Name | defined kind of control, list of controls see below. |
/ID | Integer | which will be passed to handler (keep them uniqual for all tools and controls in one toolbar) |
/Style | Integer | control dependent style. |
/Tip | String | [Optional] tooltip which will be displayed when mouse is over control. |
/Size | [Int Int] | [Optional] [#width #height] - adjusts size of control. |
/Action | proc|name|dict | [Optional] it is command or option attached to control (See Actions) |
Below is list of controls supported by toolbar:
TYPE | DESCRIPTION, additional keys and styles |
/Button |
Classical button with text specified by additional /Label key
/Label - string, text which will be shown on button. /Style key accepts /WXBU_ flags:
|
/CheckBox |
is a labelled box which by default is either on (checkmark is visible) or off (no checkmark).
/Label - [Optional] string, label (comment) at right of checkbox. /Style key accepts /WXCHK_ flags:
|
/TextCtrl |
A text control allows text to be displayed and edited. (wxTextCTrl)
/Label - [Optional] string, text which will be inside control at creating. /Style key accepts /WXTE_ flags (suitable for toolbar):
|
/Choice |
A choice control is used to select one of a list of strings. (wxChoice)
/Label - string, will be treated by the control in special way. /Style key accepts /WXCB_ flags:
|
Following controls has no reasonable meaning on toolbars, but may be used to provide special appearance. | |
/BitmapButton |
Bitmap button with image specified by additional /Icon key
/Icon - string, name of icon which will be displayed on button. NOTE: Use tool instead it, but Style may change view of button. /Style key accepts /WXBU_ flags:
|
/StaticText |
A static text control displays one or more lines of read-only text.
/Label - string, text which will be shown. NOTE: Use String instead it, but Style may change view of string. |
/StaticBitmap |
A static bitmap control displays a bitmap.
/Icon - string, name of icon which will be displayed. |
/HyperLink |
Label looking like to hyperlink, at click automatically open Url page.
/Label - string, shown string. /Url - string, URL which will be opened at clicking on the control. |
Unuseful or difficult to use insde toolbars. | |
/StaticBox | /Label - string, text which will mark the box at left top corner. |
/BKMButton | /Label - string, will be treated by the control in special way. |
/RadioButton | /Label - [Optional] string, label (comment) at right of radiobutton. |
/ComboBox | /Label - [Optional] string, text which will be inside control at creating. |
Actions
'Action' key in tool or control may specify some action which should be peforming after clicking by mouse.In case of Tool, Button, BitmapButton it may be postscript procedure or name referred on a procedure.
In case of CheckBox it may be BooleanOption, which will be correctly associated with control.
In case of TextCtrl it may be StringOption, which will be correctly associated with control.
In case of Choice it may be ListOption, which will be correctly associated with control.
Every program have own set of commands whose may be shown
in dialog opened by menu command: Help / Keyboard (F1).
To see all commands change view in left bottom corner of the dialog.
Samples
Centaur (TeXCode) has two special toolbars (may be found in $TEXDIR/BaKoMa/TeXCode/Toolbars)
Search.Toolbar - set of commands to search and replace
TeX.Toolbar - set of commands to run TeX and utilities
For example search toolbar looks like following:
<</Type /Toolbar /Childs [ (Search:) 4 % There is label and spacer <</ID 4 /Type /TextCtrl /Size [128 10] /Action /SearchString /Tip (Current string for search)>> 6 % Small space between TextCtrl and CheckBox will look nice. <</ID 5 /Type /CheckBox /Action /MatchCase /Tip (Selects searching with case matching)>> <</ID 6 /Type /CheckBox /Action MatchWholeWord /Tip (Selects searching only whole words)>> /SEPARATOR <</ID 7 /Icon (edit-find;opt-previous) /Label (Search Backward) /Action /SearchBackward /Tip (Searches again backward)>> <</ID 8 /Icon (edit-find;opt-next) /Label (Search Forward) /Action /SearchForward /Tip (Searches again forward)>> /SEPARATOR <</ID 10 /Icon (edit-find-replace) /Label (Replace) /Action /Replace /Tip (Replaces currently found string by `Replacement Text' and searches again)>> <</ID 11 /Type /TextCtrl /Size [128 10] /Action ReplacementString /Tip (Replacement Text) >> <</ID 12 /Icon (edit-find-replace;opt-all) /Label (Replace All) /Action /ReplaceAll /Tip (Replaces every matched substring (beginning from cursor) by `Replacement Text')>> /SEPARATOR <</ID 14 /Icon (bookmark-edit) /Action /ManageBookmarks... /Label (Manage Bookmarks) /Tip (Manages source text Bookmarks in the current file)>> ] /Extension [ /SEPARATOR <</ID 1 /Label (Help) /Icon(Help) /Action { (.BKM.edit-Search-Replace) MetaHelp } /Tip (About this Toolbar ...) >> ] >>
BaKoMa TeX > About > Tech Info > Toolbars | Copyright © 1998-2018, BaKoMa Soft. |