ruby-****@lists*****
ruby-****@lists*****
2003年 3月 29日 (土) 03:30:02 JST
------------------------- REMOTE_ADDR = 211.7.202.36 REMOTE_HOST = ------------------------- = class Gtk::AccelLabel The Gtk::AccelLabel widget is a subclass of Gtk::Label that also displays an accelerator key on the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard short-cuts for commands. The accelerator key to display is not set explicitly. Instead, the Gtk::AccelLabel displays the accelerators which have been added to a particular widget. This widget is set by calling Gtk::AccelLabel#accel_widget=. For example, a Gtk::MenuItem widget may have an accelerator added to emit the "activate" signal when the 'Ctl+S' key combination is pressed. A Gtk::AccelLabel is created and added to the Gtk::MenuItem, and Gtk::AccelLabel#accel_widget= is called with the Gtk::MenuItem as the second argument. The Gtk::AccelLabel will now display 'Ctl+S' after its label. Note that creating a Gtk::MenuItem with Gtk::MenuItem.new (or one of the similar functions for Gtk::CheckMenuItem and Gtk::RadioMenuItem) automatically adds a Gtk::AccelLabel to the Gtk::MenuItem and calls Gtk::AccelLabel#accel_widget= to set it up for you. A Gtk::AccelLabel will only display accelerators which have Gtk::ACCEL_VISIBLE set (see GtkAccelFlags). A Gtk::AccelLabel can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key. == super class * Gtk::Label == class methods --- Gtk::AccelLabel.new(string) Creates a new Gtk::AccelLabel. * string: the label string. Must be non-nil * Returns: a new Gtk::AccelLabel == public instance methods --- accel_closure Returns the accel_closure. * Returns: the accel_closure(GLib::Closure, or nil. --- accel_closure=(accel_closure) Sets the closure to be monitored by this accelerator label. The closure must be connected to an accelerator group; see Gtk::AccelGroup#connect * accel_closure: the closure(GLib::Closure) to monitor for accelerator changes. * Returns: the accel_closure --- set_accel_closure(accel_closure) Same as accel_closure=. * accel_closure: the closure(GLib::Closure) to monitor for accelerator changes. * Returns: self --- accel_widget Fetches the widget monitored by this accelerator label. * Returns : the object monitored by the accelerator label, or nil. --- accel_widget=(accel_widget) Sets the widget to be monitored by this accelerator label. * accel_widget: the widget to be monitored. * Returns: accel_widget --- set_accel_widget(accel_widget) Same as accel_widget=. * accel_widget: the widget to be monitored. * Returns: self --- accel_width Returns the width needed to display the accelerator key(s). This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn't be needed by applications. * Returns: the width needed to display the accelerator key(s). --- refetch Recreates the string representing the accelerator keys. This should not be needed since the string is automatically updated whenever accelerators are added or removed from the associated widget. * accel_label : a Gtk::AccelLabel. * Returns : always returns false. == See Also Keyboard Accelerators installing and using keyboard short-cuts. Gtk::ItemFactory an easier way to create menus. - ((<Masao>)) ------------------------- = class Gtk::AccelLabel The Gtk::AccelLabel widget is a subclass of Gtk::Label that also displays an accelerator key on the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard short-cuts for commands. The accelerator key to display is not set explicitly. Instead, the Gtk::AccelLabel displays the accelerators which have been added to a particular widget. This widget is set by calling Gtk::AccelLabel#accel_widget=. For example, a Gtk::MenuItem widget may have an accelerator added to emit the "activate" signal when the 'Ctl+S' key combination is pressed. A Gtk::AccelLabel is created and added to the Gtk::MenuItem, and Gtk::AccelLabel#accel_widget= is called with the Gtk::MenuItem as the second argument. The Gtk::AccelLabel will now display 'Ctl+S' after its label. Note that creating a Gtk::MenuItem with Gtk::MenuItem.new (or one of the similar functions for Gtk::CheckMenuItem and Gtk::RadioMenuItem) automatically adds a Gtk::AccelLabel to the Gtk::MenuItem and calls Gtk::AccelLabel#accel_widget= to set it up for you. A Gtk::AccelLabel will only display accelerators which have Gtk::ACCEL_VISIBLE set (see ((<GtkAccelFlags|Gtk#GtkAccelFlags>))). A Gtk::AccelLabel can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key. == super class * Gtk::Label == class methods --- Gtk::AccelLabel.new(string) Creates a new Gtk::AccelLabel. * string: the label string. Must be non-nil * Returns: a new Gtk::AccelLabel == public instance methods --- accel_closure Returns the accel_closure. * Returns: the accel_closure(GLib::Closure, or nil). --- accel_closure=(accel_closure) Sets the closure to be monitored by this accelerator label. The closure must be connected to an accelerator group; see Gtk::AccelGroup#connect * accel_closure: the closure(GLib::Closure) to monitor for accelerator changes. * Returns: the accel_closure --- set_accel_closure(accel_closure) Same as accel_closure=. * accel_closure: the closure(GLib::Closure) to monitor for accelerator changes. * Returns: self --- accel_widget Fetches the widget monitored by this accelerator label. * Returns : the object monitored by the accelerator label, or nil. --- accel_widget=(accel_widget) Sets the widget to be monitored by this accelerator label. * accel_widget: the widget to be monitored. * Returns: accel_widget --- set_accel_widget(accel_widget) Same as accel_widget=. * accel_widget: the widget to be monitored. * Returns: self --- accel_width Returns the width needed to display the accelerator key(s). This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn't be needed by applications. * Returns: the width needed to display the accelerator key(s). --- refetch Recreates the string representing the accelerator keys. This should not be needed since the string is automatically updated whenever accelerators are added or removed from the associated widget. * accel_label : a Gtk::AccelLabel. * Returns : always returns false. == See Also Keyboard Accelerators installing and using keyboard short-cuts. Gtk::ItemFactory an easier way to create menus. - ((<Masao>))