16
16
</abstract >
17
17
</bookinfo >
18
18
19
- <chapter id =" sec -introduction" >
19
+ <chapter id =" chapter -introduction" >
20
20
<title >Introduction</title >
21
21
22
- <sect1 >
22
+ <sect1 id = " sect-motivation " >
23
23
<title >Motivation</title >
24
24
25
25
<para >There are many situations in which it is desirable to decouple code that
@@ -72,10 +72,10 @@ register_click_handler(okbutton, clicked, somedata);
72
72
</sect1 >
73
73
</chapter >
74
74
75
- <chapter id =" sec -connecting" >
75
+ <chapter id =" chapter -connecting" >
76
76
<title >Connecting your code to signals</title >
77
77
78
- <sect1 >
78
+ <sect1 id = " sect-simple-ex " >
79
79
<title >A simple example</title >
80
80
<para >So to get some experience, lets look at a simple example...</para >
81
81
@@ -140,7 +140,7 @@ int main()
140
140
141
141
</sect1 >
142
142
143
- <sect1 >
143
+ <sect1 id = " sect-using-mem-func " >
144
144
<title >Using a member function</title >
145
145
146
146
<para >Suppose you found a more sophisticated alien alerter class on the web,
@@ -189,7 +189,7 @@ int main()
189
189
offers.</para >
190
190
</sect1 >
191
191
192
- <sect1 >
192
+ <sect1 id = " sect-signals-with-pars " >
193
193
<title >Signals with parameters</title >
194
194
195
195
<para >Functions taking no parameters and returning void are quite useful,
@@ -254,7 +254,7 @@ int main()
254
254
<para >Easy.</para >
255
255
</sect1 >
256
256
257
- <sect1 >
257
+ <sect1 id = " sect-disconnecting " >
258
258
<title >Disconnecting</title >
259
259
260
260
<para >If you decide you no longer want your code to be called whenever a signal is
@@ -266,10 +266,10 @@ int main()
266
266
</sect1 >
267
267
</chapter >
268
268
269
- <chapter id =" sec -writing" >
269
+ <chapter id =" chapter -writing" >
270
270
<title >Writing your own signals</title >
271
271
272
- <sect1 >
272
+ <sect1 id = " sect-quick-recap " >
273
273
<title >Quick recap</title >
274
274
<para >If all you want to do is use gtkmm, and connect your functionality to its
275
275
signals, you can probably stop reading here.</para >
@@ -317,7 +317,7 @@ void AlienDetector::run()
317
317
</programlisting >
318
318
</sect1 >
319
319
320
- <sect1 >
320
+ <sect1 id = " sect-return-values " >
321
321
<title >What about return values?</title >
322
322
<para >If you only ever have one slot connected to a signal, or if you only care
323
323
about the return value of the last registered one, it's quite straightforward:</para >
@@ -331,10 +331,10 @@ a_return_value = somesignal.emit();
331
331
</sect1 >
332
332
</chapter >
333
333
334
- <chapter id =" sec -advanced" >
334
+ <chapter id =" chapter -advanced" >
335
335
<title >Advanced topics</title >
336
336
337
- <sect1 >
337
+ <sect1 id = " sect-rebinding " >
338
338
<title >Rebinding</title >
339
339
<para >Suppose you already have a function that you want to be called when a
340
340
signal is emitted, but it takes the wrong argument types. For example, lets try
@@ -400,7 +400,7 @@ myaliendetector.signal_detected.connect( sigc::hide<std::string>( sigc::pt
400
400
<para ><literal remap =" tt" >sigc::hide_return</literal > effectively makes the return type void.</para >
401
401
</sect1 >
402
402
403
- <sect1 >
403
+ <sect1 id = " sect-retyping " >
404
404
<title >Retyping</title >
405
405
<para >A similar topic is retyping. Perhaps you have a signal that takes an <literal remap =" tt" >int</literal >, but
406
406
you want to connect a function that takes a <literal remap =" tt" >double</literal >.</para >
@@ -423,7 +423,7 @@ asignal.connect( sigc::retype( sigc::ptr_fun(&dostuff) ) );
423
423
</sect1 >
424
424
</chapter >
425
425
426
- <chapter id =" sec -reference" >
426
+ <chapter id =" chapter -reference" >
427
427
<title >Reference</title >
428
428
<para >See the reference documentation <ulink url =" http://library.gnome.org/devel/libsigc++/unstable/" >online</ulink ></para >
429
429
</chapter >
0 commit comments