Gtk::TargetList
Class Methods
Gtk::TargetList.new(targets)
-
Creates a new Gtk::TargetList from an array of targets.
- targets: [[target1, flags1, info1], [target2, flags2, info2], ...]: a table of targets to add
- target: the drag type (String)
- flags: Gtk::Drag#TargetFlags
- info: an application assigned integer ID.
- Returns: the new Gtk::TargetList.
- targets: [[target1, flags1, info1], [target2, flags2, info2], ...]: a table of targets to add
Instance Methods
add(target, flags, info)
-
Adds another target to a Gtk::TargetList.
- target : the interned atom(Gdk::Atom) representing the target
- flags : the flags for this target
- info : an ID that will be passed back to the application
- Returns: self
add_table(targets)
-
Adds a table of targets into a target list.
- targets: [[target1, flags1, info1], [target2, flags2, info2], ...]: a table of targets to add
- target: the drag type (String)
- flags: Gtk::Drag#TargetFlags
- info: an application assigned integer ID.
- Returns: self
- targets: [[target1, flags1, info1], [target2, flags2, info2], ...]: a table of targets to add
remove(target)
-
Removes a target from a target list.
- target: the interned atom(Gdk::Atom) representing the target
- Returns: self
find(target)
-
Looks up a given target in a Gtk::TargetList.
- target: an interned atom(Gdk::Atom) representing the target to search for
- Returns: an application info for target, or nil
See Also
Gtk::Selection, Gtk::SelectionData.
Gtk::Widget - Much of the operation of selections happens via signals for Gtk::Widget. In particular, if you are using the methods in this section, you may need to pay attention to ::selection_get, ::selection_received, and :selection_clear_event signals.
- Masao?
Keyword(s):
References:[Gtk::TargetList] [Gtk::Drag] [Gtk::SelectionData] [Gtk::Selection]