git.lucas.co / cce-text-editor
text editor
git clone https://git.lucas.co/cce-text-editor.git

commit912b07413717e7a04fcb9a16ba74d4e05f35fbed
parent76b9e87730
authorLucas Galante <[email protected]>
date2026-06-24 10:25
Implement ui_context for Application to support default draggable window

 src/main.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.rs b/src/main.rs
index 9c1be1a..145b6b5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -225,6 +225,10 @@ impl TextEditorApp {
 impl Application for TextEditorApp {
     type Message = AppMessage;
 
+    fn ui_context(&self) -> Option<&cce_ui::context::UiContext> {
+        Some(&self.ui_context)
+    }
+
     fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
         let btn_new = Button::new(10.0, 8.0, 70.0, 26.0).with_label("New");
         let btn_open = Button::new(90.0, 8.0, 70.0, 26.0).with_label("Open");