File: gtksourceview-gtksourcebuffer.xml

package info (click to toggle)
gnome-python-desktop 2.32.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,528 kB
  • ctags: 983
  • sloc: sh: 10,214; xml: 8,851; ansic: 3,428; python: 1,457; makefile: 664
file content (1147 lines) | stat: -rw-r--r-- 53,838 bytes parent folder | download | duplicates (5)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtksourcebuffer">
  <refnamediv>
    <refname>gtksourceview.SourceBuffer</refname>
    <refpurpose>Text buffer object for <link linkend="class-gtksourceview">gtksourceview.SourceView</link></refpurpose>
  </refnamediv>

<!-- ********************************* -->
<!-- BEGIN OF GTKSOURCEBUFFER SYNOPSIS -->
<!-- ********************************* -->

<refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
    <ooclass><classname>gtksourceview.SourceBuffer</classname></ooclass>
    <ooclass><classname><link linkend="class-gtktextbuffer">gtk.TextBuffer</link></classname></ooclass>
    
    <constructorsynopsis language="python">
	<methodname><link linkend="constructor-gtksourcebuffer">gtksourceview.SourceBuffer</link></methodname>
	<methodparam><parameter role="keyword">buffer</parameter><initializer>None</initializer></methodparam>
    </constructorsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--set-check-brackets">set_check_brackets</link></methodname>
	<methodparam><parameter role="keyword">check_brackets</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--get-check-brackets">get_check_brackets</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--set-bracket-match-style">set_bracket_match_style</link></methodname>
	<methodparam><parameter role="keyword">style</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--set-highlight">set_highlight</link></methodname>
	<methodparam><parameter role="keyword">highlight</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-highlight">get_highlight</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--set-max-undo-levels">set_max_undo_levels</link></methodname>
	<methodparam><parameter role="keyword">max_undo_levels</parameter></methodparam>
    </methodsynopsis>

    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--get-max-undo-levels">get_max_undo_levels</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
      
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--set-language">set_language</link></methodname>
	<methodparam><parameter role="keyword">language</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--get-language">get_language</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--set-escape-char">set_escape_char</link></methodname>
	<methodparam><parameter role="keyword">escape_char</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--get-escape-char">get_escape_char</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--can-undo">can_undo</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--can-redo">can_redo</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--undo">undo</link></methodname>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--redo">redo</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--begin-not-undoable-action">begin_not_undoable_action</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--end-not-undoable-action">end_not_undoable_action</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
	<methodname><link linkend="method-gtksourcebuffer--create-marker">create_marker</link></methodname>
	<methodparam><parameter role="keyword">name</parameter></methodparam>
    <methodparam><parameter role="keyword">type</parameter></methodparam>
    <methodparam><parameter role="keyword">where</parameter></methodparam>
    </methodsynopsis>
    
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--move-marker">move_marker</link></methodname>
	<methodparam><parameter role="keyword">marker</parameter></methodparam>
    <methodparam><parameter role="keyword">where</parameter></methodparam>
    </methodsynopsis>
	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--delete-marker">delete_marker</link></methodname>
	<methodparam><parameter role="keyword">marker</parameter></methodparam>
    </methodsynopsis>
	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-marker">get_marker</link></methodname>
    <methodparam><parameter role="keyword">name</parameter></methodparam>
    </methodsynopsis>
	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-markers-in-region">get_marker_in_region</link></methodname>
    <methodparam><parameter role="keyword">start</parameter></methodparam>
    <methodparam><parameter role="keyword">end</parameter></methodparam>
    </methodsynopsis>
 	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-first-marker">get_first_marker</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>     
 	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-last-marker">get_last_marker</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>     
 	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-iter-at-marker">get_iter_at_marker</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>     
 	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-next-marker">get_next_marker</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
 	
    <methodsynopsis language="python">
    <methodname><link linkend="method-gtksourcebuffer--get-prev-marker">get_prev_marker</link></methodname>
	<methodparam></methodparam>
    </methodsynopsis>
</classsynopsis>

<programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
<methodname><link linkend="function-gtksourcebuffer--new-with-language">gtksourceview.gtk_source_buffer_new_with_language</link></methodname>
<methodparam><parameter role="keyword"><link linkend="class-gtktextbuffer">gtksourceview.SourceLanguage</link></parameter></methodparam>
</methodsynopsis></programlisting>
</refsect1>

<!-- ********************************* -->
<!-- BEGIN OF GTKSOURCEBUFFER ANCESTRY -->
<!-- ********************************* -->

<refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtktextbuffer">gtk.TextBuffer</link>
    +-- <link linkend="class-gtksourcebuffer">gtksourceview.SourceBuffer</link>
</synopsis>
</refsect1>

