<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>CD_IUP</title> <link rel="stylesheet" type="text/css" href="../../style.css"> </head> <body> <h2 style="text-align: left">CD_IUP - IUP Driver (cdiup.h)</h2> <p>This driver provides access to an interface element of a IUP canvas. IUP is a portable user-interface library used to create portable user-interface applications. See <a target="_top" href="http://www.tecgraf.puc-rio.br/iup">IUP documentation</a>.</p> <h3>Use</h3> <p>The canvas is created by means of a call to the function <font face="Courier"> <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_IUP, Data)</font>, after which other CD functions can be called as usual. This function creates a CD canvas based on the existing IUP canvas. The parameter <font face="Courier">Data</font> is a pointer to a handle of the IUP canvas (<font face="Courier">Ihandle*</font>). For use with CDLUA, a canvas created with IUPLUA must necessarily be passed as parameter.</p> <p>Any amount of such canvases may exist simultaneously, but they should not use the same IUP canvas. It is important to note that a call to function <a href="../func/init.html#cdKillCanvas"> <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> <p>The CD canvas is automatically stored in the IUP canvas as the <strong>"<font face="Courier">_CD_CANVAS</font>"</strong> attribute.</p> <p>To use this driver, it must be linked with the "<b><font face="Courier">iupcd</font></b>" library available in the IUP distribution. </p> <p>In Lua, it is necessary to call function <strong><font face="Courier">cdluaiup_open() </font></strong>after a call to function <strong><font face="Courier">cdlua_open()</font></strong>, apart from linking with the "<strong><font face="Courier">iupluacd</font></strong>" library. This is not necessary if you do require"iupluacd".</p> <h3>Behavior of Functions</h3> <p>This driver is very platform-dependent, although little dependent on the IUP library.</p> <p>For further detail, see the <b> Behavior of Functions</b> in each base driver: <a href="win32.html">GDI</a>, <a href="gdk.html">GDK</a> and <a href="xwin.html">X-Win</a>. To use this driver with a context plus base driver is necessary to call <font face="Courier"><strong> cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> before creating the canvas, see the <a href="../drv/gdiplus.html">GDI+</a>, <a href="../drv/cairo.html">Cairo</a> and <a href="../drv/xrender.html">XRender</a> base drivers.</p> <p>However, it should be noted that some functions behave differently from the basic functions of each platform.</p> <h4>Control </h4> <ul> <li><a href="../func/init.html#cdActivate"><font face="Courier"><strong> cdCanvasActivate</strong></font></a>: updates the canvas size; the IUP canvas might have been resized.</li> </ul> <h4>Exclusive Attributes</h4> <ul> <li>"<b><font face="Courier">WINDOWRGN</font></b>": set the shape of a window to the current complex clipping region (set only). If data is NULL the region is reset.</li> </ul> </body> </html>