Class: OutputView
- Inherits:
-
Object
- Object
- OutputView
- Defined in:
- ext/ae-output/ae-output.rb
Overview
require “base/a-utils”
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(parent = nil) ⇒ OutputView
constructor
A new instance of OutputView.
Constructor Details
#initialize(parent = nil) ⇒ OutputView
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'ext/ae-output/ae-output.rb', line 11 def initialize(parent=nil) left_frame = TkFrame.new(parent.frame).place('x' => '0','y' => '0','relheight' => '1','width' => '25') = Tk::BWidget::Button.new(left_frame){ image TkPhotoImage.new('dat' => CLEAR_GIF) helptext 'Clear' foreground 'blue' command proc{parent.main_frame.text.delete('1.0','end')} relief 'groove' pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0) } #@splitted_frame = AGTkVSplittedFrames.new(parent.frame,20) @text = TkText.new(parent.frame, 'wrap'=> 'none', 'relief' => 'sunken', 'font' => parent.conf('font') ){|j| .new(j){|s| command proc{|*args| j.yview(*args)} j.yscrollcommand proc{|first,last| s.set first,last} }.pack('side'=>'right', 'fill'=>'y') }.place('relwidth' => '1','x' => '25','y' => '0','relheight' => '1', 'width' => '-25') @text.tag_configure('simple_msg', 'background' => '#d9d994', 'borderwidth'=>1, 'relief'=> 'flat' ) @text.tag_configure('debug_msg', 'background' => '#f6c9f6', 'foreground' => '#000000', 'borderwidth'=>1, 'relief'=> 'flat' ) @text.tag_configure('error_msg', 'background' => '#f6c9f6', 'foreground' => 'red', 'borderwidth'=>1, 'relief'=> 'flat' ) @text.tag_configure('bord_msg', #'foreground' => '#b9b8b9' 'foreground' => '#7c9b10' ) @text.tag_configure('sel', 'background'=>parent.conf('hightlight.sel.color.background'), 'foreground'=>parent.conf('hightlight.sel.color.foreground')) end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
10 11 12 |
# File 'ext/ae-output/ae-output.rb', line 10 def text @text end |