/usr/share/doc/bwidget/html/MainFrame.html is in bwidget 1.9.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | <HTML>
<HEAD><TITLE>MainFrame</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>MainFrame</B>
- Manage toplevel with menu, toolbar and statusbar
</DD></DL>
<DL>
<DT><I>CREATION</I></DT>
<DD><A HREF="#descr"><B>MainFrame</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ProgressBar.html">OPTIONS from <B>ProgressBar</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD> -background or -bg</TD>
<TD> -progressfg (see <B>-foreground</B>)</TD>
</TR>
<TR>
<TD> -progressmax (see <B>-maximum</B>)</TD>
<TD> -progresstype (see <B>-type</B>)</TD>
</TR>
<TR>
<TD> -progressvar (see <B>-variable</B>)</TD>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD> <A HREF="#-height">-height</A></TR>
<TD> <A HREF="#-menu">-menu</A></TR>
</TR>
<TR>
<TD> <A HREF="#-separator">-separator</A></TR>
<TD> <A HREF="#-textvariable">-textvariable</A></TR>
</TR>
<TR>
<TD> <A HREF="#-width">-width</A></TR>
<TD> <A HREF="#-sizegrip">-sizegrip</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#addindicator"><B>addindicator</B></A>
?<I>arg...</I>?
</DD>
<DD><I>pathName</I> <A HREF="#addtoolbar"><B>addtoolbar</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
<I>option</I>
</DD>
<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
</DD>
<DD><I>pathName</I> <A HREF="#getindicator"><B>getindicator</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#getmenu"><B>getmenu</B></A>
<I>menuid</I>
</DD>
<DD><I>pathName</I> <A HREF="#gettoolbar"><B>gettoolbar</B></A>
<I>index</I>
</DD>
<DD><I>pathName</I> <A HREF="#setmenustate"><B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DD>
<DD><I>pathName</I> <A HREF="#showstatusbar"><B>showstatusbar</B></A>
<I>name</I>
</DD>
<DD><I>pathName</I> <A HREF="#showtoolbar"><B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
MainFrame manage toplevel to have:<BR>
<UL>
<LI>simple menu creation, with automatic accelerator bindings and
<A HREF="DynamicHelp.html">DynamicHelp</A> association,
<LI>one or more toolbars that user can hide,
<LI>a status bar, displaying a user message or a menu description, and optionally a
<A HREF="ProgressBar.html">ProgressBar</A>.
</UL>
</P>
<BR><HR WIDTH="50%"><BR>
<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
<DL><DT><A NAME="-height"><B>-height</B></A></DT>
<DD>
Specifies the desired height for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<DL><DT><A NAME="-menu"><B>-menu (read-only)</B></A></DT>
<DD>
This option describes the menu. This is a list whose each five elements describe
one cascade menu. It has the following form:
{<I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>...}
where <I>menuentries</I> is a list where each element describe one menu entry, which can be:
<UL>
<LI>for a separator:<BR>
{<B>separator</B>}
<LI>for a command:<BR>
{<B>command</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a check button:<BR>
{<B>checkbutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I>? ?<I>option</I> <I>value</I>? ...}
<LI>for a radio button:<BR>
{<B>radiobutton</B> <I>menuname</I> ?<I>tags</I>? ?<I>description</I>? ?<I>accelerator</I> ?<I>option</I> <I>value</I>? ...}
<LI>for a cascade menu:<BR>
{<B>cascade</B> <I>menuname</I> <I>tags</I> <I>menuId</I> <I>tearoff</I> <I>menuentries</I>}
</UL>
where:
<UL>
<LI><I>menuname</I> is the name of the menu. If it contains a &, the following character
is automatically converted to the corresponding <B>-underline</B> option of <B>menu add</B>
command.
<LI><I>tags</I> is the tags list for the entry, used for enabling or disabling menu
entries with <B>MainFrame::setmenustate</B>.
<LI><I>menuId</I> is an id for the menu, from which you can get menu pathname with
<B>MainFrame::getmenu</B>.
<LI><I>tearoff</I> specifies if menu has tearoff entry.
<LI><I>description</I> specifies a string for <A HREF=\"DynamicHelp.html\">DynamicHelp</A>.
<LI><I>accelerator</I> specifies a key sequence. It is a list of two elements, where the first
is one of <B>Ctrl</B>, <B>Alt</B> or <B>CtrlAlt</B>, and the second as letter or a digit.
An accelerator string is build and corresponding binding set on the toplevel to invoke the
menu entry.
<LI><I>option value</I> specifies additionnal options for the entry (see <B>menu add</B>
command).
</UL>
Each value enclosed by ? are optional and defaulted to empty string, but must be
provided if one or more following options is not empty.
<BR>Example:
<PRE>
set descmenu {
"&File" {} {} 0 {
{command "&New" {} "Create a new document" {Ctrl n} -command Menu::new}
{command "&Open..." {} "Open an existing document" {Ctrl o} -command Menu::open}
{command "&Save" open "Save the document" {Ctrl s} -command Menu::save}
{cascade "&Export" {} export 0 {
{command "Format &1" open "Export document to format 1" {} -command {Menu::export 1}}
{command "Format &2" open "Export document to format 2" {} -command {Menu::export 2}}
}}
{separator}
{cascade "&Recent files" {} recent 0 {}}
{separator}
{command "E&xit" {} "Exit the application" {} -command Menu::exit}
}
"&Options" {} {} 0 {
{checkbutton "Toolbar" {} "Show/hide toolbar" {}
-variable Menu::_drawtoolbar
-command {$Menu::_mainframe showtoolbar toolbar $Menu::_drawtoolbar}
}
}
}
</PRE>
</DD>
</DL>
<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
<DD>
Specifies if separator should be drawn at the top and/or at the bottom of the user window.
Must be one of the values <B>none</B>, <B>top</B>, <B>bottom</B> or <B>both</B>.
It depends on the relief of subwidgets of user window.
</DD>
</DL>
<DL><DT><A NAME="-textvariable"><B>-textvariable</B></A></DT>
<DD>
Specifies the textvariable option for the label of the status bar.
<A HREF="DynamicHelp.html">DynamicHelp</A> description
of menu entries are mapped to this variable at the creation of the MainFrame.
If this variable is changed by MainFrame::configure, menu description will
not be available.
<BR>You change the text of the label by modifying the value of the variable.
</DD>
</DL>
<DL><DT><A NAME="-width"><B>-width</B></A></DT>
<DD>
Specifies the desired width for the user frame in any of the forms acceptable to
Tk_GetPixels. If this option is less than or equal to zero (the default) then the window
will not request any size at all.
</DD>
</DL>
<DL><DT><A NAME="-sizegrip"><B>-sizegrip (themed, read-only)</B></A></DT>
<DD>
If bool argument is true and themed mode, show a ttk sizegrip widget in the lower-right corner.
</DD>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
<DL><DT><A NAME="addindicator"><I>pathName</I> <B>addindicator</B></A>
?<I>arg...</I>?
</DT><DD>
Add an indicator box at the right of the status bar. Each indicator are added from left
to right. An indicator is a Tk label widget configured with option-value pair
given by ?<I>arg...</I>?. <B>-relief</B> and <B>-borderwidth</B> options are respetively
defaulted to <I>sunken</I> and 1. Returns the pathname of the created label.
</DD></DL>
<DL><DT><A NAME="addtoolbar"><I>pathName</I> <B>addtoolbar</B></A>
</DT><DD>
Add a toolbar to the MainFrame. Returns the pathname of the new window where to place
toolbar items.
</DD></DL>
<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
<I>option</I>
</DT><DD>
Returns the current value of the configuration option given by <I>option</I>.
<I>Option</I> may have any of the values accepted by the creation command.
</DD></DL>
<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
Query or modify the configuration options of the widget. If no <I>option</I> is specified,
returns a list describing all of the available options for <I>pathName</I>.
If <I>option</I> is specified with no <I>value</I>, then the command returns a list
describing the one named <I>option</I> (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If one or
more <I>option-value</I> pairs are specified, then the command modifies the given widget
option(s) to have the given value(s); in this case the command returns an empty string.
<I>Option</I> may have any of the values accepted by the creation command.
Read-only options are not be modified.
</DD></DL>
<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
</DT><DD>
Returns the pathname of the user window.
</DD></DL>
<DL><DT><A NAME="getindicator"><I>pathName</I> <B>getindicator</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added indicator.
</DD></DL>
<DL><DT><A NAME="getmenu"><I>pathName</I> <B>getmenu</B></A>
<I>menuid</I>
</DT><DD>
Returns the pathname of the menu whose id is <I>menuid</I>.
</DD></DL>
<DL><DT><A NAME="getmenustate"><I>pathName</I> <B>getmenustate</B></A>
<I>tag</I>
<I>state</I>
</DT><DD>
Returns the state of the given menu <I>tag</I>.
</DD></DL>
<DL><DT><A NAME="gettoolbar"><I>pathName</I> <B>gettoolbar</B></A>
<I>index</I>
</DT><DD>
Returns the pathname of the <I>index</I>th added toolbar.
</DD></DL>
<DL><DT><A NAME="setmenustate"><I>pathName</I> <B>setmenustate</B></A>
<I>tag</I>
<I>state</I>
</DT><DD>
Set the <B>-state</B> option value of all the menu entries that have the tag <I>tag</I>
to <I>state</I>.
A menu entry is disabled, if one of its associated tags have state <B>disabled</B>.
</DD></DL>
<DL><DT><A NAME="showstatusbar"><I>pathName</I> <B>showstatusbar</B></A>
<I>name</I>
</DT><DD>
<I>name</I> is one of <B>none</B>, <B>status</B> or <B>progression</B>.
Use <B>none</B> to hide the status bar, <B>status</B> to display the label only, or
<B>progression</B> to display the label and the
<A HREF="ProgressBar.html">ProgressBar</A>.
</DD></DL>
<DL><DT><A NAME="showtoolbar"><I>pathName</I> <B>showtoolbar</B></A>
<I>index</I>
<I>bool</I>
</DT><DD>
Hide if <I>bool</I> is 0, or show if <I>bool</I> is 1 the <I>index</I>th added toolbar.
To prevent your toplevel from resizing while hiding/showing toolbar,
do [wm geometry $top [wm geometry $top]] when it is managed.
</DD></DL>
</BODY></HTML>
|