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,
@@ -255,7 +255,7 @@ int main()
255
255
<para >Easy.</para >
256
256
</sect1 >
257
257
258
- <sect1 >
258
+ <sect1 id = " sect-disconnecting " >
259
259
<title >Disconnecting</title >
260
260
261
261
<para >If you decide you no longer want your code to be called whenever a signal is
@@ -267,10 +267,10 @@ int main()
267
267
</sect1 >
268
268
</chapter >
269
269
270
- <chapter id =" sec -writing" >
270
+ <chapter id =" chapter -writing" >
271
271
<title >Writing your own signals</title >
272
272
273
- <sect1 >
273
+ <sect1 id = " sect-quick-recap " >
274
274
<title >Quick recap</title >
275
275
<para >If all you want to do is use gtkmm, and connect your functionality to its
276
276
signals, you can probably stop reading here.</para >
@@ -318,7 +318,7 @@ void AlienDetector::run()
318
318
</programlisting >
319
319
</sect1 >
320
320
321
- <sect1 >
321
+ <sect1 id = " sect-return-values " >
322
322
<title >What about return values?</title >
323
323
<para >If you only ever have one slot connected to a signal, or if you only care
324
324
about the return value of the last registered one, it's quite straightforward:</para >
@@ -332,10 +332,10 @@ a_return_value = somesignal.emit();
332
332
</sect1 >
333
333
</chapter >
334
334
335
- <chapter id =" sec -advanced" >
335
+ <chapter id =" chapter -advanced" >
336
336
<title >Advanced topics</title >
337
337
338
- <sect1 >
338
+ <sect1 id = " sect-rebinding " >
339
339
<title >Rebinding</title >
340
340
<para >Suppose you already have a function that you want to be called when a
341
341
signal is emitted, but it takes the wrong argument types. For example, lets try
@@ -401,7 +401,7 @@ myaliendetector.signal_detected.connect( sigc::hide<std::string>( sigc::pt
401
401
<para ><literal remap =" tt" >sigc::hide_return</literal > effectively makes the return type void.</para >
402
402
</sect1 >
403
403
404
- <sect1 >
404
+ <sect1 id = " sect-retyping " >
405
405
<title >Retyping</title >
406
406
<para >A similar topic is retyping. Perhaps you have a signal that takes an <literal remap =" tt" >int</literal >, but
407
407
you want to connect a function that takes a <literal remap =" tt" >double</literal >.</para >
@@ -424,7 +424,7 @@ asignal.connect( sigc::retype( sigc::ptr_fun(&dostuff) ) );
424
424
</sect1 >
425
425
</chapter >
426
426
427
- <chapter id =" sec -reference" >
427
+ <chapter id =" chapter -reference" >
428
428
<title >Reference</title >
429
429
<para >See the reference documentation <ulink url =" http://library.gnome.org/devel/libsigc++/unstable/" >online</ulink ></para >
430
430
</chapter >
0 commit comments