MCPcopy Create free account
hub / github.com/KLayout/klayout / configure

Method configure

src/laybasic/laybasic/layEditorServiceBase.cc:295–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool
296EditorServiceBase::configure (const std::string &name, const std::string &value)
297{
298 bool needs_update = false;
299
300 if (name == cfg_tracking_cursor_color) {
301
302 tl::Color color;
303 lay::ColorConverter ().from_string (value, color);
304
305 if (color != m_cursor_color) {
306 m_cursor_color = color;
307 needs_update = true;
308 }
309
310 } else if (name == cfg_tracking_cursor_enabled) {
311
312 bool f = m_cursor_enabled;
313 tl::from_string (value, f);
314 if (f != m_cursor_enabled) {
315 m_cursor_enabled = f;
316 needs_update = true;
317 }
318
319 }
320
321 if (needs_update) {
322 for (std::vector<lay::ViewObject *>::iterator r = m_mouse_cursor_markers.begin (); r != m_mouse_cursor_markers.end (); ++r) {
323 (*r)->redraw ();
324 }
325 }
326
327 // NOTE: we don't take the value as other services may be interested too.
328 return false;
329}
330
331void
332EditorServiceBase::deactivated ()

Callers

nothing calls this directly

Calls 5

from_stringFunction · 0.50
from_stringMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
redrawMethod · 0.45

Tested by

no test coverage detected