Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /mini_window.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (hide annotations) (download)
Thu Apr 19 17:54:27 2007 UTC (16 years, 11 months ago) by bluedwarf
File size: 2369 byte(s)
Improvement on Gtk mode.

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 bluedwarf 36 require "mini_buffer.rb"
22 bluedwarf 6
23     module Edmaru
24    
25     #A special window that doesn't have modeline bar.
26     module MiniWindow
27 bluedwarf 34 include Window
28 bluedwarf 6
29     #Construct a window instance.
30     #
31 bluedwarf 20 #=== Arguments
32     #_view_ :: The parent view.
33     #_config_ :: An instance of Edmaru::ConfigurationManager.
34     #
35 bluedwarf 6 #=== Warning
36     #This method *MUST* *NOT* be overrided in derived classes.
37     #
38     #=== Return
39     #An initialized instance of Window.
40 bluedwarf 20 def initialize(view, config)
41 bluedwarf 24 @buffer = nil
42 bluedwarf 6 @view = view
43 bluedwarf 20 @config = config
44 bluedwarf 31 @cursor = Cursor.new(0, 0) # logical cursor
45 bluedwarf 34 @modeline = nil #There is no modeline for mini window.
46 bluedwarf 38 @alerting = false
47 bluedwarf 15
48     init_ui
49 bluedwarf 6 end
50    
51 bluedwarf 15 #The system specific initialization for this window.
52     #
53     #=== Warning
54     #This method *SHOULD* be overrided in derived classes.
55     def init_ui
56     end
57    
58 bluedwarf 40 #Show alert message temporarily.
59 bluedwarf 32 #
60 bluedwarf 33 #=== Argument
61     #_message_ :: The message to be shown.
62     #
63 bluedwarf 32 #=== Warning
64 bluedwarf 33 #This method *SHOULD* be overrided in derived classes.
65     def show_alert(message)
66 bluedwarf 40 @alerting = true
67 bluedwarf 32 end
68    
69 bluedwarf 40 #Hide alert shown temporarily.
70     #
71     #=== Warning
72     #This method *SHOULD* be overrided in derived classes.
73     def hide_alert
74     @alerting = false
75     end
76    
77 bluedwarf 6 #Terminate this view instance.
78     #
79     #=== Warning
80 bluedwarf 19 #This method *MUST* *NOT* be overrided in derived classes.
81 bluedwarf 6 def terminate
82 bluedwarf 19 terminate_ui
83 bluedwarf 6 end
84 bluedwarf 19
85     #Free system specific resources.
86     #
87     #=== Warning
88     #This method *SHOULD* be overrided in derived classes.
89     def terminate_ui
90     end
91 bluedwarf 6 end
92     end

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