projman/hlp/en/bwidget/DynamicHelp.html

127 lines
4.2 KiB
HTML
Raw Normal View History

2015-10-19 13:27:31 +03:00
<HTML>
<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
<BODY BGCOLOR=white>
<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
<DD><B>DynamicHelp</B>
- Provide help to Tk widget or BWidget
</DD></DL>
<DL>
<DT><I><A HREF="#wc">COMMAND</A></I></DT>
<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DD>
<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
<I>class</I>
<I>type</I>
</DD>
<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DD>
<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DD>
</DL>
<BR><HR WIDTH="100%"><BR>
<B><A NAME="descr"></A>DESCRIPTION</B><BR>
<P>
Description text
</P>
<HR WIDTH="50%"><BR>
<B><A NAME="wc">COMMAND</A></B><BR>
<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
</DT><DD>
This command configure the ballon help.
<P>
<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
<DD>
Width of the black border around the balloon.
</DD>
</DL>
<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
<DD>
Define the delay in millisecond of mouse inactivity before displaying
the balloon.
</DD>
</DL>
<BR>Other standard options are:
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
</TR>
</TABLE></DD>
</DD></DL>
<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
<I>class</I>
<I>type</I>
</DT><DD>
Description text
</DD></DL>
<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
<I>path</I>
<I>type</I>
?<I>arg...</I>?
</DT><DD>
Register a help text to the widget <I>path</I>.
<I>type</I> determines the type of the help or the type of the widget.
Depending on <I>type</I>, other options must be provided.
<BR>
<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
<TR><TD><B> type </B></TD><TD><B> options </B></TD></TR>
<TR><TD><B><I> balloon </I></B></TD><TD><I> text </I></TD></TR>
<TR><TD><B><I> variable </I></B></TD><TD><I> varName text </I></TD></TR>
<TR><TD><B><I> menu </I></B></TD><TD><I> varName </I></TD></TR>
<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text </I></TD></TR>
</TABLE>
<BR>If one of the option is missing or is empty, help is removed for this widget.
<BR>For type other than <I>balloon</I>, <I>varName</I> is typically a variable
linked to a label.
<BR>For menu, balloon type help is not available. To declare a help for menu,
you first declare the menu, and then entries of this menu.
<BR>For example:
<BR><BR>
<CENTER>
<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
<TR><TD><PRE>
<FONT COLOR=red><I># create menu</I></FONT>
menu .m -type menubar
<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
. configure -menu .m
.m add cascade -label "File" -menu .m.file
menu .m.file
.m.file add command -label "Open..."
.m.file add command -label "Quit"
<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
label .l -textvariable varinfo
<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
DynamicHelp::register .m.file menu varinfo
<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
DynamicHelp::register .m.file menuentry 0 "Detach menu"
DynamicHelp::register .m.file menuentry 1 "Open a file"
DynamicHelp::register .m.file menuentry 2 "Exit demo"
</PRE></TD></TR></TABLE></CENTER>
<BR>
<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
to its toplevel. In this case, when you create a menu popup, its clone window is also
created, and DynamicHelp::register detects the exitence of the clone window and maps
events to it.
</DD></DL>
<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
<I>path</I>
<I>subpath</I>
?<I>force</I>?
</DT><DD>
Description text
</DD></DL>
</BODY></HTML>