File: StdMenuBar.tex

package info (click to toggle)
roleplaying 2.0-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 16,620 kB
  • ctags: 1,039
  • sloc: tcl: 7,155; cpp: 2,709; ansic: 2,227; makefile: 559; sh: 330; csh: 3
file content (113 lines) | stat: -rw-r--r-- 3,763 bytes parent folder | download
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
% Begin of input file ../../Scripts/StdMenuBar.tcl
\chapter{StdMenuBar.tcl -- Create standard menubars}
\label{StdMenuBar.tcl}
\typeout{Generated from $Id: StdMenuBar.tcl,v 1.5 1999/07/13 01:30:12 heller Rel1 $}
This file contains code to create a standard Motif style menubar.
A standard menubar contains ``File'', ``Edit'', ``View'', ``Options'',
and ``Help'' pulldown menus.  The ``File'', ``Edit'', and ``Help'' menus
have standard menu items.

The menubars and menus generated by the procedures in this file fill the
standards set forth in the Motif Style Guide.



\noindent\rule{\textwidth}{0.4pt}
\section[proc MakePullDown]{proc MakePullDown \emph{menu args}}

This procedure creates a pulldown menu and adds the items specified
in its argument list.
\begin{description}
\item [in]  menu -- the menu to create.
\item [in]  args -- the items to place in the menu.
\index{MakePullDown!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc MakeFilePullDown]{proc MakeFilePullDown \emph{menu}}

This procedure creates a standard File menu.
\begin{description}
\item [in]  menu -- the menu to create.
\index{MakeFilePullDown!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc MakeEditPullDown]{proc MakeEditPullDown \emph{menu}}

This procedure creates a standard Edit menu.
\begin{description}
\item [in]  menu -- the menu to create.
\index{MakeEditPullDown!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc MakeHelpPullDown]{proc MakeHelpPullDown \emph{menu}}

This procedure creates a standard Help menu.
\begin{description}
\item [in]  menu -- the menu to create.
\index{MakeHelpPullDown!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc MakeStandardMenuBar]{proc MakeStandardMenuBar \emph{\{name .menuBar\} \{toplevel .\}}}

This procedure creates a standard Motif style menu bar.  If this is run under
Tcl/Tk 8.0, then the menu -type menubar / .toplevel config -menu .menu hack
is used.  For older versions of Tcl/Tk, a conventional horizontal frame of
menubuttons is packed into the top of the toplevel.
\begin{description}
\item [in]  name -- the name of the menu bar.
\item [in]  toplevel -- the name of the toplevel to pack the menu into.
\index{MakeStandardMenuBar!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc remoSp]{proc remoSp \emph{string}}

Procedure to remove random whitespace characters.
\begin{description}
\item [in]  string -- the string to remove space from.
\index{remoSp!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc AddExtraMenuButton]{proc AddExtraMenuButton \emph{buttonLabel \{mbar .menuBar\}}}

Procedure to add an extra menu button to a menu bar.  Typically this would be
something like a ``Windows'' or ``Special'' menu.
\begin{description}
\item [in]  buttonLabel -- the menu button label.
\item [in]  mbar -- the menubar to add the menu button to.
\index{AddExtraMenuButton!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc GetMenuByName]{proc GetMenuByName \emph{label \{mbar .menuBar\}}}

Procedure to fetch the menu associated with the named label.
\begin{description}
\item [in]  label -- the label to look for.
\item [in]  mbar -- the menu bar to search.
\index{GetMenuByName!procedure}
\end{description}


\noindent\rule{\textwidth}{0.4pt}
\section[proc DeleteMenuByName]{proc DeleteMenuByName \emph{label \{mbar .menuBar\}}}

Procedure to delete a menu button from a menu bar.
\begin{description}
\item [in]  label -- the menu button to delete.
\item [in]  mbar -- the menubar to delete the menu button from.
\index{DeleteMenuByName!procedure}
\end{description}
% End of input file ../../Scripts/StdMenuBar.tcl