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

Back to archive index

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


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

== Module Functions
--- Gtk::AccelMap.add_entry(accel_path, accel_key, accel_mods)
    Registers a new accelerator with the global accelerator map. This function should only be called once per accel_path with the canonical accel_key and accel_mods for this path. To change the accelerator during runtime programatically, use Gtk::AccelMap.change_entry. The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action", where <WINDOWTYPE> should be a unique application-specific identifier, that corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion is most appropriately chosen by the action the accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator path may look like: "<Gimp-Toolbox>/File/Dialogs/Tool Options...".
    * accel_path: valid accelerator path 
    * accel_key: the accelerator key (Gdk::Keyval constants)
    * accel_mods: the accelerator modifiers (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
    * Returns: Qnil

--- Gtk::AccelMap.lookup_entry(accel_path)
    Looks up the accelerator entry for accel_path.
    * accel_path: a valid accelerator path
    * Returns: a Gtk::AccelKey or nil 

--- Gtk::AccelMap.change_entry(accel_path, accel_key, accel_mods, replace)
    Changes the accel_key and accel_mods currently associated with accel_path. Due to conflicts with other accelerators, a change may not always be possible, replace indicates whether other accelerators may be deleted to resolve such conflicts. A change will only occur if all conflicts could be resolved (which might not be the case if conflicting accelerators are locked). Successful changes are indicated by a true return value.
    * accel_path: a valid accelerator path 
    * accel_key: the new accelerator key (Gdk::Keyval constants)
    * accel_mods: the new accelerator modifiers (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
    * replace: true if other accelerators may be deleted upon conflicts 
    * Returns: true if the accelerator could be changed, false otherwise 

--- Gtk::AccelMap.load(file_name)
    Parses a file previously saved with Gtk:AccelMap.save for accelerator specifications, and propagates them accordingly.
    * file_name: a file containing accelerator specifications 
    * Returns: nil

--- Gtk::AccelMap.save(file_name)
    Saves current accelerator specifications (accelerator path, key and modifiers) to file_name. The file is written in a format suitable to be read back in by Gtk::AccelMap.load.
    * file_name: the file to contain accelerator specifications 
    * Returns: self

--- Gtk::AccelMap.each{|accel_path, accel_key, accel_mods, changed| ... }
    Loops over the entries in the accelerator map whose accel path doesn't match any of the filters added with Gtk::AccelMap.add_filter, and execute given block on each. The changed parameter indicates whether this accelerator was changed during runtime (thus, would need saving during an accelerator map dump).
    * {|accel_path, accel_key, accel_mods, changed| ... }: a block to be executed for each accel map entry which is not filtered out
      * accel_path: an accelerator path 
      * accel_key: an accelerator key (Gdk::Keyval constants)
      * accel_mods: an accelerator modifiers (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
      * changed: true if this accelerator was changed during runtime
    * Returns: nil

--- Gtk::AccelMap.add_filter(filter_pattern)
    Adds a filter to the global list of accel path filters.
    Accel map entries whose accel path matches one of the filters are skipped by Gtk::AccelMap.each.
    This function is intended for GTK+ modules that create their own menus, but don't want them to be saved into the applications accelerator map dump.
    * filter_pattern: a pattern String (see GLib::PatternSpec) 
    * Returns: nil

--- Gtk::AccelMap.each_unfilterd{|accel_path, accel_key, accel_mods, changed| ... }
    Loops over all entries in the accelerator map, and execute given block on each. The changed parameter indicates whether this accelerator was changed during runtime (thus, would need saving during an accelerator map dump).
    * {|accel_path, accel_key, accel_mods, changed| ... }: a block to be executed for each accel map entry 
      * accel_path: an accelerator path 
      * accel_key: an accelerator key (Gdk::Keyval constants)
      * accel_mods: an accelerator modifiers (((<GdkModifierType|Gdk::Window#GdkModifierType>)))
      * changed: true if this accelerator was changed during runtime
    * Returns: self


- ((<Masao>))






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