equal
deleted
inserted
replaced
34 val pretty_text_area = new Pretty_Text_Area(view) |
34 val pretty_text_area = new Pretty_Text_Area(view) |
35 set_content(pretty_text_area) |
35 set_content(pretty_text_area) |
36 |
36 |
37 override def detach_operation = pretty_text_area.detach_operation |
37 override def detach_operation = pretty_text_area.detach_operation |
38 |
38 |
39 |
|
40 private val zoom = new Font_Info.Zoom_Box { def changed = handle_resize() } |
|
41 |
39 |
42 private def handle_resize() |
40 private def handle_resize() |
43 { |
41 { |
44 GUI_Thread.require {} |
42 GUI_Thread.require {} |
45 |
43 |
81 current_results = new_results |
79 current_results = new_results |
82 current_output = new_output |
80 current_output = new_output |
83 } |
81 } |
84 |
82 |
85 |
83 |
|
84 /* controls */ |
|
85 |
|
86 private val auto_update = new CheckBox("Auto update") { |
|
87 tooltip = "Indicate automatic update following cursor movement" |
|
88 reactions += { |
|
89 case ButtonClicked(_) => do_update = this.selected; handle_update(do_update, None) } |
|
90 selected = do_update |
|
91 } |
|
92 |
|
93 private val update = new Button("Update") { |
|
94 tooltip = "Update display according to the command at cursor position" |
|
95 reactions += { case ButtonClicked(_) => handle_update(true, None) } |
|
96 } |
|
97 |
|
98 private val zoom = new Font_Info.Zoom_Box { def changed = handle_resize() } |
|
99 |
|
100 private val controls = |
|
101 new Wrap_Panel(Wrap_Panel.Alignment.Right)(auto_update, update, |
|
102 pretty_text_area.search_label, pretty_text_area.search_field, zoom) |
|
103 add(controls.peer, BorderLayout.NORTH) |
|
104 |
|
105 |
86 /* main */ |
106 /* main */ |
87 |
107 |
88 private val main = |
108 private val main = |
89 Session.Consumer[Any](getClass.getName) { |
109 Session.Consumer[Any](getClass.getName) { |
90 case _: Session.Global_Options => |
110 case _: Session.Global_Options => |
122 |
142 |
123 addComponentListener(new ComponentAdapter { |
143 addComponentListener(new ComponentAdapter { |
124 override def componentResized(e: ComponentEvent) { delay_resize.invoke() } |
144 override def componentResized(e: ComponentEvent) { delay_resize.invoke() } |
125 override def componentShown(e: ComponentEvent) { delay_resize.invoke() } |
145 override def componentShown(e: ComponentEvent) { delay_resize.invoke() } |
126 }) |
146 }) |
127 |
|
128 |
|
129 /* controls */ |
|
130 |
|
131 private val auto_update = new CheckBox("Auto update") { |
|
132 tooltip = "Indicate automatic update following cursor movement" |
|
133 reactions += { |
|
134 case ButtonClicked(_) => do_update = this.selected; handle_update(do_update, None) } |
|
135 selected = do_update |
|
136 } |
|
137 |
|
138 private val update = new Button("Update") { |
|
139 tooltip = "Update display according to the command at cursor position" |
|
140 reactions += { case ButtonClicked(_) => handle_update(true, None) } |
|
141 } |
|
142 |
|
143 private val controls = |
|
144 new Wrap_Panel(Wrap_Panel.Alignment.Right)(auto_update, update, |
|
145 pretty_text_area.search_label, pretty_text_area.search_field, zoom) |
|
146 add(controls.peer, BorderLayout.NORTH) |
|
147 } |
147 } |