Code Monkey home page Code Monkey logo

cacao_framework's Introduction

What is this

This is my hacky attempt at making Cacao (Rust bindings to app kit for MacOS UIs) somewhat easy to use. It is currently in no way ready for general usage and likely will display nothing for you. I am blind and am using it in a personal project so have put no effort into making this accessible to the sighted for now, it uses default colours, backgrounds and visual effects accept for when they directly cause issues with Voiceover. I will update this readme with a more in depth description soon, especially as I make it more usable. Currently Labels, Buttons, Textfields, Select drop-downs and Custom components composed of these and other custom components are supported. List / table views are also partially supported to the extent that they can be used to display data. Currently views must be written as Raw virtual DOM nodes with an explicit key provided for each one. Again I repeat this framework is only intended to be used in personal projects for now and will almost certainly not work well unless you are using the Voiceover screen reader on MacOS. I do intend to make this generally usable in the future but for now have limited time. Contributions are very welcome though will only be accepted if they don't break how the framework works with voiceover.

Future direction:

Right now I am experiencing bugs with auto layout to the point that I am almost tempted to roll my own version using the old way of managing layouts so my main priority is making layouts work consistently. I will add Cacao components as I need to use them however most useful ones are implemented for simple UIs, though I'm hoping I can maybe integrate Scroll views to fix the above layout issues, but not really sure. I want to begin work on a view! macro similar to what Leptos and Yew have however have not had the time yet. I would also like to support children nodes directly but have not worked out how to make this work yet. I need to make list views work better so that they can keep track of internal state and button / change handlers. I would like to run components all the way up to the App level so all ui, window and event management is done through the framework without need to expose the ComponentWrapper struct and manually pass messages to it. I would like to also add more attributes to Cacao components such as colour, layout / sizing (like some form of simple css) and other visual / customisable bits and pieces. Any contributions towards these would be greatly appreciated as I am short on time so it will be a while until I can implement many of these.

Why does this exist

Because, as far as I know, its my only option. I needed a native Mac UI for an App I am making and the best options either didn't provide the APIs I needed and were Webview wrappers such as Tauri, or were not properly accessible such as Slint and GTK. The only available option was Cacao however I quickly found that doing anything complicated in it required a lot of manual imperative management of components which rapidly became buggy and unmaintainable. So I started writing this, a somewhat reactive ui framework that allowed me to right somewhat declaritive components. It is not pretty but it is much better then manually managing every aspect of changing components and working through RC<RefCell> every time I want to change some text after a button click. If anyone knows of an alternative project that works well with Voiceover on the Mac please please let me know.

cacao_framework's People

Contributors

isaac-leonard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.