Class: Findview

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

Direct Known Subclasses

Find

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_button, #add_menu_button, #create_frame, #head_buttons, #menu_button

Constructor Details

#initialize(_parent) ⇒ Findview

Returns a new instance of Findview.



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
# File 'ext/ae-editor/ae-editor.rb', line 3485

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
  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'=> 220,'width'=> 300)
  
end

Instance Method Details

#showObject



3592
3593
3594
3595
3596
3597
# File 'ext/ae-editor/ae-editor.rb', line 3592

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