[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk-intro

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 1月 4日 (水) 09:44:02 JST


-------------------------
REMOTE_ADDR = 184.145.92.141
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk-intro
-------------------------
@@ -45,3 +45,19 @@
   Gtk.main
 
 Gtk.main is another call you will see in every Ruby/GTK2 application. When control reaches this point, GTK will sleep waiting for X events (such as button or key presses), timeouts, or file IO notifications to occur. In our simple example, however, events are ignored.
+
+
+=== Note about the section Caveat
+
+ * Ideally all the features available in original C language GTK library should be found also in Ruby, however, where it does not make sense or is not absolutely necessary, they were omitted. For completion I'd like to point out to such omissions or any other relevant differences in the section, under the heading Caveat. 
+
+== Caveat
+  
+As you've seen window type (style) can be either  Gtk::Window::TOPLEVEL or Gtk::Window::POPUP. While you have some control of the size and placement of top-level windows on the display, the top-level window is ultimately controlled by window manager.  However, the pop-up window is different. They are normally used for things that are often not considered windows, such tooltips and menus. They are ignored by the window manager, and therefor have no decorations or border frame. In Ruby the second POPUP style is mostly ignored, hence, there really is only one style of window to be considered, namely the default Gtk::Window::TOPLEVEL.
+
+This may be the reason that Window instance methods that allow querying and setting Window type/style (Gtk::Window::type, ...) at the time of this writing are not supported, though you will find them in the documentation.
+
+In particular, do not use Gtk::Window::POPUP just to turn off the window borders; use Gtk::Window#decorated= for that:
+
+ window = Gtk::Window.new(type = Gtk::Window::TOPLEVEL)
+ window.decorated = false




ruby-gnome2-cvs メーリングリストの案内
Back to archive index