Giter Site home page Giter Site logo

SpVoice interface. about native-windows-gui HOT 4 CLOSED

gabdube avatar gabdube commented on August 17, 2024
SpVoice interface.

from native-windows-gui.

Comments (4)

gabdube avatar gabdube commented on August 17, 2024

Sorry for the late response, I didn't see your issue until now.

As of the beta (the v2 branch), the only way to catch custom events is too create a custom control and handle the events in the base window proc. I really want add the option to easily wrap new system events,
but I can't decide the "best" way to do it.

from native-windows-gui.

Eh2406 avatar Eh2406 commented on August 17, 2024

How do I create a custom control? Is it worth figuring out how for v2 with v3 on the way?

from native-windows-gui.

gabdube avatar gabdube commented on August 17, 2024

I've just added an example on v2: https://github.com/gabdube/native-windows-gui/blob/v2/examples/custom.rs

There won't be a v3. I had to rewrite the library once because I couldn't implement many features and a few controls (such as timer and menus). This time I made sure that will be able to pack all the fancy features I want to include without any major breaking change.

Edit: it might be worth it to mention that in v2, the only difference between a custom control and a built-in control is some hardcoded events used internally by NWG (that might be removed)

from native-windows-gui.

gabdube avatar gabdube commented on August 17, 2024

v2 is now on master and it will be on cargo soon enough.

Also, there is now Event::Raw implemented for most controls. Event::Raw will catch every single Windows message (that are not reserved by NWG) and pass the MSG, WPARAM, LPARAM to the callbacks. Until custom events are implemented, this will be the "best" way.

Closing this...

from native-windows-gui.

Related Issues (20)

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.