<html> <head> <link rel="stylesheet" href="page.css" type="text/css"> <title>fox-toolkit.org - Documentation</title> </head> <body bgcolor=#ffffff link=#990033 vlink=#990033 alink=#990033 text=#000000> <font face='verdana,sans-serif' size=2 > <!---- TOPIC TITLE WITH LOGO---> <table border=0 cellpadding= cellspacing=2 width=100% ><tr><td><a href='http://www.fox-toolkit.org/doc.html'><img src='../art/foxlogo_small.jpg' border=0></a></td><td width=100% valign=bottom><font face='verdana,sans-serif' size=2 ><b> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <br><img src='../art/line.gif' width=100% height=1></b></font></td></tr></table> <p> <!--- TOPIC TITLE WITH LOGO ---> <!-- Generated by Doxygen 1.3.3 --> <h1>FX::FXIcon Class Reference</h1>An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask those pixels where the background should be preserved during the drawing, and a etch bitmap, which is used to draw the icon when it is disabled. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="FXIcon_8h-source.html">FXIcon.h</a>></code> <p> <p>Inheritance diagram for FX::FXIcon: <p><center><img src="classFX_1_1FXIcon.png" usemap="#FX::FXIcon_map" border="0" alt=""></center> <map name="FX::FXIcon_map"> <area href="classFX_1_1FXImage.html" alt="FX::FXImage" shape="rect" coords="0,168,106,192"> <area href="classFX_1_1FXDrawable.html" alt="FX::FXDrawable" shape="rect" coords="0,112,106,136"> <area href="classFX_1_1FXId.html" alt="FX::FXId" shape="rect" coords="0,56,106,80"> <area href="classFX_1_1FXObject.html" alt="FX::FXObject" shape="rect" coords="0,0,106,24"> <area href="classFX_1_1FXBMPIcon.html" alt="FX::FXBMPIcon" shape="rect" coords="116,280,222,304"> <area href="classFX_1_1FXGIFIcon.html" alt="FX::FXGIFIcon" shape="rect" coords="116,336,222,360"> <area href="classFX_1_1FXICOIcon.html" alt="FX::FXICOIcon" shape="rect" coords="116,392,222,416"> <area href="classFX_1_1FXJPGIcon.html" alt="FX::FXJPGIcon" shape="rect" coords="116,448,222,472"> <area href="classFX_1_1FXPCXIcon.html" alt="FX::FXPCXIcon" shape="rect" coords="116,504,222,528"> <area href="classFX_1_1FXPNGIcon.html" alt="FX::FXPNGIcon" shape="rect" coords="116,560,222,584"> <area href="classFX_1_1FXPPMIcon.html" alt="FX::FXPPMIcon" shape="rect" coords="116,616,222,640"> <area href="classFX_1_1FXRGBIcon.html" alt="FX::FXRGBIcon" shape="rect" coords="116,672,222,696"> <area href="classFX_1_1FXTGAIcon.html" alt="FX::FXTGAIcon" shape="rect" coords="116,728,222,752"> <area href="classFX_1_1FXTIFIcon.html" alt="FX::FXTIFIcon" shape="rect" coords="116,784,222,808"> <area href="classFX_1_1FXXBMIcon.html" alt="FX::FXXBMIcon" shape="rect" coords="116,840,222,864"> <area href="classFX_1_1FXXPMIcon.html" alt="FX::FXXPMIcon" shape="rect" coords="116,896,222,920"> </map> <a href="classFX_1_1FXIcon-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a0">FXIcon</a> (<a class="el" href="classFX_1_1FXApp.html">FXApp</a> *a, const FXColor *pix=NULL, FXColor clr=0, FXuint opts=0, FXint w=1, FXint h=1)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a1">create</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a2">detach</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a3">destroy</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a4">render</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a5">resize</a> (FXint w, FXint h)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>FXColor </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a6">getTransparentColor</a> () const</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a7">setTransparentColor</a> (FXColor color)</td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="classFX_1_1FXIcon.html#a8">~FXIcon</a> ()</td></tr> <tr><td colspan=2><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a name="n0" doxytag="FX::FXIcon::FXDC"></a> class </td><td class="memItemRight" valign=bottom><b>FXDC</b></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a name="n1" doxytag="FX::FXIcon::FXDCWindow"></a> class </td><td class="memItemRight" valign=bottom><b>FXDCWindow</b></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a name="n2" doxytag="FX::FXIcon::FXDrawable"></a> class </td><td class="memItemRight" valign=bottom><b>FXDrawable</b></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top><a name="n3" doxytag="FX::FXIcon::FXTopWindow"></a> class </td><td class="memItemRight" valign=bottom><b>FXTopWindow</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask those pixels where the background should be preserved during the drawing, and a etch bitmap, which is used to draw the icon when it is disabled. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="FX::FXIcon::FXIcon"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> FX::FXIcon::FXIcon </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classFX_1_1FXApp.html">FXApp</a> * </td> <td class="mdname" nowrap> <em>a</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const FXColor * </td> <td class="mdname" nowrap> <em>pix</em> = NULL, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FXColor </td> <td class="mdname" nowrap> <em>clr</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FXuint </td> <td class="mdname" nowrap> <em>opts</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FXint </td> <td class="mdname" nowrap> <em>w</em> = 1, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FXint </td> <td class="mdname" nowrap> <em>h</em> = 1</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create an icon with an initial pixel buffer pix, a transparent color clr, and options as in <a class="el" href="classFX_1_1FXImage.html">FXImage</a>. <p> The transparent color is used to determine which pixel values are transparent, i.e. need to be masked out in the absence of a true alpha channel. If the flag IMAGE_OPAQUE is passed, the shape and etch bitmaps are generated as if the image is fully opaque, even if it has an alpha channel or transparancy color. The flag IMAGE_ALPHACOLOR is used to force a specific alpha color instead of the alpha channel obtained from the image file. Specifying IMAGE_ALPHAGUESS causes Icon to obtain the alpha color from the background color of the image; it has the same effect as IMAGE_ALPHACOLOR in the sense that the icon will be transparent for those colors matching the alpha color. </td> </tr> </table> <a name="a8" doxytag="FX::FXIcon::~FXIcon"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual FX::FXIcon::~<a class="el" href="classFX_1_1FXIcon.html">FXIcon</a> </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Destructor. <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a1" doxytag="FX::FXIcon::create"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void FX::FXIcon::create </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create the server side pixmap, the shape bitmap, and the etch bitmap, then call <a class="el" href="classFX_1_1FXIcon.html#a4">render()</a> to fill it with the pixel data from the client-side buffer. <p> After the server- side pixmap and bitmaps have been created, the client-side pixel buffer will be deleted unless IMAGE_KEEP has been specified. If the pixel buffer is not owned, i.e. the flag IMAGE_OWNED is not set, the pixel buffer will not be deleted. <p> Reimplemented from <a class="el" href="classFX_1_1FXImage.html#a6">FX::FXImage</a>. </td> </tr> </table> <a name="a2" doxytag="FX::FXIcon::detach"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void FX::FXIcon::detach </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Detach the server side pixmap, shape bitmap, and etch bitmap from the Icon. <p> Afterwards, the Icon is left as if it never had a server-side resources. <p> Reimplemented from <a class="el" href="classFX_1_1FXImage.html#a7">FX::FXImage</a>. </td> </tr> </table> <a name="a3" doxytag="FX::FXIcon::destroy"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void FX::FXIcon::destroy </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Destroy the server-side pixmap and the shape bitmap and etch bitmap. <p> The client-side pixel buffer is not affected. <p> Reimplemented from <a class="el" href="classFX_1_1FXImage.html#a8">FX::FXImage</a>. </td> </tr> </table> <a name="a4" doxytag="FX::FXIcon::render"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void FX::FXIcon::render </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Render the server-side pixmap, shape bitmap and etch bitmap for the icon from the client-side pixel buffer. <p> <p> Reimplemented from <a class="el" href="classFX_1_1FXImage.html#a10">FX::FXImage</a>. </td> </tr> </table> <a name="a5" doxytag="FX::FXIcon::resize"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void FX::FXIcon::resize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">FXint </td> <td class="mdname" nowrap> <em>w</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FXint </td> <td class="mdname" nowrap> <em>h</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Resize both client-side and server-side representations (if any) to the given width and height. <p> The new representations typically contain garbage after this operation and need to be re-filled. <p> Reimplemented from <a class="el" href="classFX_1_1FXImage.html#a12">FX::FXImage</a>. </td> </tr> </table> <a name="a6" doxytag="FX::FXIcon::getTransparentColor"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> FXColor FX::FXIcon::getTransparentColor </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Obtain transparency color. <p> </td> </tr> </table> <a name="a7" doxytag="FX::FXIcon::setTransparentColor"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void FX::FXIcon::setTransparentColor </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">FXColor </td> <td class="mdname1" valign="top" nowrap> <em>color</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Change transparency color. <p> </td> </tr> </table> </font> <!--- COPYRIGHT --> <p> <table width=100% cellpadding=0 cellspacing=0><tr><td width=100% valign=top id=HEADLINE align=right> <img src='../art/line.gif' width=100% height=1><font size=-1> Copyright © 1997-2004 Jeroen van der Zijp</font> </td></tr></table> </p> <!--- COPYRIGHT --> </body> </html>