Browse Subversion Repository
Contents of /view.rb
Parent Directory
| Revision Log
Revision 1 -
( show annotations)
( download)
Tue Apr 3 11:13:38 2007 UTC
(16 years, 11 months ago)
by bluedwarf
File size: 945 byte(s)
Initial import.
| 1 |
|
| 2 |
module Edmaru |
| 3 |
|
| 4 |
#Abstract class to implement system specific view. |
| 5 |
module View |
| 6 |
|
| 7 |
#Construct the view instance. |
| 8 |
# |
| 9 |
#=== Warning |
| 10 |
#This method *MUST* *NOT* be overrided in derived classes. |
| 11 |
# |
| 12 |
#=== Return |
| 13 |
#An initialized instance of View. |
| 14 |
def initialize |
| 15 |
init |
| 16 |
end |
| 17 |
|
| 18 |
#The system specific initialization for this view. |
| 19 |
# |
| 20 |
#=== Warning |
| 21 |
#This method *MUST* be overrided in derived classes. |
| 22 |
def init |
| 23 |
end |
| 24 |
|
| 25 |
#Main loop to catch all events. |
| 26 |
# |
| 27 |
#=== Warning |
| 28 |
#This method *SHOULD* be overrided in derived classes. |
| 29 |
def main_loop |
| 30 |
end |
| 31 |
|
| 32 |
#Beep once. |
| 33 |
# |
| 34 |
#=== Warning |
| 35 |
#This method *SHOULD* be overrided in derived classes. |
| 36 |
# |
| 37 |
#=== Return |
| 38 |
#_true_ if beeping succeeds. |
| 39 |
def beep |
| 40 |
false |
| 41 |
end |
| 42 |
|
| 43 |
#Terminate this view instance. |
| 44 |
# |
| 45 |
#=== Warning |
| 46 |
#This method *SHOULD* be overrided in derived classes. |
| 47 |
def terminate |
| 48 |
end |
| 49 |
end |
| 50 |
end |
|