<!-- *********************************** -->
<!-- BEGIN OF GTKSOURCEBUFFER PROPERTIES -->
<!-- *********************************** -->

<refsect1>
    <title>Properties</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"check-brackets"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>TRUE</literal> bracket match highlighting is activated.</entry>
	    </row>

	    <row valign="top">
	      <entry>"escape-char"</entry>
	      <entry>Read-Write</entry>
	      <entry>Escaping character for syntax patterns.</entry>
	    </row>

	    <row valign="top">
	      <entry>"highlight"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>TRUE</literal> the syntax highlighting is activated.</entry>
	    </row>

	    <row valign="top">
	      <entry>"language"</entry>
	      <entry>Read-Write</entry>
	      <entry>Language object to get highlighting patterns from.</entry>
	    </row>

	    <row valign="top">
	      <entry>"max-undo-levels"</entry>
	      <entry>Read-Write</entry>
	      <entry>Number of undo levels for the buffer.</entry>
	    </row>

    </tbody>
	</tgroup>
      </informaltable>
    </blockquote>
</refsect1>

<!-- ****************************************** -->
<!-- BEGIN OF GTKSOURCEBUFFER SIGNAL PROTOTYPES -->
<!-- ****************************************** -->

<refsect1>
    <title>Signal Prototypes</title>
    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtksourcebuffer--can-redo">"can-redo"</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>sourceview</parameter></methodparam>
            <methodparam><parameter>arg1</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term>"<link linkend="signal-gtksourcebuffer--can-undo">"can-undo"</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>sourceview</parameter></methodparam>
            <methodparam><parameter>arg1</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term>"<link linkend="signal-gtksourcebuffer--highlight-updated">"highlight-updated"</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>sourceview</parameter></methodparam>
            <methodparam><parameter>start</parameter></methodparam>
            <methodparam><parameter>end</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>"<link linkend="signal-gtksourcebuffer--marker-updated">"marker-updated"</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>sourceview</parameter></methodparam>
            <methodparam><parameter>iter</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>
</refsect1>

<!-- ************************************ -->
<!-- BEGIN OF GTKSOURCEBUFFER DESCRIPTION -->
<!-- ************************************ -->

<refsect1 id="description-gtksourcebuffer">
    <title>Description</title>

<para>
The <link linkend="class-gtksourcebuffer"><classname>gtksourceview.SourceBuffer</classname></link>
is the model for <link linkend="class-gtksourceview"><classname>gtksourceview.SourceView</classname></link>
widgets. It extends the <link linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
object by adding features necessary to display and edit source code: syntax highlighting, bracket matching and markers. 
It also implements support for undo/redo operations.
</para>

<para>
To create a <link linkend="class-gtksourcebuffer"><classname>gtksourceview.SourceBuffer</classname></link> 
use <link linkend="function-gtksourcebuffer--new"><methodname>gtksourceview.gtk_source_buffer_new</methodname>()</link> 
or <link linkend="function-gtksourcebuffer--new-with-language"><methodname>gtksourceview.gtk_source_buffer_new_with_language</methodname></link>.
The second form is just a convenience function which allows you to initially set a 
<link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link>.
</para>

<para>
By default highlighting is enabled, but you can disable it with 
<link linkend="method-gtksourcebuffer--set-highlight"><methodname>set_highlight</methodname>()</link>. This can be useful if you're not using 
<link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
objects to set the highlighting patterns, and instead you're manually adding 
<link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> objects to the buffer's tag table.
</para>
</refsect1>

<!-- ************************************ -->
<!-- BEGIN OF GTKSOURCEBUFFER CONSTRUCTOR -->
<!-- ************************************ -->

<refsect1 id="constructor-gtksourcebuffer">
  <title>Constructor</title>

  <programlisting><constructorsynopsis language="python">
	  <methodname>gtksourceview.SourceBuffer</methodname>
	  <methodparam><parameter role="keyword">table</parameter><initializer>None</initializer></methodparam>
  </constructorsynopsis></programlisting>
    
  <variablelist>
    <varlistentry>
	    <term><parameter role="keyword">table</parameter>&nbsp;:</term>
	    <listitem><simpara>a <link linkend="class-gtksourcetagtable"><classname>gtksourceview.SourceTagTable</classname></link> 
      or <literal>None</literal></simpara></listitem>
    </varlistentry>

    <varlistentry>
	    <term><emphasis>Returns</emphasis>&nbsp;:</term>
	    <listitem><simpara>a new <link linkend="class-gtksourcebuffer"><classname>gtksourceview.SourceBuffer</classname></link>.
        </simpara></listitem>
    </varlistentry>
  </variablelist>

  <para>
    Creates a new <link linkend="class-gtksourcebuffer"><classname>gtksourceview.SourceBuffer</classname></link> object.
  </para>
</refsect1>

