ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 15日 (土) 03:10:31 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-textview ------------------------- @@ -47,7 +47,7 @@ Here the buffer component is the Gtk::TextBuffer. Text buffers hold text, images, child widgets, text tags and other information necessary for rendering the documents. A Gtk::TextBuffer buffer is an independent object and can be displayed by many text view widgets. However any text view has only a single text buffer associated with it. Most programmers do not take advantage of this feature, but it will become important latter when you learn how to embed child widgets into a text buffer. -:Short D-tour: +:A Short D-tour: If you understand the relationship between the two Gtk classes, namely between Gtk::TextView and Gtk::TextBuffer, you will not miss anything by ignoring this D-tour. But if you are not exactly sure what was just said in the above paragraph, then following short demonstration simulating how Gtk::TextView and Gtk::TextBuffer are implemented, may help you understand this relationship and show you how to exploit this design to create some Gtk::TextViews that share the same Gtk::TextBuffer and some that do not: