Gtk::ImageMenuItem Diff - Ruby-GNOME2 Project Website
- Added parts are displayed like this.
- Deleted parts are displayed
like this.
= class Gtk::ImageMenuItem
A Gtk::ImageMenuItem is a menu item which has an icon next to the text label.
Note that the user can disable display of menu icons, so make sure to still fill in the text label.
== Object Hierarchy
* Object
* GLib::Instantiatable
* GLib::Object
* GLib::InitiallyUnowned
* Gtk::Object
* Gtk::Widget
* Gtk::Container
* Gtk::Bin
* Gtk::Item
* Gtk::MenuItem
* Gtk::ImageMenuItem
== Class Methods
--- Gtk::ImageMenuItem.new(label = nil, use_underline = true)
Creates a new Gtk::ImageMenuItem.
* label: the string to use for the label.
* use_undeline: true if underscores in label indicate the mnemonic for the menu item.
* Returns : a new Gtk::ImageMenuItem.
--- Gtk::ImageMenuItem.new(stock_id, accel_group = nil)
Creates a new Gtk::ImageMenuItem containing the image and text from a stock item(Gtk::Stock constants like Gtk::Stock::OK and Gtk::Stock::APPLY).
If you want this menu item to have changeable accelerators, then pass in nil for accel_group. Next call Gtk::MenuItem#accel_path= with an appropriate path for the menu item, use Gtk::Stock.lookup to look up the standard accelerator for the stock item, and if one is found, call Gtk::AccepMap.add_entry to register it.
* stock_id: a stock item(Gtk::Stock constans).
* accel_group: the Gtk::AccelGroup to add the menu items accelerator to, or nil.
* Returns: a new Gtk::ImageMenuItem.
== Instance Methods
--- image
Gets the widget that is currently set as the image of image_menu_item. See Gtk::ImageMenuItem#image=.
* Returns: the widget set as image of image_menu_item.
--- image=(image)
Sets the image of image_menu_item to the given widget.
* image: a widget(Gtk::Widget) to set as the image for the menu item.
* Returns: image.
--- set_image(image)
Same as Gtk::ImageMenuItem#image=.
* image: a widget(Gtk::Widget) to set as the image for the menu item.
* Returns: self.
--- ref_accessible
See Atk::Implementor#ref_accessible.
--- add_child
See Gtk::Buildable#add_child.
--- construct_child
See Gtk::Buildable#construct_child.
--- get_internal_child
See Gtk::Buildable#get_internal_child.
--- name
See Gtk::Buildable#name.
--- name=
See Gtk::Buildable#name=.
--- set_buildable_property
See Gtk::Buildable#set_buildable_property.
--- set_name
See Gtk::Buildable#set_name.
--- accel_group=(accel_group)
Sets the Accel Group to use for stock accelerator keys.
* accel_group: The Accel Group to use for stock accelerator keys
* Returns: accel_group
--- always_show_image=(always_show_image)
Sets the value whether the image will always be shown or not.
* always_show_image: true if the image will always be shown
* Returns: always_show_image
--- always_show_image?
Gets the value whether the image will always be shown or not.
* Returns: true if the image will always be shown
--- builder_name
See Gtk::Buildable#builder_name.
--- builder_name=
See Gtk::Buildable#builder_name=.
--- set_accel_group(accel_group)
Same as accel_group=.
* accel_group: The Accel Group to use for stock accelerator keys
* Returns: self
--- set_always_show_image(always_show_image)
Same as always_show_image=.
* always_show_image: true if the image will always be shown
* Returns: self
--- set_builder_name
See Gtk::Buildable#set_builder_name.
--- set_use_stock(use_stock)
Same as use_stock=.
* use_stock: true if to use the label text to create a stock menu item
* Returns: self
--- use_stock=(use_stock)
Sets the value whether to use the label text to create a stock menu item or not.
* use_stock: true if to use the label text to create a stock menu item
* Returns: use_stock
--- use_stock?
Gets the value whether to use the label text to create a stock menu item or not.
* Returns: true if to use the label text to create a stock menu item
== Properties
--- image: Gtk::Widget (Read/Write)
Child widget to appear next to the menu text
--- accel-group: Gtk::AccelGroup (Write)
The Accel Group to use for stock accelerator keys
--- always-show-image: true or false (Read/Write)
Whether the image will always be shown
--- use-stock: true or false (Read/Write)
Whether to use the label text to create a stock menu item
== See Also
== ChangeLog
- ((<Masao>))
A Gtk::ImageMenuItem is a menu item which has an icon next to the text label.
Note that the user can disable display of menu icons, so make sure to still fill in the text label.
== Object Hierarchy
* Object
* GLib::Instantiatable
* GLib::Object
* GLib::InitiallyUnowned
* Gtk::Object
* Gtk::Widget
* Gtk::Container
* Gtk::Bin
* Gtk::Item
* Gtk::MenuItem
* Gtk::ImageMenuItem
== Class Methods
--- Gtk::ImageMenuItem.new(label = nil, use_underline = true)
Creates a new Gtk::ImageMenuItem.
* label: the string to use for the label.
* use_undeline: true if underscores in label indicate the mnemonic for the menu item.
* Returns : a new Gtk::ImageMenuItem.
--- Gtk::ImageMenuItem.new(stock_id, accel_group = nil)
Creates a new Gtk::ImageMenuItem containing the image and text from a stock item(Gtk::Stock constants like Gtk::Stock::OK and Gtk::Stock::APPLY).
If you want this menu item to have changeable accelerators, then pass in nil for accel_group. Next call Gtk::MenuItem#accel_path= with an appropriate path for the menu item, use Gtk::Stock.lookup to look up the standard accelerator for the stock item, and if one is found, call Gtk::AccepMap.add_entry to register it.
* stock_id: a stock item(Gtk::Stock constans).
* accel_group: the Gtk::AccelGroup to add the menu items accelerator to, or nil.
* Returns: a new Gtk::ImageMenuItem.
== Instance Methods
--- image
Gets the widget that is currently set as the image of image_menu_item. See Gtk::ImageMenuItem#image=.
* Returns: the widget set as image of image_menu_item.
--- image=(image)
Sets the image of image_menu_item to the given widget.
* image: a widget(Gtk::Widget) to set as the image for the menu item.
* Returns: image.
--- set_image(image)
Same as Gtk::ImageMenuItem#image=.
* image: a widget(Gtk::Widget) to set as the image for the menu item.
* Returns: self.
--- ref_accessible
See Atk::Implementor#ref_accessible.
--- add_child
See Gtk::Buildable#add_child.
--- construct_child
See Gtk::Buildable#construct_child.
--- get_internal_child
See Gtk::Buildable#get_internal_child.
--- name
See Gtk::Buildable#name.
--- name=
See Gtk::Buildable#name=.
--- set_buildable_property
See Gtk::Buildable#set_buildable_property.
--- set_name
See Gtk::Buildable#set_name.
--- accel_group=(accel_group)
Sets the Accel Group to use for stock accelerator keys.
* accel_group: The Accel Group to use for stock accelerator keys
* Returns: accel_group
--- always_show_image=(always_show_image)
Sets the value whether the image will always be shown or not.
* always_show_image: true if the image will always be shown
* Returns: always_show_image
--- always_show_image?
Gets the value whether the image will always be shown or not.
* Returns: true if the image will always be shown
--- builder_name
See Gtk::Buildable#builder_name.
--- builder_name=
See Gtk::Buildable#builder_name=.
--- set_accel_group(accel_group)
Same as accel_group=.
* accel_group: The Accel Group to use for stock accelerator keys
* Returns: self
--- set_always_show_image(always_show_image)
Same as always_show_image=.
* always_show_image: true if the image will always be shown
* Returns: self
--- set_builder_name
See Gtk::Buildable#set_builder_name.
--- set_use_stock(use_stock)
Same as use_stock=.
* use_stock: true if to use the label text to create a stock menu item
* Returns: self
--- use_stock=(use_stock)
Sets the value whether to use the label text to create a stock menu item or not.
* use_stock: true if to use the label text to create a stock menu item
* Returns: use_stock
--- use_stock?
Gets the value whether to use the label text to create a stock menu item or not.
* Returns: true if to use the label text to create a stock menu item
== Properties
--- image: Gtk::Widget (Read/Write)
Child widget to appear next to the menu text
--- accel-group: Gtk::AccelGroup (Write)
The Accel Group to use for stock accelerator keys
--- always-show-image: true or false (Read/Write)
Whether the image will always be shown
--- use-stock: true or false (Read/Write)
Whether to use the label text to create a stock menu item
== See Also
== ChangeLog
- ((<Masao>))