[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-mnstbs-popup

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2012年 10月 22日 (月) 04:56:41 JST


-------------------------
REMOTE_ADDR = 184.145.91.205
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-popup
-------------------------
@@ -1,24 +1,28 @@
 = Menus and Toolbars
 {{link "tut-gtk2-mnstbs", "tut-gtk2-mnstbs", "tut-gtk", "tut-gtk2-mnstbs-statb"}}
 
 == Pop-up Menus
 
+In this chapter we will learn how to create pop-up menus, menu bars, and toolbars. We will begin by creating each of these manually to see how these widgets are constructed, and what are the principles and concepts on which the toolbars and menus are built. After that we will introduce the Gtk::UIManager, which allows us to dynamically construct a user interface (menus and toolbars) from UI definitions, stored in XML files. Each UI file is loaded into the GTK system, and each element applied to a corresponding ((*action*))object, which is responsible for item's presentation on the display and for its behaviour (actions).
+
+
 :Jump ahead:
     * ((<Creating a Pop-up Menu|tut-gtk2-mnstbs-popup#Creating a Pop-up Menu>))
     * ((<Keyboard Accelerators|tut-gtk2-mnstbs-popup#Keyboard Accelerators>))
 
 You will begin this chapter by learning how to create a pop-up menu. A pop-up menu is a Gtk::Menu widget that is displayed to the user when the right mouse button is clicked when hovering above certain widgets. Some widgets such as Gtk::Entry and Gtk::TextView, already have a pop-up menus built into the widget by default.
 
-If you want to change the pop-up menu of a widget that offers one by default, you should edit the supplied Gtk::Menu widget in the pop-up callback proc or method. For example, both Gtk::Entry and Gtk::TextView have a ((*populate-popoup*)) signal, which receives the Gtk::Menu that is going to be displayed. You can edit this menu in any way you see fit before displaying it to the user.
+If you want to change the pop-up menu of a widget that offers one by default, you should edit the supplied Gtk::Menu widget in the pop-up callback procedure, i.e. block or proc. For example, both Gtk::Entry and Gtk::TextView have a((*populate-popoup*)) signal, which receives the Gtk::Menu that is going to be displayed. You can edit this menu in any way you see fit before displaying it to the user.
 
 === Creating a Pop-up Menu
 
 
 {{image_right("mnstbs-popup-01.png")}}
 
-For most widgets you will need to create your own pop-up menu. In this section you are going to learn how to supply a pop-up menu to a Gtk::ProgressBar widget. You can see the pop-up menu we are going to implement in the picture on the right presented in 
+For most widgets you will need to create your own pop-up menu. In this section you are going to learn how to supply a pop-up menu to a Gtk::ProgressBar widget. You can see the pop-up menu we are going to implement in the picture on the right.
 
 In the example three pop-up menu items are used to pulse the progress bar, set it as 100 percent complete, and to clear it. You will notice that the progress bar is contained in an event box. This is because like a Gtk::Label, which we made click-able way back in this tutorial, is not capable of intercepting GDK events by itself. Let's look at the program: 
+
 
 {{br}}
 ((*popupmenus.rb*))




ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index