| 7 |
#Abstract class to implement system specific view. |
#Abstract class to implement system specific view. |
| 8 |
module View |
module View |
| 9 |
|
|
| 10 |
#Construct the view instance. |
#Construct a view instance. |
| 11 |
# |
# |
| 12 |
#=== Warning |
#=== Warning |
| 13 |
#This method *MUST* *NOT* be overrided in derived classes. |
#This method *MUST* *NOT* be overrided in derived classes. |
| 20 |
#An initialized instance of View. |
#An initialized instance of View. |
| 21 |
def initialize(event_manager) |
def initialize(event_manager) |
| 22 |
@event_manager = event_manager |
@event_manager = event_manager |
| 23 |
@mini_window = Edmaru::window_class.new |
|
|
@windows = Array.new |
|
|
@windows.push(Edmaru::window_class.new) |
|
| 24 |
init_ui |
init_ui |
| 25 |
|
|
| 26 |
|
#Show default windows. |
| 27 |
|
@windows = Array.new |
| 28 |
|
@windows.push |
| 29 |
|
Edmaru::window_class.new(self, 0, 0, |
| 30 |
|
allocated_column, allocated_line - 1) |
| 31 |
|
@mini_window = |
| 32 |
|
Edmaru::mini_window_class.new(self, 0, |
| 33 |
|
allocated_line - 1, |
| 34 |
|
allocated_column) |
| 35 |
end |
end |
| 36 |
|
|
| 37 |
#The system specific initialization for this view. |
#The system specific initialization for this view. |
| 41 |
def init_ui |
def init_ui |
| 42 |
end |
end |
| 43 |
|
|
| 44 |
|
#Total column size allocated for this view. |
| 45 |
|
# |
| 46 |
|
#=== Warning |
| 47 |
|
#This method *SHOULD* be overrided in drived classes. |
| 48 |
|
def allocated_column |
| 49 |
|
0 |
| 50 |
|
end |
| 51 |
|
|
| 52 |
|
#Total numbe of lines allocated for this view. |
| 53 |
|
# |
| 54 |
|
#=== Warning |
| 55 |
|
#This method *SHOULD* be overrided in drived classes. |
| 56 |
|
def allocated_line |
| 57 |
|
0 |
| 58 |
|
end |
| 59 |
|
|
| 60 |
#The mini window displayed in the bottom of the screen. |
#The mini window displayed in the bottom of the screen. |
| 61 |
# |
# |
| 62 |
#=== Warning |
#=== Warning |