Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / textview.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_TEXTVIEW_H
4 #define _GTKMM_TEXTVIEW_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* Copyright(C) 2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or(at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27 #include <gtkmm/container.h>
28 #include <gtkmm/textbuffer.h>
29 #include <gtkmm/textmark.h>
30 #include <gtkmm/menu.h>
31 #include <gtkmm/adjustment.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkTextView GtkTextView;
36 typedef struct _GtkTextViewClass GtkTextViewClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gtk
41 { class TextView_Class; } // namespace Gtk
42 namespace Gtk
43 {
44
45
46 /** @addtogroup gtkmmEnums Enums and Flags */
47
48 /**
49  * @ingroup gtkmmEnums
50  */
51 enum TextWindowType
52 {
53   TEXT_WINDOW_PRIVATE,
54   TEXT_WINDOW_WIDGET,
55   TEXT_WINDOW_TEXT,
56   TEXT_WINDOW_LEFT,
57   TEXT_WINDOW_RIGHT,
58   TEXT_WINDOW_TOP,
59   TEXT_WINDOW_BOTTOM
60 };
61
62 } // namespace Gtk
63
64
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 namespace Glib
67 {
68
69 template <>
70 class Value<Gtk::TextWindowType> : public Glib::Value_Enum<Gtk::TextWindowType>
71 {
72 public:
73   static GType value_type() G_GNUC_CONST;
74 };
75
76 } // namespace Glib
77 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
78
79
80 namespace Gtk
81 {
82
83
84 /** @defgroup TextView TextView Classes
85  * These classes are used with the Gtk::TextView widget.
86  */
87
88 /** Multi-line text editing widget. It displays a Gtk::TextBuffer.
89  *
90  * @ingroup Widgets
91  * @ingroup Containers
92  * @ingroup TextView
93  */
94
95 class TextView : public Container
96 {
97   public:
98 #ifndef DOXYGEN_SHOULD_SKIP_THIS
99   typedef TextView CppObjectType;
100   typedef TextView_Class CppClassType;
101   typedef GtkTextView BaseObjectType;
102   typedef GtkTextViewClass BaseClassType;
103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
104
105   virtual ~TextView();
106
107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
108
109 private:
110   friend class TextView_Class;
111   static CppClassType textview_class_;
112
113   // noncopyable
114   TextView(const TextView&);
115   TextView& operator=(const TextView&);
116
117 protected:
118   explicit TextView(const Glib::ConstructParams& construct_params);
119   explicit TextView(GtkTextView* castitem);
120
121 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
122
123 public:
124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
125   static GType get_type()      G_GNUC_CONST;
126   static GType get_base_type() G_GNUC_CONST;
127 #endif
128
129   ///Provides access to the underlying C GtkObject.
130   GtkTextView*       gobj()       { return reinterpret_cast<GtkTextView*>(gobject_); }
131
132   ///Provides access to the underlying C GtkObject.
133   const GtkTextView* gobj() const { return reinterpret_cast<GtkTextView*>(gobject_); }
134
135
136 public:
137   //C++ methods used to invoke GTK+ virtual functions:
138
139 protected:
140   //GTK+ Virtual Functions (override these to change behaviour):
141
142   //Default Signal Handlers::
143   virtual void on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment);
144   virtual void on_populate_popup(Menu* menu);
145   virtual void on_set_anchor();
146   virtual void on_insert_at_cursor(const Glib::ustring& str);
147
148
149 private:
150
151 public:
152   TextView();
153   explicit TextView(const Glib::RefPtr<TextBuffer>& buffer);
154
155   
156   /** Sets @a buffer  as the buffer being displayed by @a text_view . The previous
157    * buffer displayed by the text view is unreferenced, and a reference is
158    * added to @a buffer . If you owned a reference to @a buffer  before passing it
159    * to this function, you must remove that reference yourself; Gtk::TextView
160    * will not "adopt" it.
161    * @param buffer A Gtk::TextBuffer.
162    */
163   void set_buffer(const Glib::RefPtr<TextBuffer>& buffer);
164   
165   /** Returns the Gtk::TextBuffer being displayed by this text view.
166    * The reference count on the buffer is not incremented; the caller
167    * of this function won't own a new reference.
168    * @return A Gtk::TextBuffer.
169    */
170   Glib::RefPtr<TextBuffer> get_buffer();
171   
172   /** Returns the Gtk::TextBuffer being displayed by this text view.
173    * The reference count on the buffer is not incremented; the caller
174    * of this function won't own a new reference.
175    * @return A Gtk::TextBuffer.
176    */
177   Glib::RefPtr<const TextBuffer> get_buffer() const;
178
179   #ifndef GTKMM_DISABLE_DEPRECATED
180   /** @deprecated Use scroll_to().
181    */                            
182   bool scroll_to_iter(TextBuffer::iterator& iter, double within_margin);
183
184   /** @deprecated Use scroll_to().
185    */ 
186   void scroll_to_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin);
187
188   /** @deprecated Use scroll_to()
189    */
190   void scroll_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
191  
192   #endif //GTKMM_DISABLE_DEPRECATED
193
194   /** Scrolls the TextView so that @a iter is on the screen, by scrolling the minimal distance to get the mark onscreen,
195    * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
196    * @a within_margin.
197    * @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
198    * in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
199    * oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
200    *
201    * @param iter An iterator pointing to the position that should be made visible by scrolling.
202    * @param within_margin margin as a [0.0,0.5] fraction of screen size.
203    * @result true if scrolling occurred.
204    */
205   bool scroll_to(TextBuffer::iterator& iter, double within_margin = 0);
206
207   /** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
208    * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
209    * @a within_margin.
210    * @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
211    * in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
212    * oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
213    *
214    * @param iter An iterator pointing to the position that should be made visible by scrolling.
215    * @param within_margin margin as a [0.0,0.5] fraction of screen size.
216    * @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
217    * @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
218    * @result true if scrolling occurred.
219    */ 
220   bool scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign);
221   
222
223   /** Scrolls text_view so that @a mark is on the screen, by scrolling the minimal distance to get the mark onscreen,
224    * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
225    * @a within_margin.
226    *
227    * @param mark An mark pointing to the position that should be made visible by scrolling.
228    * @param within_margin margin as a [0.0,0.5] fraction of screen size.
229    */
230   void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin = 0);
231
232  /** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
233    * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
234    * @a within_margin.
235    *
236    * @param mark An mark pointing to the position that should be made visible by scrolling.
237    * @param within_margin margin as a [0.0,0.5] fraction of screen size.
238    * @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
239    * @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
240    */
241   void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign);
242   
243  
244    //It does not do anything more than the default scroll_to(mark).
245
246   
247   /** Moves a mark within the buffer so that it's
248    * located within the currently-visible text area.
249    * @param mark A Gtk::TextMark.
250    * @return <tt>true</tt> if the mark moved (wasn't already onscreen).
251    */
252   bool move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
253   
254   /** Moves the cursor to the currently visible region of the
255    * buffer, it it isn't there already.
256    * @return <tt>true</tt> if the cursor had to be moved.
257    */
258   bool place_cursor_onscreen();
259
260   
261   /** Fills @a visible_rect  with the currently-visible
262    * region of the buffer, in buffer coordinates. Convert to window coordinates
263    * with buffer_to_window_coords().
264    * @param visible_rect Rectangle to fill.
265    */
266   void get_visible_rect(Gdk::Rectangle& visible_rect) const;
267   
268   /** Toggles whether the insertion point is displayed. A buffer with no editable
269    * text probably shouldn't have a visible cursor, so you may want to turn
270    * the cursor off.
271    * @param setting Whether to show the insertion cursor.
272    */
273   void set_cursor_visible(bool setting = true);
274   
275   /** Find out whether the cursor is being displayed.
276    * @return Whether the insertion mark is visible.
277    */
278   bool get_cursor_visible() const;
279
280   
281   /** Gets a rectangle which roughly contains the character at @a iter .
282    * The rectangle position is in buffer coordinates; use
283    * buffer_to_window_coords() to convert these
284    * coordinates to coordinates for one of the windows in the text view.
285    * @param iter A Gtk::TextIter.
286    * @param location Bounds of the character at @a iter .
287    */
288   void get_iter_location(const TextBuffer::iterator&  iter, Gdk::Rectangle& location) const;
289   
290   /** Retrieves the iterator at buffer coordinates @a x  and @a y . Buffer
291    * coordinates are coordinates for the entire buffer, not just the
292    * currently-displayed portion.  If you have coordinates from an
293    * event, you have to convert those to buffer coordinates with
294    * window_to_buffer_coords().
295    * @param iter A Gtk::TextIter.
296    * @param x X position, in buffer coordinates.
297    * @param y Y position, in buffer coordinates.
298    */
299   void get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const;
300   
301   /** Retrieves the iterator pointing to the character at buffer 
302    * coordinates @a x  and @a y . Buffer coordinates are coordinates for 
303    * the entire buffer, not just the currently-displayed portion.  
304    * If you have coordinates from an event, you have to convert 
305    * those to buffer coordinates with 
306    * window_to_buffer_coords().
307    * 
308    * Note that this is diffferent from get_iter_at_location(),
309    * which returns cursor locations, i.e. positions <em>between</em>
310    * characters.
311    * 
312    * Since: 2.6
313    * @param iter A Gtk::TextIter.
314    * @param x X position, in buffer coordinates.
315    * @param y Y position, in buffer coordinates.
316    */
317   void get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const;
318   
319   /** Gets the y coordinate of the top of the line containing @a iter ,
320    * and the height of the line. The coordinate is a buffer coordinate;
321    * convert to window coordinates with buffer_to_window_coords().
322    * @param iter A Gtk::TextIter.
323    * @param y Return location for a y coordinate.
324    * @param height Return location for a height.
325    */
326   void get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const;
327
328   
329   /** Gets the Gtk::TextIter at the start of the line containing
330    * the coordinate @a y . @a y  is in buffer coordinates, convert from
331    * window coordinates with window_to_buffer_coords().
332    * If non-<tt>0</tt>, @a line_top  will be filled with the coordinate of the top
333    * edge of the line.
334    * @param target_iter A Gtk::TextIter.
335    * @param y A y coordinate.
336    * @param line_top Return location for top coordinate of the line.
337    */
338   void get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const;
339
340   
341   /** Converts coordinate ( @a buffer_x , @a buffer_y ) to coordinates for the window
342    *  @a win , and stores the result in ( @a window_x , @a window_y ). 
343    * 
344    * Note that you can't convert coordinates for a nonexisting window (see 
345    * set_border_window_size()).
346    * @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
347    * @param buffer_x Buffer x coordinate.
348    * @param buffer_y Buffer y coordinate.
349    * @param window_x Window x coordinate return location.
350    * @param window_y Window y coordinate return location.
351    */
352   void buffer_to_window_coords(TextWindowType  win,
353                                             int buffer_x, int buffer_y,
354                                             int& window_x, int& window_y) const;
355   
356   /** Converts coordinates on the window identified by @a win  to buffer
357    * coordinates, storing the result in ( @a buffer_x , @a buffer_y ).
358    * 
359    * Note that you can't convert coordinates for a nonexisting window (see 
360    * set_border_window_size()).
361    * @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
362    * @param window_x Window x coordinate.
363    * @param window_y Window y coordinate.
364    * @param buffer_x Buffer x coordinate return location.
365    * @param buffer_y Buffer y coordinate return location.
366    */
367   void window_to_buffer_coords(TextWindowType  win,
368                                             int window_x, int window_y,
369                                             int& buffer_x, int& buffer_y) const;
370
371   
372   /** Retrieves the Gdk::Window corresponding to an area of the text view;
373    * possible windows include the overall widget window, child windows
374    * on the left, right, top, bottom, and the window that displays the
375    * text buffer. Windows are <tt>0</tt> and nonexistent if their width or
376    * height is 0, and are nonexistent before the widget has been
377    * realized.
378    * @param win Window to get.
379    * @return A Gdk::Window, or <tt>0</tt>.
380    */
381   Glib::RefPtr<Gdk::Window> get_window(TextWindowType win);
382   
383   /** Retrieves the Gdk::Window corresponding to an area of the text view;
384    * possible windows include the overall widget window, child windows
385    * on the left, right, top, bottom, and the window that displays the
386    * text buffer. Windows are <tt>0</tt> and nonexistent if their width or
387    * height is 0, and are nonexistent before the widget has been
388    * realized.
389    * @param win Window to get.
390    * @return A Gdk::Window, or <tt>0</tt>.
391    */
392   Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const;
393   
394   /** Usually used to find out which window an event corresponds to.
395    * If you connect to an event signal on @a text_view , this function
396    * should be called on <tt>event->window</tt> to
397    * see which window it was.
398    * @param window A window type.
399    * @return The window type.
400    */
401   TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window);
402
403   
404   /** Sets the width of Gtk::TEXT_WINDOW_LEFT or Gtk::TEXT_WINDOW_RIGHT,
405    * or the height of Gtk::TEXT_WINDOW_TOP or Gtk::TEXT_WINDOW_BOTTOM.
406    * Automatically destroys the corresponding window if the size is set
407    * to 0, and creates the window if the size is set to non-zero.  This
408    * function can only be used for the "border windows," it doesn't work
409    * with Gtk::TEXT_WINDOW_WIDGET, Gtk::TEXT_WINDOW_TEXT, or
410    * Gtk::TEXT_WINDOW_PRIVATE.
411    * @param type Window to affect.
412    * @param size Width or height of the window.
413    */
414   void set_border_window_size(TextWindowType type, int size);
415   
416   /** Gets the width of the specified border window. See
417    * set_border_window_size().
418    * @param type Window to return size from.
419    * @return Width of window.
420    */
421   int get_border_window_size(TextWindowType type) const;
422
423   
424   /** Moves the given @a iter  forward by one display (wrapped) line.  A
425    * display line is different from a paragraph. Paragraphs are
426    * separated by newlines or other paragraph separator characters.
427    * Display lines are created by line-wrapping a paragraph.  If
428    * wrapping is turned off, display lines and paragraphs will be the
429    * same. Display lines are divided differently for each view, since
430    * they depend on the view's width; paragraphs are the same in all
431    * views, since they depend on the contents of the Gtk::TextBuffer.
432    * @param iter A Gtk::TextIter.
433    * @return <tt>true</tt> if @a iter  was moved and is not on the end iterator.
434    */
435   bool forward_display_line(TextBuffer::iterator& iter);
436   
437   /** Moves the given @a iter  backward by one display (wrapped) line.  A
438    * display line is different from a paragraph. Paragraphs are
439    * separated by newlines or other paragraph separator characters.
440    * Display lines are created by line-wrapping a paragraph.  If
441    * wrapping is turned off, display lines and paragraphs will be the
442    * same. Display lines are divided differently for each view, since
443    * they depend on the view's width; paragraphs are the same in all
444    * views, since they depend on the contents of the Gtk::TextBuffer.
445    * @param iter A Gtk::TextIter.
446    * @return <tt>true</tt> if @a iter  was moved and is not on the end iterator.
447    */
448   bool backward_display_line(TextBuffer::iterator& iter);
449   
450   /** Moves the given @a iter  forward to the next display line end.  A
451    * display line is different from a paragraph. Paragraphs are
452    * separated by newlines or other paragraph separator characters.
453    * Display lines are created by line-wrapping a paragraph.  If
454    * wrapping is turned off, display lines and paragraphs will be the
455    * same. Display lines are divided differently for each view, since
456    * they depend on the view's width; paragraphs are the same in all
457    * views, since they depend on the contents of the Gtk::TextBuffer.
458    * @param iter A Gtk::TextIter.
459    * @return <tt>true</tt> if @a iter  was moved and is not on the end iterator.
460    */
461   bool forward_display_line_end(TextBuffer::iterator& iter);
462   
463   /** Moves the given @a iter  backward to the next display line start.  A
464    * display line is different from a paragraph. Paragraphs are
465    * separated by newlines or other paragraph separator characters.
466    * Display lines are created by line-wrapping a paragraph.  If
467    * wrapping is turned off, display lines and paragraphs will be the
468    * same. Display lines are divided differently for each view, since
469    * they depend on the view's width; paragraphs are the same in all
470    * views, since they depend on the contents of the Gtk::TextBuffer.
471    * @param iter A Gtk::TextIter.
472    * @return <tt>true</tt> if @a iter  was moved and is not on the end iterator.
473    */
474   bool backward_display_line_start(TextBuffer::iterator& iter);
475   
476   /** Determines whether @a iter  is at the start of a display line.
477    * See forward_display_line() for an explanation of
478    * display lines vs. paragraphs.
479    * @param iter A Gtk::TextIter.
480    * @return <tt>true</tt> if @a iter  begins a wrapped line.
481    */
482   bool starts_display_line(const TextBuffer::iterator&  iter);
483   
484   /** Move the iterator a given number of characters visually, treating
485    * it as the strong cursor position. If @a count  is positive, then the
486    * new strong cursor position will be @a count  positions to the right of
487    * the old cursor position. If @a count  is negative then the new strong
488    * cursor position will be @a count  positions to the left of the old
489    * cursor position.
490    * 
491    * In the presence of bidirection text, the correspondence
492    * between logical and visual order will depend on the direction
493    * of the current run, and there may be jumps when the cursor
494    * is moved off of the end of a run.
495    * @param iter A Gtk::TextIter.
496    * @param count Number of characters to move (negative moves left, positive moves right).
497    * @return <tt>true</tt> if @a iter  moved and is not on the end iterator.
498    */
499   bool move_visually(TextBuffer::iterator& iter, int count);
500
501   
502   /** Adds a child widget in the text buffer, at the given @a anchor .
503    * @param child A Gtk::Widget.
504    * @param anchor A Gtk::TextChildAnchor in the Gtk::TextBuffer for @a text_view .
505    */
506   void add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor);
507
508   
509   /** Adds a child at fixed coordinates in one of the text widget's
510    * windows.  The window must have nonzero size (see
511    * set_border_window_size()).  Note that the child
512    * coordinates are given relative to the Gdk::Window in question, and
513    * that these coordinates have no sane relationship to scrolling. When
514    * placing a child in Gtk::TEXT_WINDOW_WIDGET, scrolling is
515    * irrelevant, the child floats above all scrollable areas. But when
516    * placing a child in one of the scrollable windows (border windows or
517    * text window), you'll need to compute the child's correct position
518    * in buffer coordinates any time scrolling occurs or buffer changes
519    * occur, and then call move_child() to update the
520    * child's position. Unfortunately there's no good way to detect that
521    * scrolling has occurred, using the current API; a possible hack
522    * would be to update all child positions when the scroll adjustments
523    * change or the text buffer changes. See bug 64518 on
524    * bugzilla.gnome.org for status of fixing this issue.
525    * @param child A Gtk::Widget.
526    * @param which_window Which window the child should appear in.
527    * @param xpos X position of child in window coordinates.
528    * @param ypos Y position of child in window coordinates.
529    */
530   void add_child_in_window(Widget& child, TextWindowType which_window,
531                                         int xpos, int ypos);
532
533   
534   /** Updates the position of a child, as for add_child_in_window().
535    * @param child Child widget already added to the text view.
536    * @param xpos New X position in window coordinates.
537    * @param ypos New Y position in window coordinates.
538    */
539   void move_child(Widget& child, int xpos,int ypos);
540
541   
542   /** Sets the line wrapping for the view.
543    * @param wrap_mode A Gtk::WrapMode.
544    */
545   void set_wrap_mode(WrapMode wrap_mode);
546   
547   /** Gets the line wrapping for the view.
548    * @return The line wrap setting.
549    */
550   WrapMode get_wrap_mode() const;
551   
552   /** Sets the default editability of the Gtk::TextView. You can override
553    * this default setting with tags in the buffer, using the "editable"
554    * attribute of tags.
555    * @param setting Whether it's editable.
556    */
557   void set_editable(bool setting = true);
558   
559   /** Returns the default editability of the Gtk::TextView. Tags in the
560    * buffer may override this setting for some ranges of text.
561    * @return Whether text is editable by default.
562    */
563   bool get_editable() const;
564   
565   /** Sets the default number of blank pixels above paragraphs in @a text_view .
566    * Tags in the buffer for @a text_view  may override the defaults.
567    * @param pixels_above_lines Pixels above paragraphs.
568    */
569   void set_pixels_above_lines(int pixels_above_lines);
570   
571   /** Gets the default number of pixels to put above paragraphs.
572    * @return Default number of pixels above paragraphs.
573    */
574   int get_pixels_above_lines() const;
575   
576   /** Sets the default number of pixels of blank space
577    * to put below paragraphs in @a text_view . May be overridden
578    * by tags applied to @a text_view 's buffer.
579    * @param pixels_below_lines Pixels below paragraphs.
580    */
581   void set_pixels_below_lines(int pixels_below_lines);
582   
583   /** Gets the value set by set_pixels_below_lines().
584    * @return Default number of blank pixels below paragraphs.
585    */
586   int get_pixels_below_lines() const;
587   
588   /** Sets the default number of pixels of blank space to leave between
589    * display/wrapped lines within a paragraph. May be overridden by
590    * tags in @a text_view 's buffer.
591    * @param pixels_inside_wrap Default number of pixels between wrapped lines.
592    */
593   void set_pixels_inside_wrap(int pixels_inside_wrap);
594   
595   /** Gets the value set by set_pixels_inside_wrap().
596    * @return Default number of pixels of blank space between wrapped lines.
597    */
598   int get_pixels_inside_wrap() const;
599   
600   /** Sets the default justification of text in @a text_view .
601    * Tags in the view's buffer may override the default.
602    * @param justification Justification.
603    */
604   void set_justification(Justification justification);
605   
606   /** Gets the default justification of paragraphs in @a text_view .
607    * Tags in the buffer may override the default.
608    * @return Default justification.
609    */
610   Justification get_justification() const;
611   
612   /** Sets the default left margin for text in @a text_view .
613    * Tags in the buffer may override the default.
614    * @param left_margin Left margin in pixels.
615    */
616   void set_left_margin(int left_margin);
617   
618   /** Gets the default left margin size of paragraphs in the @a text_view .
619    * Tags in the buffer may override the default.
620    * @return Left margin in pixels.
621    */
622   int get_left_margin() const;
623   
624   /** Sets the default right margin for text in the text view.
625    * Tags in the buffer may override the default.
626    * @param right_margin Right margin in pixels.
627    */
628   void set_right_margin(int right_margin);
629   
630   /** Gets the default right margin for text in @a text_view . Tags
631    * in the buffer may override the default.
632    * @return Right margin in pixels.
633    */
634   int get_right_margin() const;
635   
636   /** Sets the default indentation for paragraphs in @a text_view .
637    * Tags in the buffer may override the default.
638    * @param indent Indentation in pixels.
639    */
640   void set_indent(int indent);
641   
642   /** Gets the default indentation of paragraphs in @a text_view .
643    * Tags in the view's buffer may override the default.
644    * The indentation may be negative.
645    * @return Number of pixels of indentation.
646    */
647   int get_indent() const;
648   
649   /** Sets the default tab stops for paragraphs in @a text_view .
650    * Tags in the buffer may override the default.
651    * @param tabs Tabs as a Pango::TabArray.
652    */
653   void set_tabs(Pango::TabArray& tabs);
654   
655   /** Gets the default tabs for @a text_view . Tags in the buffer may
656    * override the defaults. The returned array will be <tt>0</tt> if
657    * "standard" (8-space) tabs are used.
658    * @return Copy of default tab array, or <tt>0</tt> if "standard" tabs are used.
659    */
660   Pango::TabArray get_tabs() const;
661   
662   /** Obtains a copy of the default text attributes. These are the
663    * attributes used for text unless a tag overrides them.
664    * You'd typically pass the default attributes in to
665    * Gtk::TextIter::get_attributes() in order to get the
666    * attributes in effect at a given text position.
667    * @return A new #Gtk::TextAttributes.
668    */
669   TextAttributes get_default_attributes() const;
670
671   
672   /** Changes the Gtk::TextView overwrite mode.
673    * 
674    * Since: 2.4
675    * @param overwrite <tt>true</tt> to turn on overwrite mode, <tt>false</tt> to turn it off.
676    */
677   void set_overwrite(bool overwrite = true);
678   
679   /** Returns whether the Gtk::TextView is in overwrite mode or not.
680    * @return Whether @a text_view  is in overwrite mode or not.
681    * 
682    * Since: 2.4.
683    */
684   bool get_overwrite() const;
685   
686   
687   /** Sets the behavior of the text widget when the Tab key is pressed. If @a accepts_tab 
688    * is <tt>true</tt> a tab character is inserted. If @a accepts_tab  is <tt>false</tt> the keyboard focus
689    * is moved to the next widget in the focus chain.
690    * 
691    * Since: 2.4
692    * @param accepts_tab <tt>true</tt> if pressing the Tab key should insert a tab character, <tt>false</tt>, if pressing the Tab key should move the keyboard focus.
693    */
694   void set_accepts_tab(bool accepts_tab = true);
695   
696   /** Returns whether pressing the Tab key inserts a tab characters.
697    * set_accepts_tab().
698    * @return <tt>true</tt> if pressing the Tab key inserts a tab character, <tt>false</tt> if pressing the Tab key moves the keyboard focus.
699    * 
700    * Since: 2.4.
701    */
702   bool get_accepts_tab() const;
703     
704   
705   Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
706
707   
708   Glib::SignalProxy1< void,Menu* > signal_populate_popup();
709
710
711   Glib::SignalProxy0< void > signal_set_anchor();
712
713   
714   Glib::SignalProxy1< void,const Glib::ustring& > signal_insert_at_cursor();
715
716   
717   //Keybinding signals:
718   
719   
720   /** Pixels of blank space above paragraphs.
721    *
722    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
723    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
724    * the value of the property changes.
725    */
726   Glib::PropertyProxy<int> property_pixels_above_lines() ;
727
728 /** Pixels of blank space above paragraphs.
729    *
730    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
731    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
732    * the value of the property changes.
733    */
734   Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
735
736   /** Pixels of blank space below paragraphs.
737    *
738    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
739    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
740    * the value of the property changes.
741    */
742   Glib::PropertyProxy<int> property_pixels_below_lines() ;
743
744 /** Pixels of blank space below paragraphs.
745    *
746    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
747    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
748    * the value of the property changes.
749    */
750   Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
751
752   /** Pixels of blank space between wrapped lines in a paragraph.
753    *
754    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
755    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
756    * the value of the property changes.
757    */
758   Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
759
760 /** Pixels of blank space between wrapped lines in a paragraph.
761    *
762    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
763    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
764    * the value of the property changes.
765    */
766   Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
767
768   /** Whether the text can be modified by the user.
769    *
770    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
771    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
772    * the value of the property changes.
773    */
774   Glib::PropertyProxy<bool> property_editable() ;
775
776 /** Whether the text can be modified by the user.
777    *
778    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
779    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
780    * the value of the property changes.
781    */
782   Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
783
784   /** Whether to wrap lines never
785    *
786    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
787    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
788    * the value of the property changes.
789    */
790   Glib::PropertyProxy<WrapMode> property_wrap_mode() ;
791
792 /** Whether to wrap lines never
793    *
794    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
795    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
796    * the value of the property changes.
797    */
798   Glib::PropertyProxy_ReadOnly<WrapMode> property_wrap_mode() const;
799
800   /** Left
801    *
802    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
803    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
804    * the value of the property changes.
805    */
806   Glib::PropertyProxy<Justification> property_justification() ;
807
808 /** Left
809    *
810    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
811    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
812    * the value of the property changes.
813    */
814   Glib::PropertyProxy_ReadOnly<Justification> property_justification() const;
815
816   /** Width of the left margin in pixels.
817    *
818    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
819    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
820    * the value of the property changes.
821    */
822   Glib::PropertyProxy<int> property_left_margin() ;
823
824 /** Width of the left margin in pixels.
825    *
826    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
827    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
828    * the value of the property changes.
829    */
830   Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
831
832   /** Width of the right margin in pixels.
833    *
834    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
835    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
836    * the value of the property changes.
837    */
838   Glib::PropertyProxy<int> property_right_margin() ;
839
840 /** Width of the right margin in pixels.
841    *
842    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
843    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
844    * the value of the property changes.
845    */
846   Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
847
848   /** Amount to indent the paragraph
849    *
850    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
851    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
852    * the value of the property changes.
853    */
854   Glib::PropertyProxy<int> property_indent() ;
855
856 /** Amount to indent the paragraph
857    *
858    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
859    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
860    * the value of the property changes.
861    */
862   Glib::PropertyProxy_ReadOnly<int> property_indent() const;
863
864   /** Custom tabs for this text.
865    *
866    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
867    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
868    * the value of the property changes.
869    */
870   Glib::PropertyProxy<Pango::TabArray> property_tabs() ;
871
872 /** Custom tabs for this text.
873    *
874    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
875    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
876    * the value of the property changes.
877    */
878   Glib::PropertyProxy_ReadOnly<Pango::TabArray> property_tabs() const;
879
880   /** If the insertion cursor is shown.
881    *
882    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
883    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
884    * the value of the property changes.
885    */
886   Glib::PropertyProxy<bool> property_cursor_visible() ;
887
888 /** If the insertion cursor is shown.
889    *
890    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
891    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
892    * the value of the property changes.
893    */
894   Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
895
896   /** The buffer which is displayed.
897    *
898    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
899    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
900    * the value of the property changes.
901    */
902   Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > property_buffer() ;
903
904 /** The buffer which is displayed.
905    *
906    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
907    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
908    * the value of the property changes.
909    */
910   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > property_buffer() const;
911
912   /** Whether entered text overwrites existing contents.
913    *
914    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
915    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
916    * the value of the property changes.
917    */
918   Glib::PropertyProxy<bool> property_overwrite() ;
919
920 /** Whether entered text overwrites existing contents.
921    *
922    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
923    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
924    * the value of the property changes.
925    */
926   Glib::PropertyProxy_ReadOnly<bool> property_overwrite() const;
927
928   /** Whether Tab will result in a tab character being entered.
929    *
930    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
931    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
932    * the value of the property changes.
933    */
934   Glib::PropertyProxy<bool> property_accepts_tab() ;
935
936 /** Whether Tab will result in a tab character being entered.
937    *
938    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
939    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
940    * the value of the property changes.
941    */
942   Glib::PropertyProxy_ReadOnly<bool> property_accepts_tab() const;
943
944
945 };
946
947 } /* namespace Gtk */
948
949
950 namespace Glib
951 {
952   /** @relates Gtk::TextView
953    * @param object The C instance
954    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
955    * @result A C++ instance that wraps this C instance.
956    */
957   Gtk::TextView* wrap(GtkTextView* object, bool take_copy = false);
958 }
959 #endif /* _GTKMM_TEXTVIEW_H */
960