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, #hide_if_visible, #on_arcadia, #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.



5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
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
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
# File 'ext/ae-editor/ae-editor.rb', line 5829

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'
    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))})
  @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'
    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))})
  @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

#showObject



5946
5947
5948
5949
5950
5951
5952
# File 'ext/ae-editor/ae-editor.rb', line 5946

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