Class: Findview

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

Direct Known Subclasses

Finder

Constant Summary

Constants included from TkResizable

TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH

Instance Attribute Summary

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

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_fixed_button, #add_fixed_menu_button, #add_fixed_sep, #create_frame, #head_buttons, #menu_button, #visible?

Constructor Details

#initialize(_parent) ⇒ Findview

Returns a new instance of Findview.



4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
# File 'ext/ae-editor/ae-editor.rb', line 4539

def initialize(_parent)
  super(_parent)
  #stop_resizing
  y0 = 10
  d = 23    
  TkLabel.new(self.frame, Arcadia.style('label')){
 	  text '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'
    expand '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))})

  y0 = y0 + d
  TkLabel.new(self.frame, Arcadia.style('label')){
 	  text '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'
    expand '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))})
  
  y0 = y0 + d
  @cb_reg = TkCheckButton.new(self.frame, Arcadia.style('checkbox')){|_cb_reg|
    text  'Use Regular Expression'
    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  'Search backwards'
    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  '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  '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  '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  '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

#showObject



4655
4656
4657
4658
4659
4660
# File 'ext/ae-editor/ae-editor.rb', line 4655

def show
  super
  self.focus
  @e_what.focus
  @e_what_entry.selection_range(0,'end')
end