Class: GoToLine

Inherits:
TkFloatTitledFrame show all
Defined in:
ext/ae-editor/ae-editor.rb

Constant Summary

Constants included from TkResizable

TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH

Instance Attribute Summary collapse

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkFloatTitledFrame

#head_buttons, #hide, #hide_if_visible, #on_close=, #show_grabbed, #title

Methods included from TkResizable

#resizing_do_move_obj, #resizing_do_press, #start_resizing, #stop_resizing

Methods included from TkMovable

#moving_do_move_obj, #moving_do_press, #start_moving, #stop_moving

Methods inherited from TkBaseTitledFrame

#add_fixed_button, #add_fixed_menu_button, #add_fixed_panel, #add_fixed_sep, #create_frame, #head_buttons, #menu_button, #visible?

Constructor Details

#initialize(_parent) ⇒ GoToLine

Returns a new instance of GoToLine.



5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
# File 'ext/ae-editor/ae-editor.rb', line 5855

def initialize(_parent)
  super(_parent)
  #stop_resizing
  y0 = 10
  d = 23    
  TkLabel.new(self.frame, Arcadia.style('label')){
 	  text 'Go to line:'
 	  place('x' => 8,'y' => y0,'height' => 19)
  }
  y0 = y0 + d
 	@e_line = TkEntry.new(self.frame, Arcadia.style('edit')){
    justify  'left'
    #relief  'ridge'
    place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
 	}
  #@e_line.bind_append("1",proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>@e_line))})
  @e_line.extend(TkInputThrow)
  
 	y0 = y0 + d
 	y0 = y0 + d
  @buttons_frame = TkFrame.new(self.frame, Arcadia.style('panel')).pack('fill'=>'x', 'side'=>'bottom')	
  
  @b_go = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go|
    compound  'none'
    default  'disabled'
    text  'Go'
    #overrelief  'raised'
    #justify  'center'
    pack('side'=>'right','ipadx'=>5, 'padx'=>5)
  }
  place('x'=>150,'y'=>150,'height'=> 120,'width'=> 240)
  
end

Instance Attribute Details

#b_goObject (readonly)

Returns the value of attribute b_go.



5854
5855
5856
# File 'ext/ae-editor/ae-editor.rb', line 5854

def b_go
  @b_go
end

#e_lineObject (readonly)

Returns the value of attribute e_line.



5853
5854
5855
# File 'ext/ae-editor/ae-editor.rb', line 5853

def e_line
  @e_line
end

Instance Method Details

#showObject



5889
5890
5891
5892
5893
5894
5895
# File 'ext/ae-editor/ae-editor.rb', line 5889

def show
  super
  self.focus
  @e_line.focus
  @e_line.select_throw
  @e_line.selection_range(0,'end')
end