Ardour  8.7-14-g57a6773833
textview.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TEXTVIEW_H
4 #define _GTKMM_TEXTVIEW_H
5 
6 #include <gtkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* $Id: textview.hg,v 1.10 2006/04/12 11:11:25 murrayc Exp $ */
13 
14 /* Copyright(C) 2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or(at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 // This is for including the config header before any code (such as
32 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
33 
34 
35 #include <gtkmm/container.h>
36 #include <gtkmm/textbuffer.h>
37 #include <gtkmm/textmark.h>
38 #include <gtkmm/menu.h>
39 #include <gtkmm/adjustment.h>
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GtkTextView GtkTextView;
44 typedef struct _GtkTextViewClass GtkTextViewClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
46 
47 
48 namespace Gtk
49 { class TextView_Class; } // namespace Gtk
50 namespace Gtk
51 {
52 
53 
61 {
69 };
70 
71 } // namespace Gtk
72 
73 
74 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75 namespace Glib
76 {
77 
78 template <>
79 class Value<Gtk::TextWindowType> : public Glib::Value_Enum<Gtk::TextWindowType>
80 {
81 public:
82  static GType value_type() G_GNUC_CONST;
83 };
84 
85 } // namespace Glib
86 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87 
88 
89 namespace Gtk
90 {
91 
92 
104 class TextView : public Container
105 {
106  public:
107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
108  typedef TextView CppObjectType;
109  typedef TextView_Class CppClassType;
110  typedef GtkTextView BaseObjectType;
111  typedef GtkTextViewClass BaseClassType;
112 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
113 
114  virtual ~TextView();
115 
116 #ifndef DOXYGEN_SHOULD_SKIP_THIS
117 
118 private:
119  friend class TextView_Class;
120  static CppClassType textview_class_;
121 
122  // noncopyable
123  TextView(const TextView&);
124  TextView& operator=(const TextView&);
125 
126 protected:
127  explicit TextView(const Glib::ConstructParams& construct_params);
128  explicit TextView(GtkTextView* castitem);
129 
130 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
131 
132 public:
133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
134  static GType get_type() G_GNUC_CONST;
135 
136 
137  static GType get_base_type() G_GNUC_CONST;
138 #endif
139 
141  GtkTextView* gobj() { return reinterpret_cast<GtkTextView*>(gobject_); }
142 
144  const GtkTextView* gobj() const { return reinterpret_cast<GtkTextView*>(gobject_); }
145 
146 
147 public:
148  //C++ methods used to invoke GTK+ virtual functions:
149 
150 protected:
151  //GTK+ Virtual Functions (override these to change behaviour):
152 
153  //Default Signal Handlers::
155  virtual void on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment);
157  virtual void on_populate_popup(Menu* menu);
159  virtual void on_set_anchor();
161  virtual void on_insert_at_cursor(const Glib::ustring& str);
162 
163 
164 private:
165 
166 public:
168  explicit TextView(const Glib::RefPtr<TextBuffer>& buffer);
169 
170 
179  void set_buffer(const Glib::RefPtr<TextBuffer>& buffer);
180 
187  Glib::RefPtr<TextBuffer> get_buffer();
188 
195  Glib::RefPtr<const TextBuffer> get_buffer() const;
196 
197  #ifndef GTKMM_DISABLE_DEPRECATED
198 
201  bool scroll_to_iter(TextBuffer::iterator& iter, double within_margin);
202 
205  void scroll_to_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin);
206 
209  void scroll_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
210  #endif // GTKMM_DISABLE_DEPRECATED
211 
212 
224  bool scroll_to(TextBuffer::iterator& iter, double within_margin = 0);
225 
239  bool scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign);
240 
241 
249  void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin = 0);
250 
260  void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign);
261 
262 
263  //It does not do anything more than the default scroll_to(mark).
264 
265 
272  bool move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
273 
280 
281 
288  void get_visible_rect(Gdk::Rectangle& visible_rect) const;
289 
296  void set_cursor_visible(bool setting = true);
297 
302  bool get_cursor_visible() const;
303 
304 
313  void get_iter_location(const TextBuffer::iterator& iter, Gdk::Rectangle& location) const;
314 
325  void get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const;
326 
346  void get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const;
347 
356  void get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const;
357 
358 
369  void get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const;
370 
371 
384  void buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, int& window_x, int& window_y) const;
385 
398  void window_to_buffer_coords(TextWindowType win, int window_x, int window_y, int& buffer_x, int& buffer_y) const;
399 
400 
406 
412 
418 
424 
425 
436  Glib::RefPtr<Gdk::Window> get_window(TextWindowType win);
437 
448  Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const;
449 
458  TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window);
459 
460 
473 
481 
482 
496 
510 
524 
538 
547 
565  bool move_visually(TextBuffer::iterator& iter, int count);
566 
567 
585 
592 
593 
599  void add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor);
600 
601 
624  void add_child_in_window(Widget& child, TextWindowType which_window, int xpos, int ypos);
625 
626 
633  void move_child(Widget& child, int xpos, int ypos);
634 
635 
640  void set_wrap_mode(WrapMode wrap_mode);
641 
647 
654  void set_editable(bool setting = true);
655 
661  bool get_editable() const;
662 
668  void set_pixels_above_lines(int pixels_above_lines);
669 
675 
682  void set_pixels_below_lines(int pixels_below_lines);
683 
689 
696  void set_pixels_inside_wrap(int pixels_inside_wrap);
697 
703 
709  void set_justification(Justification justification);
710 
717 
723  void set_left_margin(int left_margin);
724 
730  int get_left_margin() const;
731 
737  void set_right_margin(int right_margin);
738 
744  int get_right_margin() const;
745 
751  void set_indent(int indent);
752 
759  int get_indent() const;
760 
766  void set_tabs(Pango::TabArray& tabs);
767 
774  Pango::TabArray get_tabs() const;
775 
785 
786 
791  void set_overwrite(bool overwrite = true);
792 
797  bool get_overwrite() const;
798 
799 
809  void set_accepts_tab(bool accepts_tab = true);
810 
817  bool get_accepts_tab() const;
818 
819 
826  Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
827 
828 
835  Glib::SignalProxy1< void,Menu* > signal_populate_popup();
836 
837 
844  Glib::SignalProxy0< void > signal_set_anchor();
845 
846 
853  Glib::SignalProxy1< void,const Glib::ustring& > signal_insert_at_cursor();
854 
855 
856  //Keybinding signals:
857 
858 
859  //gtkmmproc error: move_focus : ignored signal defs lookup failed
860 
861 
867  Glib::PropertyProxy< int > property_pixels_above_lines() ;
868 
874  Glib::PropertyProxy_ReadOnly< int > property_pixels_above_lines() const;
875 
881  Glib::PropertyProxy< int > property_pixels_below_lines() ;
882 
888  Glib::PropertyProxy_ReadOnly< int > property_pixels_below_lines() const;
889 
895  Glib::PropertyProxy< int > property_pixels_inside_wrap() ;
896 
902  Glib::PropertyProxy_ReadOnly< int > property_pixels_inside_wrap() const;
903 
909  Glib::PropertyProxy< bool > property_editable() ;
910 
916  Glib::PropertyProxy_ReadOnly< bool > property_editable() const;
917 
923  Glib::PropertyProxy< WrapMode > property_wrap_mode() ;
924 
930  Glib::PropertyProxy_ReadOnly< WrapMode > property_wrap_mode() const;
931 
937  Glib::PropertyProxy< Justification > property_justification() ;
938 
944  Glib::PropertyProxy_ReadOnly< Justification > property_justification() const;
945 
951  Glib::PropertyProxy< int > property_left_margin() ;
952 
958  Glib::PropertyProxy_ReadOnly< int > property_left_margin() const;
959 
965  Glib::PropertyProxy< int > property_right_margin() ;
966 
972  Glib::PropertyProxy_ReadOnly< int > property_right_margin() const;
973 
979  Glib::PropertyProxy< int > property_indent() ;
980 
986  Glib::PropertyProxy_ReadOnly< int > property_indent() const;
987 
993  Glib::PropertyProxy< Pango::TabArray > property_tabs() ;
994 
1000  Glib::PropertyProxy_ReadOnly< Pango::TabArray > property_tabs() const;
1001 
1007  Glib::PropertyProxy< bool > property_cursor_visible() ;
1008 
1014  Glib::PropertyProxy_ReadOnly< bool > property_cursor_visible() const;
1015 
1021  Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > property_buffer() ;
1022 
1028  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > property_buffer() const;
1029 
1035  Glib::PropertyProxy< bool > property_overwrite() ;
1036 
1042  Glib::PropertyProxy_ReadOnly< bool > property_overwrite() const;
1043 
1049  Glib::PropertyProxy< bool > property_accepts_tab() ;
1050 
1056  Glib::PropertyProxy_ReadOnly< bool > property_accepts_tab() const;
1057 
1063  Glib::PropertyProxy< Glib::ustring > property_im_module() ;
1064 
1070  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_im_module() const;
1071 
1072 
1073 };
1074 
1075 } /* namespace Gtk */
1076 
1077 
1078 namespace Glib
1079 {
1088  Gtk::TextView* wrap(GtkTextView* object, bool take_copy = false);
1089 } //namespace Glib
1090 
1091 
1092 #endif /* _GTKMM_TEXTVIEW_H */
1093 
TextAttributes get_default_attributes() const
void buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, int &window_x, int &window_y) const
int get_pixels_below_lines() const
void set_pixels_inside_wrap(int pixels_inside_wrap)
bool get_overwrite() const
Glib::RefPtr< const Gdk::Window > get_window(TextWindowType win) const
virtual ~TextView()
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_im_module() const
Glib::RefPtr< Gdk::Window > get_window(TextWindowType win)
Glib::PropertyProxy_ReadOnly< bool > property_cursor_visible() const
virtual void on_insert_at_cursor(const Glib::ustring &str)
This is a default handler for the signal signal_insert_at_cursor().
void get_line_yrange(const TextBuffer::iterator &iter, int &y, int &height) const
void set_pixels_above_lines(int pixels_above_lines)
void scroll_to(const Glib::RefPtr< TextBuffer::Mark > &mark, double within_margin, double xalign, double yalign)
bool move_mark_onscreen(const Glib::RefPtr< TextBuffer::Mark > &mark)
Glib::SignalProxy1< void, const Glib::ustring & > signal_insert_at_cursor()
Glib::PropertyProxy_ReadOnly< int > property_left_margin() const
Glib::PropertyProxy_ReadOnly< int > property_indent() const
void reset_im_context()
Glib::RefPtr< TextBuffer > get_buffer()
void add_child_in_window(Widget &child, TextWindowType which_window, int xpos, int ypos)
int get_right_margin() const
void set_pixels_below_lines(int pixels_below_lines)
Glib::PropertyProxy< bool > property_overwrite()
int get_pixels_inside_wrap() const
bool forward_display_line(TextBuffer::iterator &iter)
Glib::PropertyProxy_ReadOnly< bool > property_overwrite() const
bool im_context_filter_keypress(GdkEventKey *event)
virtual void on_populate_popup(Menu *menu)
This is a default handler for the signal signal_populate_popup().
Glib::SignalProxy1< void, Menu * > signal_populate_popup()
void scroll_to(const Glib::RefPtr< TextBuffer::Mark > &mark, double within_margin=0)
Glib::PropertyProxy< int > property_indent()
Glib::PropertyProxy< bool > property_accepts_tab()
void set_wrap_mode(WrapMode wrap_mode)
void get_iter_location(const TextBuffer::iterator &iter, Gdk::Rectangle &location) const
Gtk::Adjustment * get_hadjustment()
bool get_accepts_tab() const
Glib::PropertyProxy_ReadOnly< WrapMode > property_wrap_mode() const
Glib::PropertyProxy< WrapMode > property_wrap_mode()
void set_border_window_size(TextWindowType type, int size)
Pango::TabArray get_tabs() const
void set_right_margin(int right_margin)
Gtk::TextView * wrap(GtkTextView *object, bool take_copy=false)
void set_indent(int indent)
Glib::PropertyProxy< int > property_pixels_below_lines()
bool backward_display_line_start(TextBuffer::iterator &iter)
Glib::PropertyProxy_ReadOnly< int > property_right_margin() const
Glib::PropertyProxy_ReadOnly< Justification > property_justification() const
Glib::PropertyProxy< int > property_left_margin()
Gtk::Adjustment * get_vadjustment()
void move_child(Widget &child, int xpos, int ypos)
bool scroll_to(TextBuffer::iterator &iter, double within_margin, double xalign, double yalign)
virtual void on_set_scroll_adjustments(Adjustment *hadjustment, Adjustment *vadjustment)
This is a default handler for the signal signal_set_scroll_adjustments().
int get_indent() const
Glib::PropertyProxy< int > property_pixels_inside_wrap()
void set_left_margin(int left_margin)
Glib::PropertyProxy_ReadOnly< int > property_pixels_above_lines() const
bool move_visually(TextBuffer::iterator &iter, int count)
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< TextBuffer > > property_buffer() const
const Gtk::Adjustment * get_vadjustment() const
Justification get_justification() const
bool backward_display_line(TextBuffer::iterator &iter)
const GtkTextView * gobj() const
Provides access to the underlying C GtkObject.
Definition: textview.h:144
Glib::PropertyProxy< Pango::TabArray > property_tabs()
Glib::PropertyProxy< Glib::ustring > property_im_module()
Glib::PropertyProxy_ReadOnly< Pango::TabArray > property_tabs() const
bool scroll_to(TextBuffer::iterator &iter, double within_margin=0)
void set_accepts_tab(bool accepts_tab=true)
bool get_cursor_visible() const
bool scroll_to_iter(TextBuffer::iterator &iter, double within_margin)
Glib::PropertyProxy< bool > property_editable()
const Gtk::Adjustment * get_hadjustment() const
int get_left_margin() const
void get_visible_rect(Gdk::Rectangle &visible_rect) const
Glib::PropertyProxy< int > property_pixels_above_lines()
TextWindowType get_window_type(const Glib::RefPtr< Gdk::Window > &window)
void add_child_at_anchor(Widget &child, const Glib::RefPtr< TextBuffer::ChildAnchor > &anchor)
Glib::PropertyProxy< Justification > property_justification()
Glib::SignalProxy2< void, Adjustment *, Adjustment * > signal_set_scroll_adjustments()
void get_iter_at_position(TextBuffer::iterator &iter, int &trailing, int x, int y) const
void scroll_mark_onscreen(const Glib::RefPtr< TextBuffer::Mark > &mark)
int get_border_window_size(TextWindowType type) const
void set_editable(bool setting=true)
void window_to_buffer_coords(TextWindowType win, int window_x, int window_y, int &buffer_x, int &buffer_y) const
bool forward_display_line_end(TextBuffer::iterator &iter)
void set_overwrite(bool overwrite=true)
int get_pixels_above_lines() const
Glib::RefPtr< const TextBuffer > get_buffer() const
Glib::PropertyProxy< Glib::RefPtr< TextBuffer > > property_buffer()
void set_justification(Justification justification)
Glib::PropertyProxy_ReadOnly< int > property_pixels_inside_wrap() const
Glib::PropertyProxy_ReadOnly< bool > property_accepts_tab() const
void set_cursor_visible(bool setting=true)
Glib::PropertyProxy_ReadOnly< int > property_pixels_below_lines() const
bool get_editable() const
void get_iter_at_location(TextBuffer::iterator &iter, int x, int y) const
Glib::PropertyProxy< int > property_right_margin()
Glib::SignalProxy0< void > signal_set_anchor()
Glib::PropertyProxy< bool > property_cursor_visible()
WrapMode get_wrap_mode() const
void set_buffer(const Glib::RefPtr< TextBuffer > &buffer)
GtkTextView * gobj()
Provides access to the underlying C GtkObject.
Definition: textview.h:141
void set_tabs(Pango::TabArray &tabs)
TextView(const Glib::RefPtr< TextBuffer > &buffer)
bool place_cursor_onscreen()
void scroll_to_mark(const Glib::RefPtr< TextBuffer::Mark > &mark, double within_margin)
virtual void on_set_anchor()
This is a default handler for the signal signal_set_anchor().
void get_line_at_y(TextBuffer::iterator &target_iter, int y, int &line_top) const
bool starts_display_line(const TextBuffer::iterator &iter)
Glib::PropertyProxy_ReadOnly< bool > property_editable() const
bool event(GdkEvent *event)
TextWindowType
Definition: textview.h:61
@ TEXT_WINDOW_PRIVATE
Definition: textview.h:62
@ TEXT_WINDOW_WIDGET
Definition: textview.h:63
@ TEXT_WINDOW_LEFT
Definition: textview.h:65
@ TEXT_WINDOW_TEXT
Definition: textview.h:64
@ TEXT_WINDOW_BOTTOM
Definition: textview.h:68
@ TEXT_WINDOW_TOP
Definition: textview.h:67
@ TEXT_WINDOW_RIGHT
Definition: textview.h:66
Definition: ardour_ui.h:188
Definition: lobject.h:100
gint height
Definition: xcursors.h:1