Browse Subversion Repository
Diff of /mini_window.rb
Parent Directory
| Revision Log
| Patch
| 41 |
@config = config |
@config = config |
| 42 |
@cursor = Cursor.new(0, 0) # logical cursor |
@cursor = Cursor.new(0, 0) # logical cursor |
| 43 |
@modeline = nil |
@modeline = nil |
|
@prefix = "" |
|
| 44 |
|
|
| 45 |
init_ui |
init_ui |
| 46 |
end |
end |
| 52 |
def init_ui |
def init_ui |
| 53 |
end |
end |
| 54 |
|
|
| 55 |
#Set the prefix for this window that cannot be deleted by user. |
#Show alert message tempoarily. |
| 56 |
|
# |
| 57 |
|
#=== Argument |
| 58 |
|
#_message_ :: The message to be shown. |
| 59 |
# |
# |
| 60 |
#=== Warning |
#=== Warning |
| 61 |
#This method *MUST* *NOT* be overrided in derived classes. |
#This method *SHOULD* be overrided in derived classes. |
| 62 |
def prefix=(new_prefix) |
def show_alert(message) |
| 63 |
#Prefix cannot contain "\n". |
#ToDo: this is an imcomplete implementation. |
| 64 |
if new_prefix.empty? |
@buffer.clear |
| 65 |
@prefix = "" |
@cursor.row = @cursor.column = 0 |
| 66 |
else |
@buffer.append(message) |
|
@prefix = new_prefix.split("\n")[0] |
|
|
end |
|
| 67 |
end |
end |
| 68 |
|
|
| 69 |
#Terminate this view instance. |
#Terminate this view instance. |
|
|
Legend:
| Removed from v.32 |
|
| changed lines |
| |
Added in v.33 |
|
|
|