File: list_remove_selection_cmd.e

package info (click to toggle)
egtk 0.3.6-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,984 kB
  • ctags: 5,256
  • sloc: ansic: 2,320; sh: 273; makefile: 234
file content (38 lines) | stat: -rw-r--r-- 660 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- Copyright 2000 Richie Bielak and others
-- Licensed under Eiffel Forum Freeware License, version 1;
-- (see forum.txt)
--
class LIST_REMOVE_SELECTION_CMD

inherit

	GTK_COMMAND

creation

	make

feature

	list: GTK_LIST

	make (llist: like list) is
		do
			list := llist
		end

	execute is
		local
			selection, clear_list: G_LIST
		do
			-- TODO: extended selection must be done differently 
			-- maybe. Something seems to be needed with focus_child 
			-- but I don't understand the code in the C example
			selection := list.selection
			if selection /= Void then
				clear_list := clone (selection)
				list.remove_items (clear_list)
			end
		end

end