[ruby-gnome2-doc-cvs] [Hiki] create - Gtk::Accelerator

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 12日 (火) 11:19:33 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gtk%3A%3AAccelerator
-------------------------
= module Gtk::Accelerator

== Module Functions
--- Gtk::Accelerator.valid(keyval, modifier)
    Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. 
    For example, the Gdk::Keyval::GDK_a keyval plus Gdk::Window::CONTROL_MASK is valid - this is a "Ctrl+a" accelerator. But, you can't, for instance, use the Gdk::Keyval::GDK_Control_L keyval as an accelerator.
    * keyval : a GDK keyval(Gdk::Keyval constants) 
    * modifiers : modifier mask(((<GdkModifierType|Gdk::Window#GdkModifierType>)))
    * Returns : true if the accelerator is valid 

--- Gtk::Accelerator.parse(accelerator)
    Parses a string representing an accelerator. The format looks like "<Control>a" or "<Shift><Alt>F1" or "<Release>z" (the last one is for key release). The parser is fairly liberal and allows lower or upper case, and also abbreviations such as "<Ctl>" and "<Ctrl>".
    If the parse fails, accelerator_key and accelerator_mods will be set to 0 (zero).
    * accelerator: string representing an accelerator 
    * Returns: [key, mods]
       * key: return accelerator keyval
       * mods: return accelerator modifier mask(((<GdkModifierType|Gdk::Window#GdkModifierType>)))

--- Gtk::Accelerator.to_name(key, mods)
    Converts an accelerator keyval and modifier mask into a string parseable by Gtk::Accelerator.parse. For example, if you pass in Gdk::Keyval::GDK_q and Gdk::Keyval::GDK_CONTROL_MASK, this method returns "<Control>q". 
    * keyval: accelerator keyval(Gdk::Keyval constants) 
    * modifiers: accelerator modifier mask(((<GdkModifierType|Gdk::Window#GdkModifierType>)))
    * Returns: an accelerator name 

--- Gtk::Accelerator.default_mod_mask
    Gets the value set by Gtk::Accelerator.set_default_mod_mask.
    * Returns : the default accelerator modifier mask (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
--- Gtk::Accelerator.set_default_mod_mask(default_mod_mask)
    Sets the modifiers that will be considered significant for keyboard accelerators. The default mod mask is Gdk::Window::CONTROL_MASK | Gdk::Window::SHIFT_MASK | Gdk:Window::MOD1_MASK, that is, Control, Shift, and Alt. Other modifiers will by default be ignored by Gtk:AccelGroup. You must include at least the three default modifiers in any value you pass to this method.
    The default mod mask should be changed on application startup, before using any accelerator groups.
    * default_mod_mask: accelerator modifier mask (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
    * Returns: self


== See Also
Gtk::Window#add_accel_group, Gtk::AccepMap.change_entry, Gtk::ItemFactory.new, Gtk::Label.new

- ((<Masao>))







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