Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2071

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - The Tcl/Tk Class Interface</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_126.html">previous</A>, <A HREF="ciao_128.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC545" HREF="ciao_toc.html#TOC545">The Tcl/Tk Class Interface</A></H1>
<P>
<A NAME="IDX6126"></A>


<P>
<STRONG>Author(s):</STRONG> Montserrat Urraca, Montserrat Iglesias Urraca, <CODE>http://www.clip.dia.fi.upm.es/</CODE>, The CLIP Group, Facultad de Inform&aacute;tica, Universidad Polit&eacute;cnica de Madrid.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.9#152 (2003/12/4, 17:35:17 CET)


<P>
This library implements an object-orented graphical library with a number of predefined objects, using the Prolog Tcl/Tk interface. This interface allows creating and destroying objects and modifying their properties. The 
<A NAME="IDX6127"></A>
<CODE>window_class</CODE> contains three clases: widget class, menu class, and canvas class. The constructor class is window_class. 


<P>
<STRONG>Note:</STRONG> This library (and the documentation) are still under development. 



<UL>
<LI><A HREF="ciao_127.html#SEC546">Usage and interface (window_class)</A>
<LI><A HREF="ciao_127.html#SEC547">Documentation on exports (window_class)</A>
</UL>



<H2><A NAME="SEC546" HREF="ciao_toc.html#TOC546">Usage and interface (<CODE>window_class</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(window_class)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX6128"></A>
<CODE>window_class/0</CODE>, 
<A NAME="IDX6129"></A>
<CODE>window_class/3</CODE>, 
<A NAME="IDX6130"></A>
<CODE>destructor/0</CODE>, 
<A NAME="IDX6131"></A>
<CODE>show/0</CODE>, 
<A NAME="IDX6132"></A>
<CODE>hide_/0</CODE>, 
<A NAME="IDX6133"></A>
<CODE>title/1</CODE>, 
<A NAME="IDX6134"></A>
<CODE>maxsize/2</CODE>, 
<A NAME="IDX6135"></A>
<CODE>minsize/2</CODE>, 
<A NAME="IDX6136"></A>
<CODE>withdraw/0</CODE>, 
<A NAME="IDX6137"></A>
<CODE>event_loop/0</CODE>.

<LI><EM>Regular Types:</EM>

<A NAME="IDX6138"></A>
<CODE>widget/1</CODE>, 
<A NAME="IDX6139"></A>
<CODE>option/1</CODE>, 
<A NAME="IDX6140"></A>
<CODE>menu/1</CODE>, 
<A NAME="IDX6141"></A>
<CODE>canvas/1</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX6142"></A>
<CODE>objects/objects_rt</CODE>, 
<A NAME="IDX6143"></A>
<CODE>system</CODE>, 
<A NAME="IDX6144"></A>
<CODE>strings</CODE>, 
<A NAME="IDX6145"></A>
<CODE>lists</CODE>, 
<A NAME="IDX6146"></A>
<CODE>tcltk/tcltk</CODE>, 
<A NAME="IDX6147"></A>
<CODE>tcltk/tcltk_low_level</CODE>, 
<A NAME="IDX6148"></A>
<CODE>aggregates</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC547" HREF="ciao_toc.html#TOC547">Documentation on exports (<CODE>window_class</CODE>)</A></H2>
<P>
<A NAME="IDX6149"></A>
<A NAME="IDX6150"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>widget/1:</B>
<DD><A NAME="IDX6151"></A>


<P>
Each <CODE>Widget</CODE> type is characterized in two ways: first, the form of the create command used to create instances of the type; and second, a set of configuration options for items of that type, which may be used in the create and itemconfigure widget commands.


<P>
<STRONG>Usage:</STRONG> <CODE>widget(W)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>W</CODE> is a reference to one type of the widget widgets.

</UL>

</DL>

<P>
<A NAME="IDX6152"></A>
<A NAME="IDX6153"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>option/1:</B>
<DD><A NAME="IDX6154"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>option(O)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>O</CODE> is <EM>hidden</EM> if the Widget is not visible or <EM>shown</EM> if its visible.

</UL>

</DL>

<P>
<A NAME="IDX6155"></A>
<A NAME="IDX6156"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>menu/1:</B>
<DD><A NAME="IDX6157"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>menu(M)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>M</CODE> is a reference to one type of the menu.

</UL>

</DL>

<P>
<A NAME="IDX6158"></A>
<A NAME="IDX6159"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>canvas/1:</B>
<DD><A NAME="IDX6160"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>canvas(C)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>C</CODE> is a reference to one type of the canvas.

</UL>

</DL>

<P>
<A NAME="IDX6161"></A>
<A NAME="IDX6162"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>window_class/0:</B>
<DD><A NAME="IDX6163"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Creates a new interpreter, asserting the predicate <EM>interp(I)</EM>, and the widgets, menus and canvases objects.

</UL>

</DL>

<P>
<A NAME="IDX6164"></A>
<A NAME="IDX6165"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>window_class/3:</B>
<DD><A NAME="IDX6166"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>window_class(+WidgetList, +MenusList, +CanvasList)</CODE>

<UL>
<LI><EM>Description:</EM> Adds the widgets, menus and canvases in the list to the window object.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+WidgetList</CODE> is a list.
 (<CODE>basic_props:list/1</CODE>)

<CODE>+MenusList</CODE> is a list.
 (<CODE>basic_props:list/1</CODE>)

<CODE>+CanvasList</CODE> is a list.
 (<CODE>basic_props:list/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX6167"></A>
<A NAME="IDX6168"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>destructor/0:</B>
<DD><A NAME="IDX6169"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Deletes the widgets, menus and canvases of the window object and the window object.

</UL>

</DL>

<P>
<A NAME="IDX6170"></A>
<A NAME="IDX6171"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>show/0:</B>
<DD><A NAME="IDX6172"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Adds widgets, menus and canvas to the window object.

</UL>

</DL>

<P>
<A NAME="IDX6173"></A>
<A NAME="IDX6174"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>hide_/0:</B>
<DD><A NAME="IDX6175"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Removes widgets, menus and canvas from the window object.

</UL>

</DL>

<P>
<A NAME="IDX6176"></A>
<A NAME="IDX6177"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>title/1:</B>
<DD><A NAME="IDX6178"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>title(+X)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> specifies the title for window. The default window title is the name of the window.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+X</CODE> is a string (a list of character codes).
 (<CODE>basic_props:string/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX6179"></A>
<A NAME="IDX6180"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>maxsize/2:</B>
<DD><A NAME="IDX6181"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>maxsize(+X, +Y)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> specifies the maximum width and <CODE>Y</CODE> the maximum height for the window.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+X</CODE> is an integer.
 (<CODE>basic_props:int/1</CODE>)

<CODE>+Y</CODE> is an integer.
 (<CODE>basic_props:int/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX6182"></A>
<A NAME="IDX6183"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>minsize/2:</B>
<DD><A NAME="IDX6184"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>minsize(+X, +Y)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> specifies the minimum width and <CODE>Y</CODE> the minimum height for the window.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+X</CODE> is an integer.
 (<CODE>basic_props:int/1</CODE>)

<CODE>+Y</CODE> is an integer.
 (<CODE>basic_props:int/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX6185"></A>
<A NAME="IDX6186"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>withdraw/0:</B>
<DD><A NAME="IDX6187"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Arranges for window to be withdrawn from the screen.

</UL>

</DL>

<P>
<A NAME="IDX6188"></A>
<A NAME="IDX6189"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>event_loop/0:</B>
<DD><A NAME="IDX6190"></A>


<P>
<STRONG>Usage:</STRONG> 

<UL>
<LI><EM>Description:</EM> Waits for a <EM>Tcl/Tk</EM> event.

</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_126.html">previous</A>, <A HREF="ciao_128.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>