Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /mini_window.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (hide annotations) (download)
Fri Apr 13 02:32:26 2007 UTC (16 years, 11 months ago) by bluedwarf
File size: 2263 byte(s)
The relation between mini window and window was changed.

1 bluedwarf 12 # mini_window.rb: the module definition of Edmaru::MiniWindow
2 bluedwarf 10 #
3     # Copyright (C) 2007 Takashi Nakamoto
4     #
5     # This program is free software; you can redistribute it and/or modify
6     # it under the terms of the GNU General Public License version 2 as
7     # published by the Free Software Foundation.
8     #
9     # This program is distributed in the hope that it will be useful, but
10     # WITHOUT ANY WARRANTY; without even the implied warranty of
11     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12     # General Public License for more details.
13     #
14     # You should have received a copy of the GNU General Public License
15     # along with this program; if not, write to the Free Software
16     # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17     # 02110-1301 USA.
18     #
19 bluedwarf 6
20     require "window.rb"
21    
22     module Edmaru
23    
24     #A special window that doesn't have modeline bar.
25     module MiniWindow
26 bluedwarf 34 include Window
27 bluedwarf 6
28     #Construct a window instance.
29     #
30 bluedwarf 20 #=== Arguments
31     #_view_ :: The parent view.
32     #_config_ :: An instance of Edmaru::ConfigurationManager.
33     #
34 bluedwarf 6 #=== Warning
35     #This method *MUST* *NOT* be overrided in derived classes.
36     #
37     #=== Return
38     #An initialized instance of Window.
39 bluedwarf 20 def initialize(view, config)
40 bluedwarf 24 @buffer = nil
41 bluedwarf 6 @view = view
42 bluedwarf 20 @config = config
43 bluedwarf 31 @cursor = Cursor.new(0, 0) # logical cursor
44 bluedwarf 34 @modeline = nil #There is no modeline for mini window.
45 bluedwarf 15
46     init_ui
47 bluedwarf 6 end
48    
49 bluedwarf 15 #The system specific initialization for this window.
50     #
51     #=== Warning
52     #This method *SHOULD* be overrided in derived classes.
53     def init_ui
54     end
55    
56 bluedwarf 33 #Show alert message tempoarily.
57 bluedwarf 32 #
58 bluedwarf 33 #=== Argument
59     #_message_ :: The message to be shown.
60     #
61 bluedwarf 32 #=== Warning
62 bluedwarf 33 #This method *SHOULD* be overrided in derived classes.
63     def show_alert(message)
64     #ToDo: this is an imcomplete implementation.
65     @buffer.clear
66     @cursor.row = @cursor.column = 0
67     @buffer.append(message)
68 bluedwarf 32 end
69    
70 bluedwarf 6 #Terminate this view instance.
71     #
72     #=== Warning
73 bluedwarf 19 #This method *MUST* *NOT* be overrided in derived classes.
74 bluedwarf 6 def terminate
75 bluedwarf 19 terminate_ui
76 bluedwarf 6 end
77 bluedwarf 19
78     #Free system specific resources.
79     #
80     #=== Warning
81     #This method *SHOULD* be overrided in derived classes.
82     def terminate_ui
83     end
84 bluedwarf 6 end
85     end

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26