ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 9日 (日) 01:00:25 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-ttags ------------------------- @@ -12,7 +12,7 @@ {{image_left("txtw-ttags.png")}} -As hinted in the above note, this program example unfortunately deals with an abundance of peripheral issues, which obfuscate the simple Gtk::TextTag issues. The most prominent of these side issues is how the ((*"tag property names"*)) are handled in the code. For the tutorial's sake it would be possible to simplify the code significantly if we didn't insist that the tag property names like "bold", "italic", etc., would not be called as it is appropriate, but wold just keep their little deformed stock-item names ("gtk-bold", "gtk-italic", etc). Or if instead of stock-items on button labels we would just use plain strings like "bold", "italic", etc. Yet another notch of complications represent code optimization with the ((*ts*))(text scale) array which is used to automate the tag creation process for the items in the combo box. For the sake of the tutorial it would be just as good if, we manually coded the font sizes for the selections in the combo box. However, the suggested simplifications would make the example less realistic and more dry or theoretical. The ((*texttags.rb*)) example, I must underscore, is quite good, however it is not best suited for a quick tutorial, that is why I am referring you to ((<Improved "find.rb" program|tut-gtk2-txtw-itrsmrks#Improved find.rb program>)) on previous page, though you may first read the narrative in this chapter to get acquainted with the Gtk::TextTag. +As hinted in the above note, this program example unfortunately deals with an abundance of peripheral issues, which obfuscate the simple Gtk::TextTag issues. The most prominent of these side issues is how the ((*"tag property names"*)) are handled in the code. For the tutorial's sake it would be possible to simplify the code significantly if we didn't insist that the tag property names like "bold", "italic", etc., would not be called as it is appropriate, but wold just keep their little deformed stock-item names ("gtk-bold", "gtk-italic", etc). Or if instead of stock-items on button labels we would just use plain strings like "bold", "italic", etc. Yet another notch of complications represent code optimization with the ((*ts*))(text scale) array which is used to automate the tag creation process for the items in the combo box. For the sake of the tutorial it would be just as good, if we manually coded the font sizes for the selections in the combo box. However, the suggested simplifications would make the example less realistic and more dry or theoretical. The ((*texttags.rb*)) example, I must underscore, is quite good, however it is not best suited for a quick tutorial, that is why I am referring you to ((<Improved "find.rb" program|tut-gtk2-txtw-itrsmrks#Improved find.rb program>)) on previous page, though you may first read the narrative in this chapter to get acquainted with the Gtk::TextTag.