Class: Findview
- Inherits:
-
TkFloatTitledFrame
- Object
- TkFrame
- TkBaseTitledFrame
- TkFloatTitledFrame
- Findview
- Defined in:
- ext/ae-editor/ae-editor.rb
Direct Known Subclasses
Constant Summary
Constants included from TkResizable
TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH
Instance Attribute Summary
Attributes inherited from TkBaseTitledFrame
Instance Method Summary collapse
-
#initialize(_parent) ⇒ Findview
constructor
A new instance of Findview.
- #show ⇒ Object
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) ⇒ Findview
Returns a new instance of Findview.
5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 |
# File 'ext/ae-editor/ae-editor.rb', line 5523 def initialize(_parent) super(_parent) #stop_resizing y0 = 10 d = 23 TkLabel.new(self.frame, Arcadia.style('label')){ text Arcadia.text('ext.editor.search.label.find_what') place('x' => 8,'y' => y0,'height' => 19) } y0 = y0 + d @e_what = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){ editable true justify 'left' #relief 'ridge' autocomplete 'true' 'tab' takefocus 'true' #pack('padx'=>10, 'fill'=>'x') place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19) } @e_what_entry = TkWinfo.children(@e_what)[0] #@e_what_entry.bind_append("1",proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>@e_what_entry))}) @e_what_entry.extend(TkInputThrow) y0 = y0 + d TkLabel.new(self.frame, Arcadia.style('label')){ text Arcadia.text('ext.editor.search.label.replace_with') place('x' => 8,'y' => y0,'height' => 19) } y0 = y0 + d @e_with = Tk::BWidget::ComboBox.new(self.frame, Arcadia.style('combobox')){ editable true justify 'left' autocomplete 'true' 'tab' takefocus 'true' #pack('padx'=>10, 'fill'=>'x') place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19) } @e_with_entry = TkWinfo.children(@e_with)[0] #@e_with_entry.bind_append("1",proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>@e_with_entry))}) @e_with_entry.extend(TkInputThrow) y0 = y0 + d @cb_reg = TkCheckButton.new(self.frame, Arcadia.style('checkbox')){|_cb_reg| text Arcadia.text('ext.editor.search.label.use_regexp') justify 'left' #relief 'flat' #pack('side'=>'left', 'anchor'=>'e') place('x' => 8,'y' => y0,'height' => 22) } y0 = y0 + d @cb_back = TkCheckButton.new(self.frame, Arcadia.style('checkbox')){|_cb_reg| text Arcadia.text('ext.editor.search.label.search_back') justify 'left' #relief 'flat' #pack('side'=>'left', 'anchor'=>'e') place('x' => 8,'y' => y0,'height' => 22) } y0 = y0 + d @cb_ignore_case = TkCheckButton.new(self.frame, Arcadia.style('checkbox')){|_cb_reg| text Arcadia.text('ext.editor.search.label.ignore_case') justify 'left' #relief 'flat' #pack('side'=>'left', 'anchor'=>'e') place('x' => 8,'y' => y0,'height' => 22) } y0 = y0 + d y0 = y0 + d y0 = y0 + d @buttons_frame = TkFrame.new(self.frame, Arcadia.style('panel')).pack('fill'=>'x', 'side'=>'bottom') @b_replace_all = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go| state 'disabled' default 'disabled' text Arcadia.text('ext.editor.search.label.replace_all') #overrelief 'raised' justify 'center' #width 15 pack('side'=>'right','ipadx'=>5, 'padx'=>5) #place('width' => 50,'x' => 0,'y' => y0,'height' => 23,'bordermode' => 'inside') } @b_replace = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go| state 'disabled' default 'disabled' text Arcadia.text('ext.editor.search.label.replace') #overrelief 'raised' justify 'center' #width 15 pack('side'=>'right','ipadx'=>5, 'padx'=>5) #place('width' => 50,'x' => 0,'y' => y0,'height' => 23,'bordermode' => 'inside') } @b_go = TkButton.new(@buttons_frame, Arcadia.style('button')){|_b_go| compound 'none' default 'disabled' text Arcadia.text('ext.editor.search.label.find_next') #background '#ffffff' #image TkPhotoImage.new('dat' => FIND_GIF) #overrelief 'raised' justify 'center' #relief 'ridge' #width 15 pack('side'=>'right','ipadx'=>5, 'padx'=>5) #place('width' => 50,'x' => 0,'y' => y0,'height' => 23,'bordermode' => 'inside') } #place('x'=>0,'y'=>0,'relheight'=> 1,'relwidth'=> 1) place('x'=>100,'y'=>100,'height'=> 240,'width'=> 300) end |
Instance Method Details
#show ⇒ Object
5640 5641 5642 5643 5644 5645 5646 |
# File 'ext/ae-editor/ae-editor.rb', line 5640 def show super self.focus @e_what.focus @e_what_entry.select_throw @e_what_entry.selection_range(0,'end') end |