cschreib / lxgui Goto Github PK
View Code? Open in Web Editor NEWPortable, real time, modular and data-driven GUI C++ library.
Home Page: https://cschreib.github.io/lxgui
License: MIT License
Portable, real time, modular and data-driven GUI C++ library.
Home Page: https://cschreib.github.io/lxgui
License: MIT License
Now that we no longer support C++03, we can mark as many classes as possible as "movable" to improve performance. Also not forgetting noexcept
.
SDL is a fairly standard and widely supported rendering/input backend. Adding an SDL backend to lxgui would increase the number of projects that could use the library.
Differences with SFML:
See uiobject::update_dimensions_()
.
Currently, the Lua API of lxgui is undocumented. It follows closely the original WoW API, but:
Acceptance criteria:
Once this is done, getting the API fully documented can be a background task.
Sometimes, ScrollFrame rendered by SFML display garbage data, as if the internal texture size was not set correctly. This can be seen immediately when the test executable is run, by looking at the left panel of the file explorer.
In such cases, the child has an implicit dependency on its parent, which uiobject::depends_on
must account for
Errors coming from sol use default format. We can set our own format when calling the Lua script.
edit_box::move_carret_vertically_()
and edit_box::get_letter_id_at_()
are not implemented for multiline edit box.
Make conversion to c++17 easier later.
In November 2020, Travis CI stopped providing free CI services to open source projects. lxgui burned through the free credit in an instant, and it is no longer possible to get builds from Travis CI unless I move to a paid plan. At $70 a month, that's not going to happen.
A replacement CI service must be found. GitHub actions are probably the best. Acceptance criteria:
Currently, the test project is buried deep in the folder hierarchy and relies on being part of the CMake build of the library. This is not practical for people who just want to explore the test to see what the library looks like. It is also not practical for people willing to integrate lxgui into their project, since it doesn't show how to use the FindLXGUI script etc.
Currently the font rendered by SFML or SDL looks different and of slightly different size than that rendered by the OpenGL backend. This leads to inconsistencies in the GUI appearance depending on which backend is used.
Currently gui::sprite
could be derived in one of the renderer implementations. This has not proved necessary, so the feature should be removed for better performance.
Most of the time currently they are caught by non-const ref.
ConcTable
SendString
EmptyString
This would :
on...
handlerstd::function
However:
utils::refptr
-> std::shared_ptr
utils::wptr
(probably unused?) -> std::weak_ptr
If a class is being destroyed, dynamic_cast() can return a null pointer if the derived class destructor has already been called. This can cause issues when the result of dynamic_cast is used to determine the type of the object being processed (i.e., to remove it from a special list).
Thread 1 "lxgui-test" received signal SIGSEGV, Segmentation fault.
0x000055555557bffe in gui::gl::font::get_character_kerning (this=0x555555dd98c0, uiChar1=108 U'l',
uiChar2=4294967235 U'\xffffffc3') at /home/cschreib/programming/lxgui/gui/impl/gui/gl/src/gui_gl_font.cpp:219
219 return lCharacterList_[uiChar1].lKerningInfo[uiChar2].x;
For performance and simplicity
Places where this can be avoided:
get_parent()
method to Lua glues that returns the right type already instead of uiobject*
copy_from()
: the inheritance code already checks using is_object_type()
, so can use static_cast
sol is much easier to use for the end user. We should at least make this the main user-facing interface with Lua now, and slowly deprecate/replace luapp internally after v2.0.
Now that the library no longer supports C++03, we should be able to get rid of the foreach
macro and use language range-based for loop whenever we can.
This creates fewer chances for circular dependencies
Now that we no longer support C++03, we can get rid of the conditional support for "new" C++ features, such as nullptr
, default template parameters, etc.
This saves a bunch of dynamic casts all around. This holds for get_parent() and get_renderer().
This is un-necessary.
Currently the library has 5 different namespaces with very generic names (input
, utils
, etc.). This will not play nice with other code bases using lxgui, so we should wrap all namespaces into a common namespace, such as lxgui
.
<!-- ... -->
are not recognized<-- ... -->
does not always work correctly?<!node> </node>
, keep this?Given that the GUI and Input can now be provided by SFML, it should be possible to add a wrapper around gui::manager
to initialize it with a full SFML implementation, which would make it easier on the user.
This is probably because of the use of mouse/keyboard state rather than events... Could mean refactoring the whole input class.
Some content of manager::remove_uiobject()
require knowing if the object is a frame. This content should be put in a separate function remove_frame()
which is called in the frame
destructor.
Layered regions should not be allowed to be root, so let's enforce this with the type system. Remove the public function add_root_uiobject()
and merge this functionality into create_frame()
(the overload that takes > 1 parameter) to be renamed create_root_frame()
.
unique_ptr
ideally
For performance and memory footprint
gui::manager::get_lua()
should return the sol wrapper, and internal usage of this should switch to sol
gui::uiobject::push_on_lua()
also
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.