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.
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 |
# File 'ext/ae-editor/ae-editor.rb', line 700 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, 'width' => 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.
699 700 701 |
# File 'ext/ae-editor/ae-editor.rb', line 699 def sync @sync end |
Instance Method Details
#is_sync_on? ⇒ Boolean
736 737 738 |
# File 'ext/ae-editor/ae-editor.rb', line 736 def is_sync_on? @sync end |
#sync_off ⇒ Object
732 733 734 |
# File 'ext/ae-editor/ae-editor.rb', line 732 def sync_off @sync = false end |
#sync_on ⇒ Object
724 725 726 727 728 729 730 |
# File 'ext/ae-editor/ae-editor.rb', line 724 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 |