Class: GoToLine
- Inherits:
-
TkFloatTitledFrame
- Object
- TkFrame
- TkBaseTitledFrame
- TkFloatTitledFrame
- GoToLine
- Defined in:
- ext/ae-editor/ae-editor.rb
Constant Summary
Constants included from TkResizable
TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH
Instance Attribute Summary collapse
-
#b_go ⇒ Object
readonly
Returns the value of attribute b_go.
-
#e_line ⇒ Object
readonly
Returns the value of attribute e_line.
Attributes inherited from TkBaseTitledFrame
Instance Method Summary collapse
-
#initialize(_parent) ⇒ GoToLine
constructor
A new instance of GoToLine.
- #show ⇒ Object
Methods inherited from TkFloatTitledFrame
#head_buttons, #hide, #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_button, #add_menu_button, #create_frame, #head_buttons, #menu_button
Constructor Details
#initialize(_parent) ⇒ GoToLine
Returns a new instance of GoToLine.
3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 |
# File 'ext/ae-editor/ae-editor.rb', line 3886 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))}) 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_go ⇒ Object (readonly)
Returns the value of attribute b_go.
3885 3886 3887 |
# File 'ext/ae-editor/ae-editor.rb', line 3885 def b_go @b_go end |
#e_line ⇒ Object (readonly)
Returns the value of attribute e_line.
3884 3885 3886 |
# File 'ext/ae-editor/ae-editor.rb', line 3884 def e_line @e_line end |
Instance Method Details
#show ⇒ Object
3919 3920 3921 3922 3923 3924 |
# File 'ext/ae-editor/ae-editor.rb', line 3919 def show super self.focus @e_line.focus @e_line.selection_range(0,'end') end |