Class: Smagacor::LogWindow
- Defined in:
- lib/smagacor/smagacor-ui.rb
Overview
Log window for viewing the log statements (information, error descriptions, etc ).
Instance Method Summary collapse
-
#close ⇒ Object
Invoked by the logger library for closing the log device.
-
#initialize(p) ⇒ LogWindow
constructor
Create a LogWindow.
-
#write(message) ⇒ Object
Invoked by the logger library for writing log messages.
Constructor Details
#initialize(p) ⇒ LogWindow
Create a LogWindow
128 129 130 131 132 133 134 |
# File 'lib/smagacor/smagacor-ui.rb', line 128 def initialize( p ) super( p, "Log Window", DECOR_ALL, 0, 0, 600, 400 ) vertical = FXVerticalFrame.new( self, LAYOUT_SIDE_TOP|LAYOUT_SIDE_LEFT|LAYOUT_FILL_X|LAYOUT_FILL_Y ) @log = FXText.new( vertical, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y ) @log.editable = false FXButton.new( vertical, "Close", nil, self, ID_ACCEPT, FRAME_RAISED|LAYOUT_FILL_X ) end |
Instance Method Details
#close ⇒ Object
Invoked by the logger library for closing the log device. Does nothing.
143 |
# File 'lib/smagacor/smagacor-ui.rb', line 143 def close() end |
#write(message) ⇒ Object
Invoked by the logger library for writing log messages. The message is appended to log.
137 138 139 140 |
# File 'lib/smagacor/smagacor-ui.rb', line 137 def write( ) @log.appendText( ) @log.makePositionVisible( @log.text.length ) end |