fbuttons.1
来自「speech signal process tools」· 1 代码 · 共 413 行 · 第 1/2 页
1
413 行
.\" Copyright (c) 1991 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)fbuttons.1 1.16 01 Apr 1997 ERL.ds ]W (c) 1991 Entropic Research Laboratory, Inc..TH FBUTTONS 1\-ESPS 01 Apr 1997.SH NAME.nffbuttons \- create panel with buttons that run programs on specific files.fi.SH SYNOPSIS.Bfbuttons[.BI \-F " file_menu"] [ .BI \-s " max_scroll_lines"] [ .BI \-R " regexp"] [ .BI \-L " proglist_file"] [ .BI \-S " progmenu_file"] [.BI \-M " mbuttons_menu"] [.B \-a] [.BI \-b " but_per_row"] [ .BI \-q " quit_button"] [ .BI \-Q " quit_label"] [ .BI \-l " quit_command"] [ .B \-c] [.B \-h] [.BI \-w " window_title"] [ .BI \-i " icon_title"] [ .BI \-X " x_pos"] [ .BI \-Y " y_pos"] [.BI \-x " debug_level"] [\fIfilename1\fP] [\fIfilename2\fP ...].SH DESCRIPTION.PP\fIfbuttons\fP ("file buttons") pops up an X window with screenbuttons (or a scrollble list) for invoking one of a given set ofprograms on one of a given set of files. By default, the windowdisplayed by \fIfbuttons\fP has two panels, one panel to provideselections for the program to be run, and one panel with buttons thatinvoke the selected program on a given file. By default,\fIfbuttons\fP is configured to either play or view the header of allfiles in the current directory with suffixes ".sd" or ".d". If the\fB-M\fP option is used, a third panel is created with screen buttonsthat can have arbitrary functions in the style of \fImbuttons\fP(1\-\s-1ESPS\s+1)..PPPrograms are invoked on a given file by pressing (left mouse) thecorresponding button in the bottom panel of the window. Buttons theremay have menus associated with them, in which case programs areinvoked on a given file by making an appropriate menu selection.Often the button labels duplicate the file names, but (if \fB-F\fP isused) it is possible to create file buttons with arbitrary labels.The program that is invoked by pressing such a file button (or makinga button-menu selection) is controlled by an exclusive set oftoggle-buttons in the top panel of the window (or in the middle panelif the \fB-M\fP option is used). Pushing the "program button"labelled with the desired program selects the named program as the onethat will be invoked on a file when a the file is selected by pressinga file button in the bottom panel or making a button-menu selectionthere. (Note that the act of pushing a program button has no effectother than selecting that program for subsequent invocation via thefile buttons.) Programs invoked by \fIfbuttons\fP inherit itsenvironment. A QUIT button is also provided in the panel containingthe program buttons; it can be disabled using the \-\fBq\fP option. .PPFile names associated with the file buttons, scrollable file list, or filebutton-menus can be provided to \fIfbuttons\fP using any combinationof three methods: (1) a list on the command line (\fIfilename1\fP\fIfilename2\fP ...), in which case the button labels are given by thefile names; (2) a regular expression for a set of file names(\fB-R\fP), in which case the button labels are also given by the filenames; and (3) a menu file containing button labels and associatedfile names (\fB-F\fP). If none of these three methods is used, bydefault \fIfbuttons\fP uses the regular expression "\\.s*d$" to selectall files in the current directory with suffixes ".sd" or ".d",If the \fB-a\fP is used, file names will be sorted alphabetically (but note that sorting does not apply to a menu file associatedwith \fB-F\fP). .PPIf \fB-s\fP is used, a scrollable list is provided instead of buttons in the bottom panel. The number of files shown is limited to \fImax_scroll_lines\fP (but of course the list can be scrolled). If \fB-s\fP is used, the list labels are limited to file names (i.e., \fB-F\fP cannot be used). A scrollable list cannot be used if a \fIfile_menu\fP is specified (\fB-F\fP). .PPThe \fIfile_menu\fP specified with \fB-F\fP uses uses the same formatas menu files for the OPEN LOOK window manager \fIolwm\fP (same as\fIsunview\fP menu files). If submenus are specified, they result inmenu buttons with pull-down menus..PPThe simplest case for \fIfile_menu\fP is a file with two columns \-the button labels are taken from the first column and thecorresponding files are taken from the second column. If blanks areneeded in the button labels, use quotes to surround the string in thefirst column (e.g., "Max Headroom"). More complicated cases can becreated using the full syntax of \fIolwm\fP(1) menu files. The onlyrestriction is that there can only be one level of submenus \- i.e.,each entry in the \fIfile_menu\fP can itself specify a menu (eitherdirectly or by giving the full path to another menu file), but thespecified submenu cannot have additional submenus. Also, while the\fIolwm\fP command keyword DEFAULT is handled, others (PROPERTIES,REFRESH, FLIPDRAG, etc.) are treated as ordinary strings. Fordetails about the format of menu files, see \fIolwm\fP(1) \- themanual page is included in the ESPS distribution. Also, see\fImbuttons\fP (1\-\s-1ESPS\s+1) and the EXAMPLES..PPProgram names for the program buttons can be provided to\fIfbuttons\fP in one of two ways: (1) by means of a file containing alist of programs (\fB-L\fP) \- in this case, the program "name" isactually the full command line to be used (i.e., each "name" is usedboth as a button label and as the command line to be executed); (2) bymeans of a file containing a list of names and associated commandlines (\fB-S\fP) \- in this case, the name is used as the button labeland is independent of the command line to be executed. If neither\fB-L\fP or \fB-S\fP is specified, \fIfbuttons\fP uses a default\fIprogfile_menu\fP to create two program buttons: one labeled "playfile" and one labeled "show header". The former causes "play \-r1: "to be invoked on any file whose file button is pressed; the lattercauses "xtext psps -aD" to be invoked (this results in a pop-up windowwith a full-history header but no data). If the default menu cannotbe found, \fIfbuttons\fP uses "play -r1:" and "xtext psps -aD" both asprogram button labels and command strings..PPThe \fB-M\fP option can be used to specify a menu file of the typeused by \fImbuttons\fP (1\-\s-1ESPS\s+1) to create arbitrary screenbuttons. The syntax of the menu file and the semantics of theresulting button panel are exactly the same as for \fImbuttons\fP,execept that the panel appears as the top panel within the\fIfbuttons\fP window rather than in its own window (as is the casefor \fImbuttons\fP). Pressing a simple button invokes an associatedcommand. Pressing a menu button (specified as a sub-menu within the\fImbuttons_file\fP) produces a pop-down menu; selecting an item fromthe menu invokes an associated command. If the \-\fBc\fP is specifieda set of exclusive choice buttons is presented instead of a menubutton. For details, see the \fImbuttons\fP man page..PPIn a typical application, each file name (as specfied on the commandline or via \fB-F\fP and \fB-R\fP) is the name of an existing file.In some cases, however, it makes sense for the names to have othermeanings that are known to the invoked programs. For example, in theTIMIT demo (included in the ESPS demo directory), the button labelsare file prefixes, and the invoked programs derive relevant file namesby appending appropriate suffixes..PPIf \fB-S\fP, \fB-M\fP, or\fB- F\fP is used, \fIfbuttons\fP looks looksfor the named \fIprogmenu_file\fP, \fImbuttons_menu\fP or\fIfile_menu\fP file first in the current directory and then in$ESPS_BASE/lib/menus. This default search path can be overriden bysetting the \fIunix\fP environment variable ESPS_MENU_PATH. \fIfind_esps_file\fP(3\-\s-1ESPS\s+1) is used in implementing thisbehavior, so environment variables (preceeded by the character $) can beembedded within the \fIprogmenu_file\fP and \fImbuttons_menu\fPstrings..SH OPTIONS.PPThe following options are supported:.TP.BI \-F " file_menu"Specifies that file buttons be created from the file \fIfile_menu\fP.In the simplest case, the button labels are taken from the firstcolumn and the associated files are taken from the second column.Butons with associated pop-down menus can also be created (see thediscussion above under DESCRIPTION). Note that the \fB-F\fP optioncan be used in combination with \fB-R\fP and with file names listedexplicitly on the command line..TP \fB\-R\fI regexp\fR ['\\\\\\\\.s*d$'] Specifies that file buttons becreated for any file in the current directory that matches the regularexpression \fIregexp\fP. By default, any file name with suffix ".sd"or ".d" is selected, provided that the \fB-F\fP option isn't use andthat file names are not given explicitely on the command line. The\fB-R\fP option can be used in combination with \fB-F\fP and with filenames listed explicitly on the command line..TP .BI \-L " proglist_file"Specifies that program buttons be created for the strings listed inthe file \fIproglist_file\fP, one string per line (empty lines areignored). A set of exclusive toggle-buttons is created. The buttonlabels are the strings in \fIproglist_file\fP. The same string isused as a program command line if a given program button is down whenany file button is pressed, the file name is appended to the programbutton label (i.e., to the string that was in \fIproglist_file\fP) andthe resulting command is executed. The command inherits theenvironment of \fIfbuttons\fP. This option and \fB-S\fP are mutuallyexclusive. If neither are used, then a default menu file is used tocreate two program buttons: one labeled "play file" and one labeled
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?