A number of variables are available to the evaluator in this context. Note that some are only applicable to toolbars in the [[:additional_functionality:viewing_images|standalone image viewer]], and some only apply to Lister toolbars. $$ Variable $$ Type $$ Description $$ button_rect $$ //map// $$ In functions launched by clicking a toolbar button, this provides the position on-screen of the button. You can also use the `click_pt` value to obtain the position of the mouse pointer. This would, for example, let you configure buttons to perform different functions depending on which part of the button was clicked. The map values are: left, top, right, bottom, width, height, midx, midy, valid. $$ click_pt $$ //map// $$ In functions launched by clicking a toolbar button, this provides the position of the mouse pointer when the button was clicked. The map values are: x, y. $$ dest $$ //path// $$ The current destination path. $$ dest_shell $$ //bool// $$ **True** if the destination is a shell (virtual) folder hosted by Explorer, otherwise **false**. $$ expanded $$ //uint// $$ Returns the number of expanded directories. $$ fullscreen $$ //bool// $$ //Viewer only//. **True** if the viewer is fullscreen, otherwise **false**. $$ is_dual $$ //bool// $$ **True** if the Lister is in dual-display mode. $$ is_right $$ //bool// $$ **True** if the current source is the right/bottom file display of a dual-display Lister. $$ key_repeat $$ //bool// $$ **True** if the function was launched from a repeated key press (i.e. the key was held down). $$ lister_title $$ //string// $$ Returns the current title string of the Lister. $$ preparse_dummy $$ //bool// $$ **True** if the evaluator is being called with a dummy filename as part of //pre-parsing//. Opus will do this for evaluator expressions inside a `@perfile` block. You should generally respond normally (Opus is querying to find out which values the evaluator expression requires), but you may want to filter out some behaviour (e.g. logging) for pre-parsing. $$ selbytes $$ //uint64// $$ Returns the number of selected bytes (files + directories that have had their sizes calculated). $$ seldirs $$ //uint// $$ Returns the number of selected directories. $$ selfiles $$ //uint// $$ Returns the number of selected files. $$ selimage $$ //bool// $$ //Viewer only//. **True** if an area of the image has been selected, **false** otherwise. $$ selitems $$ //uint// $$ Returns the total number of selected items. $$ selpath $$ //string// $$ Provides the full pathname of the currently selected file. In a Lister this means the selected file with input focus (e.g. the file you right-click on). In the viewer this means the currently viewed image. Note that main toolbars in the Lister are not necessarily refreshed when the file selection changes, and so a button on the main toolbar using this may not always show the correct information. $$ source $$ //path// $$ The current source path. $$ source_shell $$ //bool// $$ **True** if the source is a shell (virtual) folder hosted by Explorer, otherwise **false**. $$ tabcount $$ //uint// $$ Returns the number of tabs in the current file display. $$ tabcount_other $$ //uint// $$ Returns the number of tabs in the other file display. $$ tabindex $$ //uint// $$ Returns the selected tab index in the current file display. $$ tabindex_other $$ //uint// $$ Returns the selected tab index in the other file display. $$ totalbytes $$ //uint64// $$ Returns the total number of bytes (files + directories that have had their sizes calculated). $$ totaldirs $$ //uint// $$ Returns the total number of directories. $$ totalfiles $$ //uint// $$ Returns the total number of files. $$ totalitems $$ //uint// $$ Returns the total number of items. $$ viewmode $$ //str// $$ Returns the current view mode in the file display. Values are **largeicons**, **smallicons**, **list**, **details**, **power**, **thumbnails** and **tiles**. As well as the above variables, you can also use [[:reference:evaluator|evaluator functions]] like [[:reference:evaluator:ischecked]] and [[:reference:evaluator:isenabled]] to query other information about the state of the Lister.