Class: Cosmos::RubyEditor::LineNumberArea

Inherits:
Qt::Widget show all
Defined in:
lib/cosmos/gui/text/ruby_editor.rb

Instance Method Summary collapse

Constructor Details

#initialize(editor) ⇒ LineNumberArea

Returns a new instance of LineNumberArea.



138
139
140
141
142
# File 'lib/cosmos/gui/text/ruby_editor.rb', line 138

def initialize(editor)
  super(editor)
  @codeEditor = editor
  self
end

Instance Method Details

#paintEvent(event) ⇒ Object



148
149
150
# File 'lib/cosmos/gui/text/ruby_editor.rb', line 148

def paintEvent(event)
  @codeEditor.lineNumberAreaPaintEvent(event)
end

#sizeHintObject



144
145
146
# File 'lib/cosmos/gui/text/ruby_editor.rb', line 144

def sizeHint()
  return Qt::Size(@codeEditor.lineNumberAreaWidth(), 0)
end