Comments (2)
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.
Thanks! Sounds easy :)
I can try to implement this in main branch, if you want.
from turbobadger.
Related Issues (20)
- Glyph collision in hashmap
- Korean input not support under Windows HOT 5
- Window without System Window HOT 2
- Fonts switch HOT 2
- Unicode language Input with Extra Enter HOT 1
- TBEditField rendering performance HOT 7
- Remove scroll bar of TBEditField HOT 2
- The Relationship with AtomicEngine's Turbobadger HOT 2
- TBImageManager improvements
- Need update to new version of third lib stb_image
- Suggestion on how to best implement drag and drop between item source views.
- Missing TBMover factory
- how to run the tests ? HOT 1
- TBLayout: one fixed item and one item take remaining space HOT 1
- How should I use TBWidgetsReader to set up a widget?
- gcc9 warning
- Nice project. But it was abandoned? HOT 6
- It works on emscripten/wasm? HOT 1
- OnInflateChild question HOT 4
- Dawing custom shapes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbobadger.