Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

RubyGecko

Gtk::MozEmbed sample

In this section we will illustrate some sample applications using the Gtk::MozEmbed widget.

To run this sample you need to install Ruby/GTK2 >= 0.12.0 and Ruby/GtkMozEmbed >= 0.3.1 that you can get here: <URL:http://sourceforge.net/project/showfiles.php?group_id=53614&package_id=147357>

ruby-gecko browser.

Download via CVS (or use the version you should already have):

You can run the ruby-gecko browser by calling

$ ruby ruby-gecko.rb

MozEditor HTML toy-editor.

moz-editor.png

This sample mixes Gtk::SourceView and the Gtk::MozEmbed to build a simple "WYSIWYM" (What You See Is What You Meant) HTML editor. In the left pane the HTML source code can be edited via gtksourceview and is rendered in realtime in the GTK/MozEmbed pane on the right.

Download the source code and the demo css:

Or view the source online:

You can run the moz-editor by calling

$ ruby moz-editor.rb

This sample uses the Observer pattern mixin to notify multiple views of document updates: <URL:http://mirko.lilik.it/Ruby-GNOME2/Observer-s.png>

License

GPL

Author

MirkoMaischberger

Changelog

2005-03-26
Removed LD_LIBRARY_PATH oddity, added moz-snapshooter sample.
2005-03-22
Initial release
Last modified:2011/06/11 10:13:30
Keyword(s):
References:[Samples] [Gtk::MozEmbed]