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

Method configure

src/laybasic/laybasic/layMouseTracker.cc:47–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47bool
48MouseTracker::configure (const std::string &name, const std::string &value)
49{
50 if (name == cfg_crosshair_cursor_color) {
51
52 tl::Color color;
53 lay::ColorConverter ().from_string (value, color);
54
55 // Change the color
56 if (lay::test_and_set (m_cursor_color, color)) {
57 mp_markers.clear ();
58 }
59
60 } else if (name == cfg_crosshair_cursor_line_style) {
61
62 int dp = 0;
63 tl::from_string (value, dp);
64
65 // Change the vertex_size
66 if (lay::test_and_set (m_cursor_line_style, dp)) {
67 mp_markers.clear ();
68 }
69
70 } else if (name == cfg_crosshair_cursor_enabled) {
71
72 bool f = m_cursor_enabled;
73 tl::from_string (value, f);
74 if (f != m_cursor_enabled) {
75 m_cursor_enabled = f;
76 mp_markers.clear ();
77 }
78
79 }
80
81 return false; // not taken
82}
83
84bool
85MouseTracker::mouse_move_event (const db::DPoint &p, unsigned int /*buttons*/, bool prio)

Callers

nothing calls this directly

Calls 4

test_and_setFunction · 0.85
from_stringFunction · 0.50
from_stringMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected