~ubuntu-branches/ubuntu/quantal/gtkmm3.0/quantal

« back to all changes in this revision

Viewing changes to gtk/gtkmm/textbuffer.h

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-03-01 23:42:36 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20120301234236-12w6m0hkomhi7h53
Tags: 3.3.16-0ubuntu1
* New upstream version
* debian/control.in: updated the glib requirement

Show diffs side-by-side

added added

removed removed

Lines of Context:
964
964
 
965
965
 
966
966
  /**
967
 
   * @par Prototype:
 
967
   * @par Slot Prototype:
968
968
   * <tt>void on_my_%insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes)</tt>
 
969
   *
 
970
   * The signal_insert_text() signal is emitted to insert text in a Gtk::TextBuffer.
 
971
   * Insertion actually occurs in the default handler.  
 
972
   * 
 
973
   * Note that if your handler runs before the default handler it must not 
 
974
   * invalidate the @a location iter (or has to revalidate it). 
 
975
   * The default signal handler revalidates it to point to the end of the 
 
976
   * inserted text.
 
977
   * 
 
978
   * See also: 
 
979
   * Gtk::TextBuffer::insert(), 
 
980
   * Gtk::TextBuffer::insert_range().
 
981
   * @param location Position to insert @a text in @a textbuffer.
 
982
   * @param text The UTF-8 text to be inserted.
 
983
   * @param len Length of the inserted text in bytes.
969
984
   */
970
985
 
 
986
 
971
987
  Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int > signal_insert();
972
988
 
973
989
 
974
990
  /**
975
 
   * @par Prototype:
 
991
   * @par Slot Prototype:
976
992
   * <tt>void on_my_%insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)</tt>
 
993
   *
 
994
   * The signal_insert_pixbuf() signal is emitted to insert a Gdk::Pixbuf 
 
995
   * in a Gtk::TextBuffer. Insertion actually occurs in the default handler.
 
996
   * 
 
997
   * Note that if your handler runs before the default handler it must not 
 
998
   * invalidate the @a location iter (or has to revalidate it). 
 
999
   * The default signal handler revalidates it to be placed after the 
 
1000
   * inserted @a pixbuf.
 
1001
   * 
 
1002
   * See also: Gtk::TextBuffer::insert_pixbuf().
 
1003
   * @param location Position to insert @a pixbuf in @a textbuffer.
 
1004
   * @param pixbuf The Gdk::Pixbuf to be inserted.
977
1005
   */
978
1006
 
 
1007
 
979
1008
  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > signal_insert_pixbuf();
980
1009
 
981
1010
  
982
1011
  /**
983
 
   * @par Prototype:
 
1012
   * @par Slot Prototype:
984
1013
   * <tt>void on_my_%insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor)</tt>
 
1014
   *
 
1015
   * The signal_insert_child_anchor() signal is emitted to insert a
 
1016
   * Gtk::TextChildAnchor in a Gtk::TextBuffer.
 
1017
   * Insertion actually occurs in the default handler.
 
1018
   * 
 
1019
   * Note that if your handler runs before the default handler it must
 
1020
   * not invalidate the @a location iter (or has to revalidate it). 
 
1021
   * The default signal handler revalidates it to be placed after the 
 
1022
   * inserted @a anchor.
 
1023
   * 
 
1024
   * See also: Gtk::TextBuffer::insert_child_anchor().
 
1025
   * @param location Position to insert @a anchor in @a textbuffer.
 
1026
   * @param anchor The Gtk::TextChildAnchor to be inserted.
985
1027
   */
986
1028
 
 
1029
 
987
1030
  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > signal_insert_child_anchor();
988
1031
 
989
1032
 
990
 
  /** The delete_range signal is emitted to delete a range from
991
 
   * a TextBuffer. Note that your handler must not invalidate the
992
 
   * @a start and @a end iters (or has to revalidate them), if it runs before the
993
 
   * default handler. There is no need to keep the iters valid in handlers
994
 
   * which run after the default handler but
995
 
   * those don't have access to the deleted text.
996
 
   *
997
 
   * @param start the start of the range to be deleted.
998
 
   * @param end the end of the range to be deleted.
999
 
   *
1000
 
   * @par Prototype:
 
1033
  /**
 
1034
   * @par Slot Prototype:
1001
1035
   * <tt>void on_my_%erase(const TextBuffer::iterator& start, const TextBuffer::iterator& end)</tt>
 
1036
   *
 
1037
   * The signal_delete_range() signal is emitted to delete a range 
 
1038
   * from a Gtk::TextBuffer. 
 
1039
   * 
 
1040
   * Note that if your handler runs before the default handler it must not 
 
1041
   * invalidate the @a start and @a end iters (or has to revalidate them). 
 
1042
   * The default signal handler revalidates the @a start and @a end iters to 
 
1043
   * both point point to the location where text was deleted. Handlers
 
1044
   * which run after the default handler (see Glib::signal_connect_after())
 
1045
   * do not have access to the deleted text.
 
1046
   * 
 
1047
   * See also: Gtk::TextBuffer::delete().
 
1048
   * @param start The start of the range to be deleted.
 
1049
   * @param end The end of the range to be deleted.
1002
1050
   */
1003
1051
 
 
1052
 
1004
1053
  Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_erase();
1005
1054
 
1006
 
 
 
1055
  
1007
1056
  /**
1008
 
   * @par Prototype:
 
1057
   * @par Slot Prototype:
1009
1058
   * <tt>void on_my_%changed()</tt>
 
1059
   *
 
1060
   * The signal_changed() signal is emitted when the content of a Gtk::TextBuffer 
 
1061
   * has changed.
1010
1062
   */
1011
1063
 
 
1064
 
1012
1065
  Glib::SignalProxy0< void > signal_changed();
1013
1066
 
1014
1067
  
1015
1068
  /**
1016
 
   * @par Prototype:
 
1069
   * @par Slot Prototype:
1017
1070
   * <tt>void on_my_%modified_changed()</tt>
 
1071
   *
 
1072
   * The signal_modified_changed() signal is emitted when the modified bit of a 
 
1073
   * Gtk::TextBuffer flips.
 
1074
   * 
 
1075
   * See also:
 
1076
   * Gtk::TextBuffer::set_modified().
1018
1077
   */
1019
1078
 
 
1079
 
1020
1080
  Glib::SignalProxy0< void > signal_modified_changed();
1021
1081
 
1022
1082
  
1023
1083
  /**
1024
 
   * @par Prototype:
 
1084
   * @par Slot Prototype:
1025
1085
   * <tt>void on_my_%mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark)</tt>
 
1086
   *
 
1087
   * The signal_mark_set() signal is emitted as notification
 
1088
   * after a Gtk::TextMark is set.
 
1089
   * 
 
1090
   * See also: 
 
1091
   * Gtk::TextBuffer::create_mark(),
 
1092
   * Gtk::TextBuffer::move_mark().
 
1093
   * @param location The location of @a mark in @a textbuffer.
 
1094
   * @param mark The mark that is set.
1026
1095
   */
1027
1096
 
 
1097
 
1028
1098
  Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_set();
1029
1099
 
1030
1100
  
1031
1101
  /**
1032
 
   * @par Prototype:
 
1102
   * @par Slot Prototype:
1033
1103
   * <tt>void on_my_%mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark)</tt>
 
1104
   *
 
1105
   * The signal_mark_deleted() signal is emitted as notification
 
1106
   * after a Gtk::TextMark is deleted. 
 
1107
   * 
 
1108
   * See also:
 
1109
   * Gtk::TextBuffer::delete_mark().
 
1110
   * @param mark The mark that was deleted.
1034
1111
   */
1035
1112
 
 
1113
 
1036
1114
  Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_deleted();
1037
1115
 
1038
1116
  
1039
1117
  /**
1040
 
   * @par Prototype:
 
1118
   * @par Slot Prototype:
1041
1119
   * <tt>void on_my_%apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)</tt>
 
1120
   *
 
1121
   * The signal_apply_tag() signal is emitted to apply a tag to a
 
1122
   * range of text in a Gtk::TextBuffer. 
 
1123
   * Applying actually occurs in the default handler.
 
1124
   * 
 
1125
   * Note that if your handler runs before the default handler it must not 
 
1126
   * invalidate the @a start and @a end iters (or has to revalidate them). 
 
1127
   * 
 
1128
   * See also: 
 
1129
   * Gtk::TextBuffer::apply_tag(),
 
1130
   * Gtk::TextBuffer::insert_with_tags(),
 
1131
   * Gtk::TextBuffer::insert_range().
 
1132
   * @param tag The applied tag.
 
1133
   * @param start The start of the range the tag is applied to.
 
1134
   * @param end The end of the range the tag is applied to.
1042
1135
   */
1043
1136
 
 
1137
 
1044
1138
  Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_apply_tag();
1045
1139
 
1046
1140
  
1047
1141
  /**
1048
 
   * @par Prototype:
 
1142
   * @par Slot Prototype:
1049
1143
   * <tt>void on_my_%remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)</tt>
 
1144
   *
 
1145
   * The signal_remove_tag() signal is emitted to remove all occurrences of @a tag from
 
1146
   * a range of text in a Gtk::TextBuffer. 
 
1147
   * Removal actually occurs in the default handler.
 
1148
   * 
 
1149
   * Note that if your handler runs before the default handler it must not 
 
1150
   * invalidate the @a start and @a end iters (or has to revalidate them). 
 
1151
   * 
 
1152
   * See also: 
 
1153
   * Gtk::TextBuffer::remove_tag().
 
1154
   * @param tag The tag to be removed.
 
1155
   * @param start The start of the range the tag is removed from.
 
1156
   * @param end The end of the range the tag is removed from.
1050
1157
   */
1051
1158
 
 
1159
 
1052
1160
  Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_remove_tag();
1053
1161
 
1054
1162
  
1055
1163
  /**
1056
 
   * @par Prototype:
 
1164
   * @par Slot Prototype:
1057
1165
   * <tt>void on_my_%begin_user_action()</tt>
 
1166
   *
 
1167
   * The signal_begin_user_action() signal is emitted at the beginning of a single
 
1168
   * user-visible operation on a Gtk::TextBuffer.
 
1169
   * 
 
1170
   * See also: 
 
1171
   * Gtk::TextBuffer::begin_user_action(),
 
1172
   * Gtk::TextBuffer::insert_interactive(),
 
1173
   * Gtk::TextBuffer::insert_range_interactive(),
 
1174
   * Gtk::TextBuffer::delete_interactive(),
 
1175
   * Gtk::TextBuffer::backspace(),
 
1176
   * Gtk::TextBuffer::delete_selection().
1058
1177
   */
1059
1178
 
 
1179
 
1060
1180
  Glib::SignalProxy0< void > signal_begin_user_action();
1061
1181
 
1062
1182
  
1063
1183
  /**
1064
 
   * @par Prototype:
 
1184
   * @par Slot Prototype:
1065
1185
   * <tt>void on_my_%end_user_action()</tt>
 
1186
   *
 
1187
   * The signal_end_user_action() signal is emitted at the end of a single
 
1188
   * user-visible operation on the Gtk::TextBuffer.
 
1189
   * 
 
1190
   * See also: 
 
1191
   * Gtk::TextBuffer::end_user_action(),
 
1192
   * Gtk::TextBuffer::insert_interactive(),
 
1193
   * Gtk::TextBuffer::insert_range_interactive(),
 
1194
   * Gtk::TextBuffer::delete_interactive(),
 
1195
   * Gtk::TextBuffer::backspace(),
 
1196
   * Gtk::TextBuffer::delete_selection(),
 
1197
   * Gtk::TextBuffer::backspace().
1066
1198
   */
1067
1199
 
 
1200
 
1068
1201
  Glib::SignalProxy0< void > signal_end_user_action();
1069
1202
 
1070
1203
 
1071
1204
  /**
1072
 
   * @par Prototype:
 
1205
   * @par Slot Prototype:
1073
1206
   * <tt>void on_my_%paste_done(const Glib::RefPtr<Gtk::Clipboard>& clipboard)</tt>
 
1207
   *
 
1208
   * The paste-done signal is emitted after paste operation has been completed.
 
1209
   * This is useful to properly scroll the view to the end of the pasted text.
 
1210
   * See Gtk::TextBuffer::paste_clipboard() for more details.
 
1211
   * 
 
1212
   * @newin{2,16}
1074
1213
   */
1075
1214
 
 
1215
 
1076
1216
  Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::Clipboard>& > signal_paste_done();
1077
1217
 
1078
1218
 
1079
1219
  #ifdef GLIBMM_PROPERTIES_ENABLED
1080
 
/** Text Tag Table.
 
1220
/** 
1081
1221
   *
1082
1222
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1083
1223
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1088
1228
 
1089
1229
 
1090
1230
  #ifdef GLIBMM_PROPERTIES_ENABLED
1091
 
/** Current text of the buffer.
 
1231
/** 
1092
1232
   *
1093
1233
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1094
1234
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1108
1248
#endif //#GLIBMM_PROPERTIES_ENABLED
1109
1249
 
1110
1250
  #ifdef GLIBMM_PROPERTIES_ENABLED
1111
 
/** Whether the buffer has some text currently selected.
 
1251
/** 
1112
1252
   *
1113
1253
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1114
1254
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1119
1259
 
1120
1260
 
1121
1261
  #ifdef GLIBMM_PROPERTIES_ENABLED
1122
 
/** The position of the insert mark (as offset from the beginning of the buffer).
 
1262
/** 
1123
1263
   *
1124
1264
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
1125
1265
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
1142
1282
  //GTK+ Virtual Functions (override these to change behaviour):
1143
1283
 
1144
1284
  //Default Signal Handlers::
 
1285
  /// This is a default handler for the signal signal_insert().
1145
1286
  virtual void on_insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes);
 
1287
  /// This is a default handler for the signal signal_insert_pixbuf().
1146
1288
  virtual void on_insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
 
1289
  /// This is a default handler for the signal signal_insert_child_anchor().
1147
1290
  virtual void on_insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor);
 
1291
  /// This is a default handler for the signal signal_erase().
1148
1292
  virtual void on_erase(const TextBuffer::iterator& start, const TextBuffer::iterator& end);
 
1293
  /// This is a default handler for the signal signal_changed().
1149
1294
  virtual void on_changed();
 
1295
  /// This is a default handler for the signal signal_modified_changed().
1150
1296
  virtual void on_modified_changed();
 
1297
  /// This is a default handler for the signal signal_mark_set().
1151
1298
  virtual void on_mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark);
 
1299
  /// This is a default handler for the signal signal_mark_deleted().
1152
1300
  virtual void on_mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark);
 
1301
  /// This is a default handler for the signal signal_apply_tag().
1153
1302
  virtual void on_apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
 
1303
  /// This is a default handler for the signal signal_remove_tag().
1154
1304
  virtual void on_remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
 
1305
  /// This is a default handler for the signal signal_begin_user_action().
1155
1306
  virtual void on_begin_user_action();
 
1307
  /// This is a default handler for the signal signal_end_user_action().
1156
1308
  virtual void on_end_user_action();
 
1309
  /// This is a default handler for the signal signal_paste_done().
1157
1310
  virtual void on_paste_done(const Glib::RefPtr<Gtk::Clipboard>& clipboard);
1158
1311
 
1159
1312