dpjudas / uicore Goto Github PK
View Code? Open in Web Editor NEWUser interface library for C++ applications
License: Other
User interface library for C++ applications
License: Other
I have been experimenting in optimisation StyleCascade.
In my opinion, this is not required at the moment, unless like me, you have over 200 views which is unusual.
Simplified explanation:
I changed the StyleCascade property names to contain a hash value.
This has a nice side effect when obtaining properties that have index values: we can incorporate the index directly into the hash without requiring using the "integer to string" function overhead.
In my application, FPS increased from 138 to 192.
In addition, if I force the background renderer to use canvas.fill_rectangle() instead of using path draw when an exact rectangle is drawn, then FPS increases to 273
In https://github.com/dpjudas/UICore/blob/master/Sources/UICore/UI/View/view.cpp
In Function: void ViewImpl::render(View *self, const CanvasPtr &canvas)
At Line 1061:
contains:
Rect border_box = view->geometry().border_box();
Is this a typo, should we use Rectf instead of rect ?
Rectf border_box = view->geometry().border_box();
I am trying to implement a custom view that has a keyboard accelerator. So when 'A' is pressed, this event is procesed even though the view does not have focus.
There appears to be 3 options:
I could hook directly into the display window slot to do this, however the view may be hidden or disabled (i.e. not part of the view tree).
Fire off the event on the root view in the ViewTree to cascade. However View::dispatch_event() dispatches messages at the target (and parent), not the child
Add a keyboard event slot on the ViewTree. The problem with this is when should the custom view connect the slot or disconnect the slot. i.e. If the View is unlinked from the ViewTree, the slot shouldn't be called. Then again, does all events have this same problem?
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.