Class: AgEditorOutlineToolbar
- Inherits:
-
Object
- Object
- AgEditorOutlineToolbar
- Defined in:
- ext/ae-editor/ae-editor.rb
Instance Attribute Summary collapse
-
#sync ⇒ Object
Returns the value of attribute sync.
Instance Method Summary collapse
-
#initialize(_frame, _controller) ⇒ AgEditorOutlineToolbar
constructor
A new instance of AgEditorOutlineToolbar.
- #is_sync_on? ⇒ Boolean
- #sync_off ⇒ Object
- #sync_on ⇒ Object
Constructor Details
#initialize(_frame, _controller) ⇒ AgEditorOutlineToolbar
Returns a new instance of AgEditorOutlineToolbar.
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'ext/ae-editor/ae-editor.rb', line 630 def initialize(_frame, _controller) @controller = _controller @cb_sync = TkCheckButton.new(_frame, Arcadia.style('checkbox')){ text 'Sync' justify 'left' indicatoron 0 offrelief 'raised' image TkPhotoImage.new('dat' => SYNCICON20_GIF) place('x' => 0,'y' => 0,'height' => 26) } Tk::BWidget::DynamicHelp::add(@cb_sync, 'text'=>'Link open editors with content in the Navigator') do_check = proc { if @cb_sync.cget('onvalue')==@cb_sync.cget('variable').value.to_i sync_on else sync_off end } @sync = false @cb_sync.command(do_check) end |
Instance Attribute Details
#sync ⇒ Object
Returns the value of attribute sync.
629 630 631 |
# File 'ext/ae-editor/ae-editor.rb', line 629 def sync @sync end |
Instance Method Details
#is_sync_on? ⇒ Boolean
666 667 668 |
# File 'ext/ae-editor/ae-editor.rb', line 666 def is_sync_on? @sync end |
#sync_off ⇒ Object
662 663 664 |
# File 'ext/ae-editor/ae-editor.rb', line 662 def sync_off @sync = false end |
#sync_on ⇒ Object
654 655 656 657 658 659 660 |
# File 'ext/ae-editor/ae-editor.rb', line 654 def sync_on @sync = true e = @controller.raised if e e.outline.select_without_event(e.outline.last_row) if e.outline.last_row end end |