MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / focused

Method focused

src/engine.rs:5768–5772  ·  view source on GitHub ↗

Returns true if the currently open element has focus.

(&self)

Source from the content-addressed store, hash-verified

5766
5767 /// Returns true if the currently open element has focus.
5768 pub fn focused(&self) -> bool {
5769 let open_idx = self.get_open_layout_element();
5770 let elem_id = self.layout_elements[open_idx].id;
5771 self.focused_element_id == elem_id && elem_id != 0
5772 }
5773
5774 /// Returns the currently focused element's ID, or None.
5775 pub fn focused_element(&self) -> Option<Id> {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected