GithubHelp home page GithubHelp logo

Comments (2)

fruxo avatar fruxo commented on June 5, 2024

I don't think you'll need onenter/onexit events to implement tooltips.

This is the plan i've had to implement tooltip support (i still haven't gotten around to do it):

TBTooltipManager:
-Register itself as an global event listener (TBWidgetListener::AddGlobalListener)
-Look at TBWidget::hovered_widget from EVENT_TYPE_POINTER_MOVE to update the show timeout or hide.
-Deal with the show timeout using PostMessageDelayed.

TBWidget should get something like this:
virtual const char *GetContentDescriptionString() { return g_tb_lng->GetString(m_content_desc_id); }
All widgets may then optionally specify an language string id that will be fetched by the tooltip manager when showing the tooltip (and then updated every X ms). An custom widget may even override and return something generated programmatically (like "40% done").

I thought about making an TBPopupBubble subclassing TBPopupWindow (or just extending it) to handle edge arrow pointing at the target widget, and then use that for tooltips and stuff. But that is much less prioritized.

-Extra wishlist:
Long-press shows tooltips on Android, so it would be great if TBTooltipManager supported that for events that has the touch flag set.

from turbobadger.

swap15 avatar swap15 commented on June 5, 2024

Thanks! Sounds easy :)
I can try to implement this in main branch, if you want.

from turbobadger.

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.