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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libsigc++ 2.0: Slots</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table border="0" width="100%">
<tr>
<td width="10%" height="40"><img src="../../images/libsigc_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td>
<td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td>
</tr>
</table>
<center>
<a class="qindex" href="../../index.html">Main Page</a>
<a class="qindex" href="modules.html">Groups</a>
<a class="qindex" href="namespaces.html"> Namespaces</a>
</center>
<hr width="100%"/>
<!-- Generated by Doxygen 1.3.9.1 -->
<h1>Slots<br>
<small>
[<a class="el" href="group__functors.html">Functors</a>]</small>
</h1>Slots are type-safe representations of callback methods and functions.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot0.html">sigc::slot0<T_return></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot0.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot1.html">sigc::slot1<T_return, T_arg1></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot1.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot2.html">sigc::slot2<T_return, T_arg1, T_arg2></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot2.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot3.html">sigc::slot3<T_return, T_arg1, T_arg2, T_arg3></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot3.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot4.html">sigc::slot4<T_return, T_arg1, T_arg2, T_arg3, T_arg4></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot4.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot5.html">sigc::slot5<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot5.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot6.html">sigc::slot6<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot6.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot7.html">sigc::slot7<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an arbitrary functor to a unified type which is opaque. <a href="classsigc_1_1slot7.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot.html">sigc::slot<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience wrapper for the numbered sigc::slot# templates. <a href="classsigc_1_1slot.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot__base.html">sigc::slot_base</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Base type for slots. <a href="classsigc_1_1slot__base.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Slots are type-safe representations of callback methods and functions.
<p>
A Slot can be constructed from any function, regardless of whether it is a global function, a member method, static, or virtual.<p>
Use the <a class="el" href="group__mem__fun.html#ga56">sigc::mem_fun()</a> and <a class="el" href="group__ptr__fun.html#ga8">sigc::ptr_fun()</a> template functions to get a <a class="el" href="classsigc_1_1slot.html">sigc::slot</a>, like so:<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classsigc_1_1slot.html">sigc::slot<void, int></a> sl = <a class="code" href="group__mem__fun.html#ga56">sigc::mem_fun</a>(someobj,& SomeClass::somemethod);
</pre></div><p>
or<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classsigc_1_1slot.html">sigc::slot<void, int></a> sl = <a class="code" href="group__ptr__fun.html#ga8">sigc::ptr_fun</a>(&somefunction);
</pre></div><p>
or<p>
<div class="fragment"><pre class="fragment"> m_Button.signal_clicked().connect( sigc::mem_fun(*<span class="keyword">this</span>, &MyWindow::on_button_clicked) );
</pre></div><p>
The compiler will complain if SomeClass::somemethod, etc. have the wrong signature.<p>
You can also pass slots as method parameters where you might normally pass a function pointer. <hr><address><small>
Generated for libsigc++ 2.0 by <a href="http://www.doxygen.org/index.html">
Doxygen</a> 1.3.9.1 © 1997-2001</small></address>
</body>
</html>
|