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, #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.
4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 |
# File 'ext/ae-editor/ae-editor.rb', line 4384 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' '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' '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
#show ⇒ Object
4500 4501 4502 4503 4504 4505 |
# File 'ext/ae-editor/ae-editor.rb', line 4500 def show super self.focus @e_what.focus @e_what_entry.selection_range(0,'end') end |