File: display.rb

package info (click to toggle)
geotoad 3.9.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 840 kB
  • ctags: 170
  • sloc: ruby: 3,297; makefile: 30
file content (42 lines) | stat: -rw-r--r-- 911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This is where code specific to the user interface display gets put.
#
# $HeadURL: svn://127.0.0.01/repository/geotoad/trunk/CLI/interface/display.rb $
# $Id: display.rb 561 2006-03-09 11:38:48Z thomas $

module Display
    def enableDebug
        $debugMode = 1
    end
    
    def debug(text)
        if $debugMode == 1
            puts "< d > #{text}"
        end
    end
    
    # Text that's just fluff that can be ignored.
    def displayInfo(text)
        puts "( - ) #{text}"
    end
    
    # often worth displaying
    def displayTitleMessage(text)
        puts "( = ) #{text}"
    end
    
    # often worth displaying
    def displayMessage(text)
        puts "( o ) #{text}"
    end
    
    # mindless warnings
    def displayWarning(text)
        puts " ***  #{text}"
    end
    
    # fatal errors
    def displayError(text)
        puts " *!*  ERROR: #{text}"
        sleep(1)
    end
end