File: main_window_button_press.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 (47 lines) | stat: -rw-r--r-- 867 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
39
40
41
42
43
44
45
46
47
indexing
	description: "Process button press event"
	author: "Dave E Martin XXIII"
	license: "Eiffel Forum"
	genesis: "199903220047 utc"
	version: "v 0.3.5 GTK+ 1.2.x"
	gtk_version: "1.2"

class MAIN_WINDOW_BUTTON_PRESS

inherit

	GDK_BUTTON_PRESS_COMMAND
		redefine
			execute
		end

	GDK_EXTERNALS

creation

	make

feature {NONE} -- initialization

	make (event_generator: MAIN_WINDOW) is
		do
			main_window := event_generator
			make_button_press (event_generator)
		end

feature {NONE} -- implementation

	execute is
		do
			-- print ("goo%N")
			main_window.put_pixel (event.x.rounded, 
									   event.y.rounded, 
									   45354230)
				-- main_window.set_draw_lines (False)
			--TODO			main_window.set_draw_lines (event.button /= 1)
			--fix Image class, which is not really a drawable (but currently thinks it is)
		end

	main_window: MAIN_WINDOW

end