<!-- ******************************** -->
<!-- BEGIN OF GTKSOURCEBUFFER METHODS -->
<!-- ******************************** -->

<refsect1>
    <title>Methods</title>

  <refsect2 id="method-gtksourcebuffer--set-check-brackets">
      <title>gtksourceview.SourceBuffer.set_check_brackets</title>
      <programlisting><methodsynopsis language="python">
	  <methodname>set_check_brackets</methodname>
	  <methodparam><parameter role="keyword">check_brackets</parameter></methodparam>
	  </methodsynopsis></programlisting>
      
      <variablelist>
	  <varlistentry>
	  <term><parameter role="keyword">check_brackets</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>TRUE</literal> turns on the matching brackets highlight.</simpara></listitem>
	  </varlistentry>
      </variablelist>

      <para>
      The <methodname>set_check_brackets</methodname>() method controls the bracket match highlighting function in the buffer. 
      If activated, when you position your cursor over a bracket character (a parenthesis, a square bracket, etc.) the matching 
      opening or closing bracket character will be highlighted. You can specify the style with the 
      <link linkend="method-gtksourcebuffer--set-bracket-match-style"><methodname>set_bracket_match_style</methodname></link> function.
	  </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-check-brackets">
    <title>gtksourceview.SourceBuffer.get_check_brackets</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>get_check_brackets</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara><literal>TRUE</literal> if the matching brackets highlight is active, 
	      <literal>FALSE</literal> otherwise.</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The <methodname>get_check_brackets</methodname>() method returns the
      value of the "check-brackets" property which determines if the matching brackets highlight is active.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--set-bracket-match-style">
      <title>gtksourceview.SourceBuffer.set_bracket_match_style</title>
      <programlisting><methodsynopsis language="python">
	  <methodname>set_bracket_match_style</methodname>
	  <methodparam><parameter role="keyword">style</parameter></methodparam>
	  </methodsynopsis></programlisting>
      
      <variablelist>
	  <varlistentry>
	  <term><parameter role="keyword">style</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link linkend="class-gtksourcetagstyle"><classname>gtksourceview.SourceTagStyle</classname></link> 
    specifying colors and text attributes.</simpara></listitem>
	  </varlistentry>
      </variablelist>

      <para>
      The <methodname>set_bracket_match_style</methodname>() method sets the style used for highlighting matching brackets.
	  </para>
  </refsect2>
  
  <refsect2 id="method-gtksourcebuffer--set-highlight">
    <title>gtksourceview.SourceBuffer.set_highlight</title>
    <programlisting><methodsynopsis language="python">
	    <methodname>set_highlight</methodname>
	    <methodparam><parameter role="keyword">highlight</parameter></methodparam>
	    </methodsynopsis></programlisting>
      
      <variablelist>
	      <varlistentry>
	      <term><parameter role="keyword">highlight</parameter>&nbsp;:</term>
	      <listitem><simpara>if <literal>TRUE</literal> turns on the source highlighting.</simpara></listitem>
	      </varlistentry>
      </variablelist>

      <para>
        The <methodname>set_highlight</methodname>() method controls whether text is highlighted in the buffer. If 
        <parameter role="keyword">highlight</parameter> is <literal>TRUE</literal> , the text will be highlighted 
        according to the patterns installed in the buffer (either set with 
        <methodname><link linkend="method-gtksourcebuffer--set-language">set_language</link></methodname> or 
        by adding individual <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> 
        tags to the buffer's tag table). Otherwise, any current highlighted text will be restored to the default buffer style.
      </para>
      <para>
        Tags not of <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> 
        type will not be removed by this option, and normal GtkTextTag priority settings apply when highlighting is enabled.
      </para>
      <para>
        If not using a <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
        for setting the highlighting patterns in the buffer, it is recommended for performance reasons that you add all the 
        <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> 
        tags with highlighting disabled and enable it when finished.
      </para>
  </refsect2>
   
  <refsect2 id="method-gtksourcebuffer--get-highlight">
    <title>gtksourceview.SourceBuffer.get_highlight</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>get_highlight</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara><literal>TRUE</literal> if the source highlighting is active, 
	      <literal>FALSE</literal> otherwise.</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The <methodname>get_highlight</methodname>() method returns the
      value of the "highlight" property which determines if the text highlighting is active.
    </para>
  </refsect2>      
      
  <refsect2 id="method-gtksourcebuffer--set-max-undo-levels">
    <title>gtksourceview.SourceBuffer.set_max_undo_levels</title>
    <programlisting><methodsynopsis language="python">
	    <methodname>set_max_undo_levels</methodname>
	    <methodparam><parameter role="keyword">max_undo_levels</parameter></methodparam>
	    </methodsynopsis></programlisting>
      
      <variablelist>
	      <varlistentry>
	      <term><parameter role="keyword">max_undo_levels</parameter>&nbsp;:</term>
	      <listitem><simpara>	 the desired maximum number of undo levels.</simpara></listitem>
	      </varlistentry>
      </variablelist>

      <para>
        The <methodname>set_max_undo_levels</methodname>() method Sets the number of undo levels for user actions
        the buffer will track. If the number of user actions exceeds the limit set by this function, older actions will be discarded.
      </para>
      <para>
        A new action is started whenever the function 
        <methodname><link linkend="method-gtktextbuffer--begin-user-action">begin_user_action</link></methodname>
        is called. In general, this happens whenever the user presses any key which modifies the buffer, but the undo manager 
        will try to merge similar consecutive actions, such as multiple character insertions into one action. 
        But, inserting a newline does start a new action.
      </para>
  </refsect2> 
   
  <refsect2 id="method-gtksourcebuffer--get-max-undo-levels">
    <title>gtksourceview.SourceBuffer.get_max_undo_levels</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>get_max_undo_levels</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara>the maximum number of possible undo levels.</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The <methodname>get_max_undo_levels</methodname>() method returns the
      value of the "max-undo-levels" property which determines the number of undo levels the buffer will track for buffer edits.
    </para>
  </refsect2>      
  
  <refsect2 id="method-gtksourcebuffer--set-language">
      <title>gtksourceview.SourceBuffer.set_language</title>
      <programlisting><methodsynopsis language="python">
	  <methodname>set_language</methodname>
	  <methodparam><parameter role="keyword">language</parameter></methodparam>
	  </methodsynopsis></programlisting>
      
      <variablelist>
	  <varlistentry>
	  <term><parameter role="keyword">language</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
    or <literal>None</literal>.</simpara></listitem>
	  </varlistentry>
      </variablelist>

      <para>
      The <methodname>set_check_brackets</methodname>() method Sets the 
      <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
      the source buffer will use, adding 
      <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> 
      tags with the language's patterns and setting the escape character with 
      <methodname><link linkend="method-gtksourcebuffer--set-escape-char">set_escape_char</link></methodname>.
      Note that this will remove any 
      <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> 
      tags currently in the buffer's tag table. The buffer holds a reference to the <parameter role="keyword">language</parameter> set.
	  </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-language">
    <title>gtksourceview.SourceBuffer.get_language</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_language</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> the 
        <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
        set by <methodname><link linkend="method-gtksourcebuffer--set-language">set_language</link></methodname>.
        </simpara></listitem>
	    </varlistentry>
    </variablelist>
    <para>
      The <methodname>get_check_brackets</methodname>() method determines the 
        <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link> 
        used by the buffer. The returned object should not be unreferenced by the user.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--set-escape-char">
      <title>gtksourceview.SourceBuffer.set_escape_char</title>
      <programlisting><methodsynopsis language="python">
	  <methodname>set_escape_char</methodname>
	  <methodparam><parameter role="keyword">escape_char</parameter></methodparam>
	  </methodsynopsis></programlisting>
      <variablelist>
	  <varlistentry>
	  <term><parameter role="keyword">escape_char</parameter>&nbsp;:</term>
	  <listitem><simpara> the escape character the buffer should use.</simpara></listitem>
	  </varlistentry>
      </variablelist>
    <para>
      The <methodname>set_check_brackets</methodname>() method sets the escape character to be used by the highlighting engine.
	  </para>
    <para>
    When performing the initial analysis, the engine will discard a matching syntax pattern if it's prefixed with an odd number 
    of escape characters. This allows for example to correctly highlight strings with escaped quotes embedded.
    </para>
    <para>
    This setting affects only syntax patterns (i.e. those defined in 
    <link linkend="class-gtksourcetag"><classname>gtksourceview.SourceTag</classname></link> tags).
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-escape-char">
    <title>gtksourceview.SourceBuffer.get_escape_char</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_escape_char</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> the UTF-8 character for the escape character the buffer is using.</simpara></listitem>
	    </varlistentry>
    </variablelist>
    <para>
      The <methodname>get_escape_char</methodname>() method determines the escaping character used by the source buffer highlighting engine.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--can-undo">
    <title>gtksourceview.SourceBuffer.can_undo</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>can_undo</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> <literal>TRUE</literal> if it's possible to undo the last action.</simpara></listitem>
	    </varlistentry>
    </variablelist>
    <para>
      The <methodname>can_undo</methodname>() method determines whether a source buffer can undo the last action.
    </para>
  </refsect2>
  
  <refsect2 id="method-gtksourcebuffer--can-redo">
    <title>gtksourceview.SourceBuffer.can_redo</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>can_redo</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> <literal>TRUE</literal> if a redo is possible.</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The <methodname>can_redo</methodname>() method Determines whether a source buffer can redo the last action 
      (i.e. if the last operation was an undo).
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--undo">
    <title>gtksourceview.SourceBuffer.undo</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>undo</methodname><methodparam></methodparam></methodsynopsis></programlisting>
    <para>
      The <methodname>undo</methodname>() Undoes the last user action which modified the buffer. Use 
      <methodname><link linkend="method-gtksourcebuffer--can-undo">can_undo</link></methodname> 
      to check whether a call to this function will have any effect.
    </para>
    <para>
      Actions are defined as groups of operations between a call to 
      <methodname><link linkend="method-gtktextbuffer--begin-user-action">begin_user_action</link></methodname>() and 
      <methodname><link linkend="method-gtktextbuffer--end-user-action">end_user_action</link></methodname>(), 
      or sequences of similar edits (inserts or deletes) on the same line.
    </para>
  </refsect2>
  
  <refsect2 id="method-gtksourcebuffer--redo">
    <title>gtksourceview.SourceBuffer.redo</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>redo</methodname><methodparam></methodparam></methodsynopsis></programlisting>
    <para>
      The <methodname>redo</methodname>() method redoes the last undo operation. Use 
      <methodname><link linkend="method-gtksourcebuffer--can-redo">can_redo</link></methodname>
      to check whether a call to this function will have any effect.
    </para>
  </refsect2> 

  <refsect2 id="method-gtksourcebuffer--begin-not-undoable-action">
    <title>gtksourceview.SourceBuffer.begin_not_undoable_action</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>begin_not_undoable_action</methodname><methodparam></methodparam></methodsynopsis></programlisting>
    <para>
      The <methodname>begin_not_undoable_action</methodname>() marks the beginning of a not undoable action on the buffer, 
      disabling the undo manager. Typically you would call this function before initially setting the contents of the buffer 
      (e.g. when loading a file in a text editor).
    </para>
    <para>
      You may nest <methodname><link linkend="method-gtksourcebuffer--begin-not-undoable-action">begin_not_undoable_action</link></methodname>() / 
      <methodname><link linkend="method-gtksourcebuffer--end-not-undoable-action">end_not_undoable_action</link></methodname>() blocks.
    </para>
    
  </refsect2>
  
  <refsect2 id="method-gtksourcebuffer--end-not-undoable-action">
    <title>gtksourceview.SourceBuffer.end_not_undoable_action</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>end_not_undoable_action</methodname><methodparam></methodparam></methodsynopsis></programlisting>
    <para>
      The <methodname>end_not_undoable_action</methodname>() method marks the end of a not undoable action on the buffer. 
      When the last not undoable block is closed through the call to this function, the list of undo actions is cleared 
      and the undo manager is re-enabled.
    </para>
  </refsect2> 

  <refsect2 id="method-gtksourcebuffer--create-marker">
    <title>gtksourceview.SourceBuffer.create_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>create_marker</methodname>
	  <methodparam><parameter role="keyword">name</parameter></methodparam>
	  <methodparam><parameter role="keyword">type</parameter></methodparam>
    <methodparam><parameter role="keyword">where</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
	  <varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
    <listitem><simpara> the name of the marker, or <literal>None</literal>.</simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">type</parameter>&nbsp;:</term>
    <listitem><simpara> a string defining the marker type, or <literal>None</literal>.</simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">where</parameter>&nbsp;:</term>
    <listitem><simpara> location to place the marker.</simpara></listitem></varlistentry>
	  <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term>
    <listitem><simpara> a new
    <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>
    </simpara></listitem></varlistentry>
    </variablelist>

    <para>
    The <methodname>set_marker_pixbuf</methodname>() method creates a marker in the 
    <methodname><link linkend="constructor-gtksourcebuffer">gtksourceview.SourceBuffer</link></methodname> of type 
    <parameter>type</parameter>. A marker is semantically very similar to a 
    <classname><link linkend="class-gtktextmark">gtk.TextMark</link></classname>, except it has a type which is used by the 
    <classname><link linkend="class-gtksourceview">gtksourceview.SourceView</link></classname> displaying the buffer to show 
    a pixmap on the left margin, at the line the marker is in. Because of this, a marker is generally associated to a line 
    and not a character position. Markers are also accessible through a position or range in the buffer.
    </para>
    <para>
    Markers are implemented using <classname><link linkend="class-gtktextmark">gtk.TextMark</link></classname>, so all 
    characteristics and restrictions to marks apply to markers too. These includes life cycle issues 
    and "mark-set" and "mark-deleted" signal emissions.
    </para>
    <para>
    Like a <classname><link linkend="class-gtktextmark">gtk.TextMark</link></classname>, a 
    <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>
    can be anonymous if the passed <parameter>name</parameter> is <literal>None</literal>. 
    Also, the buffer owns the markers so you shouldn't unreference it.
    </para>
    <para>
    Markers always have left gravity and are moved to the beginning of the line when the user deletes the line they were in. 
    Also, if the user deletes a region of text which contained lines with markers, those are deleted.
    </para>
    <para>
    Typical uses for a marker are bookmarks, breakpoints, current executing instruction indication in a source file, etc..
    </para>
    </refsect2>

  <refsect2 id="method-gtksourcebuffer--move-marker">
    <title>gtksourceview.SourceBuffer.move_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>move_marker</methodname>
	  <methodparam><parameter role="keyword">marker</parameter></methodparam>
    <methodparam><parameter role="keyword">where</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
	  <varlistentry>
    <term><parameter role="keyword">marker</parameter>&nbsp;:</term>
    <listitem><simpara> a <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>.</simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">where</parameter>&nbsp;:</term>
    <listitem><simpara> the new location for the marker.</simpara></listitem>
    </varlistentry>
    </variablelist>

    <para>
    Moves <parameter>marker</parameter> to the new location <parameter>where</parameter>.
    </para>
    </refsect2>

  <refsect2 id="method-gtksourcebuffer--delete-marker">
    <title>gtksourceview.SourceBuffer.delete_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>delete_marker</methodname>
	  <methodparam><parameter role="keyword">marker</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
	  <varlistentry>
    <term><parameter role="keyword">marker</parameter>&nbsp;:</term>
    <listitem><simpara> a <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>.</simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">where</parameter>&nbsp;:</term>
    <listitem><simpara> the new location for the marker.</simpara></listitem>
    </varlistentry>
    </variablelist>

    <para>
    Deletes <parameter>marker</parameter> from the source buffer. The same conditions as for 
    <classname><link linkend="class-gtktextmark">gtk.TextMark</link></classname>
    apply here. The marker is no longer accessible from the buffer, but if you held a reference to it, it will not be destroyed.
    </para>
    </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-marker">
    <title>gtksourceview.SourceBuffer.get_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_marker</methodname>
	  <methodparam><parameter role="keyword">name</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
	  <varlistentry>
    <term><parameter role="keyword">name</parameter>&nbsp;:</term>
    <listitem><simpara> name of the <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    to retreive.</simpara></listitem></varlistentry>
    </variablelist>

    <para>
    Looks up the <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    named <parameter role="keyword">name</parameter> in <parameter role="keyword">buffer</parameter>, returning 
    <literal>None</literal> if it doesn't exists.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-markers-in-region">
    <title>gtksourceview.SourceBuffer.get_markers_in_region</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_markers_in_region</methodname>
	  <methodparam><parameter role="keyword">begin</parameter></methodparam>
    <methodparam><parameter role="keyword">end</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
    <varlistentry><term><parameter role="keyword">begin</parameter>&nbsp;:</term>
    <listitem><simpara> beginning of the range.</simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">end</parameter>&nbsp;:</term>
    <listitem><simpara> end of the range.</simpara></listitem></varlistentry>
    <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term>
    <listitem><simpara> a list of the <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    in the range.</simpara></listitem></varlistentry>
    </variablelist>

    <para>
    Returns an ordered (by position) list of <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    objects inside the region delimited by the <classname><link linkend="class-gtktextiter">gtk.TextIter</link></classname> 
    <parameter>begin</parameter> and <parameter>end</parameter>. The iters may be in any order.
    </para>
  </refsect2>    
    
  <refsect2 id="method-gtksourcebuffer--get-first-marker">
    <title>gtksourceview.SourceBuffer.get_first_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_first_marker</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> a reference to the first
        <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>, 
        or <literal>None</literal> if there are no markers in the buffer.
        </simpara></listitem>
	    </varlistentry>
    </variablelist>
    <para>
      Returns the first (nearest to the top of the buffer) marker in buffer.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-last-marker">
    <title>gtksourceview.SourceBuffer.get_last_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_last_marker</methodname>
	  <methodparam></methodparam></methodsynopsis></programlisting>
    <variablelist>
	    <varlistentry>
	      <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> a reference to the last
        <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link>, 
        or <literal>None</literal> if there are no markers in the buffer.
        </simpara></listitem>
	    </varlistentry>
    </variablelist>
    <para>
      Returns the last (nearest to the bottom of the buffer) marker in buffer.
    </para>
  </refsect2>    

  <refsect2 id="method-gtksourcebuffer--get-iter-at-marker">
    <title>gtksourceview.SourceBuffer.get_iter_at_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_marker</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
    <methodparam><parameter role="keyword">marker</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
    <varlistentry><term><parameter role="keyword">iter</parameter>&nbsp;:</term>
    <listitem><simpara> a <classname><link linkend="class-gtktextiter">gtk.TextIter</link></classname> to initialize.
    </simpara></listitem></varlistentry>
    <varlistentry><term><parameter role="keyword">marker</parameter>&nbsp;:</term>
    <listitem><simpara> a <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> of buffer.
    </simpara></listitem></varlistentry>
    </variablelist>

    <para>
    Initializes <parameter>iter</parameter> at the location of <parameter>marker</parameter>.
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-next-marker">
    <title>gtksourceview.SourceBuffer.get_next_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_next_marker</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
    <varlistentry><term><parameter role="keyword">iter</parameter>&nbsp;:</term>
    <listitem><simpara> the location to start searching from.</simpara></listitem></varlistentry>
    <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term>
    <listitem><simpara> the <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    nearest to the right of <parameter>iter</parameter>, or <literal>None</literal> if there are no more markers after 
    <parameter>iter</parameter>.</simpara></listitem></varlistentry>
    </variablelist>

    <para>
    Returns the nearest marker to the right of <parameter>iter</parameter>. If there are multiple markers at the same position, 
    this function will always return the first one (from the internal linked list), even if starting the search exactly at its location. 
    You can get the others using <methodname><link linkend="method-gtksourcemarker--next">next</link></methodname>().
    </para>
  </refsect2>

  <refsect2 id="method-gtksourcebuffer--get-prev-marker">
    <title>gtksourceview.SourceBuffer.get_prev_marker</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>get_prev_marker</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
    </methodsynopsis></programlisting>
    <variablelist>
    <varlistentry><term><parameter role="keyword">iter</parameter>&nbsp;:</term>
    <listitem><simpara> the location to start searching from.</simpara></listitem></varlistentry>
    <varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term>
    <listitem><simpara> the <link linkend="class-gtksourcemarker"><classname>gtksourceview.SourceMarker</classname></link> 
    nearest to the left of <parameter>iter</parameter>, or <literal>None</literal> if there are no more markers before 
    <parameter>iter</parameter>.</simpara></listitem></varlistentry>
    </variablelist>

    <para>
    Returns the nearest marker to the left of <parameter>iter</parameter>. If there are multiple markers at the same position, 
    this function will always return the first one (from the internal linked list), even if starting the search exactly at its location. 
    You can get the others using <methodname><link linkend="method-gtksourcemarker--prev">prev</link></methodname>().
    </para>
  </refsect2>
</refsect1>  

<!-- ********************************** -->
<!-- BEGIN OF GTKSOURCEBUFFER FUNCTIONS -->
<!-- ********************************** -->

<refsect1>
    <title>Functions</title>

  <refsect2 id="function-gtksourcebuffer--new-with-language">
    <title>gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language</title>
    <programlisting><methodsynopsis language="python">
  	  <methodname>gtksourceview.SourceBuffer.gtk_source_buffer_new_with_language</methodname>
      <methodparam><parameter role="keyword">language</parameter></methodparam>
      </methodsynopsis></programlisting>
        
    <variablelist>
	    <varlistentry>
        <term><parameter role="keyword">language</parameter>&nbsp;:</term>
        <listitem><simpara> a <link linkend="class-gtksourcelanguage"><classname>gtksourceview.SourceLanguage</classname></link>.
        </simpara></listitem>
      </varlistentry>
	    <varlistentry>
        <term><emphasis>Returns</emphasis>&nbsp;:</term>
	      <listitem><simpara> a new source buffer which will highlight text according to <parameter>language</parameter>.</simpara></listitem>
      </varlistentry>
    </variablelist>

      <para>
        Creates a new source buffer using the highlighting patterns in <parameter>language</parameter>. 
        This is equivalent to creating a new source buffer with the default tag table and then calling 
        <methodname><link linkend="method-gtksourcebuffer--set-language">set_language</link></methodname>
      </para>

  </refsect2>
</refsect1> 
  
<!-- ******************************** -->
<!-- BEGIN OF GTKSOURCEBUFFER SIGNALS -->
<!-- ******************************** --> 
 
<refsect1>
    <title>Signals</title>

  <refsect2 id="signal-gtksourcebuffer--can-redo">
    <title>The "can-redo" gtksourceview.SourceBuffer Signal</title>
    <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>sourcebuffer</parameter></methodparam>
    <methodparam><parameter>arg1</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	  </methodsynopsis></programlisting>

    <variablelist>
	    <varlistentry>
	      <term><parameter>sourcebuffer</parameter>&nbsp;:</term>
	      <listitem><simpara>the sourcebuffer that received the signal</simpara></listitem>
	    </varlistentry>
      <varlistentry>
	      <term><parameter>arg1</parameter>&nbsp;:</term>
          <listitem><simpara>TRUE if the buffer can now perform a redo.</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified with the 
          <link linkend="method-gobject--connect"><methodname>connect</methodname>()</link> method</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>...</parameter>&nbsp;:</term>
	      <listitem><simpara>additional user parameters (if any)</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The "can-redo" signal is emitted when there is a change in the buffer's ability to redo an operation.
    </para>

  </refsect2>

  <refsect2 id="signal-gtksourcebuffer--can-undo">
    <title>The "can-undo" gtksourceview.SourceBuffer Signal</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>sourcebuffer</parameter></methodparam>
	  <methodparam><parameter>arg1</parameter></methodparam>
    <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	  </methodsynopsis></programlisting>

    <variablelist>
	    <varlistentry>
	      <term><parameter>sourcebuffer</parameter>&nbsp;:</term>
	      <listitem><simpara>the sourcebuffer that received the signal</simpara></listitem>
	    </varlistentry>
       <varlistentry>
	      <term><parameter>arg1</parameter>&nbsp;:</term>
          <listitem><simpara>TRUE if the buffer can now perform an undo.</simpara></listitem>
	    </varlistentry>     
	    <varlistentry>
	      <term><parameter>user_param1</parameter>&nbsp;:</term>
        <listitem><simpara>the first user parameter (if any) specified with the 
        <link linkend="method-gobject--connect"><methodname>connect</methodname>()</link> method</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>...</parameter>&nbsp;:</term>
	      <listitem><simpara>additional user parameters (if any)</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The "can-undo" signal is emitted when there is a change in the buffer's ability to undo an operation.
    </para>
  </refsect2>

  <refsect2 id="signal-gtksourcebuffer--highlight-updated">
    <title>The "highlight-updated" gtksourceview.SourceBuffer Signal</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>sourcebuffer</parameter></methodparam>
	  <methodparam><parameter>start</parameter></methodparam>
    <methodparam><parameter>end</parameter></methodparam>
    <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	  </methodsynopsis></programlisting>

    <variablelist>
	    <varlistentry>
	      <term><parameter>sourcebuffer</parameter>&nbsp;:</term>
	      <listitem><simpara>the sourcebuffer that received the signal</simpara></listitem>
	    </varlistentry>
      <varlistentry>
	      <term><parameter>start</parameter>&nbsp;:</term>
          <listitem><simpara>the <classname><link linkend="class-gtktextiter">gtk.TextIter</link></classname>
          at the start of the updated region.</simpara></listitem>
	    </varlistentry>
      <varlistentry>
	      <term><parameter>end</parameter>&nbsp;:</term>
          <listitem><simpara>the <classname><link linkend="class-gtktextiter">gtk.TextIter</link></classname>
          at the end of the updated region.</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>user_param1</parameter>&nbsp;:</term>
        <listitem><simpara>the first user parameter (if any) specified with the 
        <link linkend="method-gobject--connect"><methodname>connect</methodname>()</link> method</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>...</parameter>&nbsp;:</term>
	      <listitem><simpara>additional user parameters (if any)</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The "highlight-updated" signal is emitted whenever the syntax highlighting information has been updated, 
      so that views can request a redraw if the region changed is visible. Usually only view widgets displaying 
      this buffer will be interested in this signal.
    </para>

  </refsect2>

  <refsect2 id="signal-gtksourcebuffer--marker-updated">
    <title>The "marker-updated" gtksourceview.SourceBuffer Signal</title>

    <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>sourcebuffer</parameter></methodparam>
	  <methodparam><parameter>arg1</parameter></methodparam>
    <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	  </methodsynopsis></programlisting>

    <variablelist>
	    <varlistentry>
	      <term><parameter>sourcebuffer</parameter>&nbsp;:</term>
	      <listitem><simpara>the sourcebuffer that received the signal</simpara></listitem>
	    </varlistentry>
      <varlistentry>
	      <term><parameter>end</parameter>&nbsp;:</term>
          <listitem><simpara>the <classname><link linkend="class-gtktextiter">gtk.TextIter</link></classname>
          at the location where the change occurred.</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>user_param1</parameter>&nbsp;:</term>
        <listitem><simpara>the first user parameter (if any) specified with the 
        <link linkend="method-gobject--connect"><methodname>connect</methodname>()</link> method</simpara></listitem>
	    </varlistentry>
	    <varlistentry>
	      <term><parameter>...</parameter>&nbsp;:</term>
	      <listitem><simpara>additional user parameters (if any)</simpara></listitem>
	    </varlistentry>
    </variablelist>

    <para>
      The "can-undo" signal is emitted whenever a marker of <parameter>sourcebuffer</parameter> has changed and 
      needs to be redisplayed by the view. A change in a marker's type or location can trigger this signal.
    </para>
  </refsect2>
</refsect1>
</refentry>