File: rotate_command.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 (37 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (4)
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
-- Copyright 1998 Richie Bielak and others
-- Licensed under Eiffel Forum Freeware License, version 1;
-- (see forum.txt)
--
indexing

	author: "Jrgen Tegner"
	date: "1/18/99"

class ROTATE_COMMAND
	
inherit 

	NOTEBOOK_COMMAND;
   
feature {ANY}

	direction: INTEGER;
	
	set_direction(dir: INTEGER) is 
		require 
			valid_parameter: dir = - 1 or dir = 1; 
		do  
			direction := dir;
		end -- set_direction
	
	
	execute is 
		do  
			if direction = - 1 then 
				notebook.prev_page;
			else 
				notebook.next_page;
			end; 
		end -- execute
	
end -- class ROTATE_COMMAND