Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove namespace Core, Debugger, Controls #58

Closed
mikke89 opened this issue Oct 14, 2019 · 7 comments
Closed

Remove namespace Core, Debugger, Controls #58

mikke89 opened this issue Oct 14, 2019 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@mikke89
Copy link
Owner

mikke89 commented Oct 14, 2019

Usage of RmlUi would be a lot simpler if we removed the sub-namespaces. I don't feel like they are really necessary.

Thus,

Rml::Core::Element* element;
Rml::Controls::ElementFormControl* control_element;
Rml::Core::Log::Message(Rml::Core::Log::LT_WARNING, "...");

would become

Rml::Element* element;
Rml::ElementFormControl* control_element;
Rml::Log::Message(Rml::Log::LT_WARNING, "...");

We may need to keep the namespaces for some functions, so this stays the same:

Rml::Core::Initialise();
Rml::Controls::Initialise();

or, maybe remove it for core?

Rml::Initialise();
Rml::Controls::Initialise();

I haven't tried it to see if there are any name conflicts, but worst case is we need to do some renaming.

Thoughts?

@viciious
Copy link
Contributor

It took me 40+ commits to move from libRocket to RmlUi, I'd rather prefer it to remain stable for a while :P

@mikke89
Copy link
Owner Author

mikke89 commented Oct 14, 2019

Yeah, you have a point there. Okay, I'm putting this off for some time. Maybe for RmlUi 4.0 ;)

@mikke89 mikke89 added this to the 4.0 milestone Oct 15, 2019
@mikke89 mikke89 added the enhancement New feature or request label Oct 15, 2019
@uniquejack
Copy link

I do agree with @viciious , it's not easy to keep up with the huge amount of commits, but at the same time, I think the Controls namespace is useless. When one wants to use RmlUi they want to use the whole library, controls included. There is no need to do multiple Initialisations (I almost forgot I had to recently). The only module that doesn't require to be initialised is the Debugger, so probably the only namespace I suggest to leave unchanged is that one.

@viciious
Copy link
Contributor

Do we even need the separate Controls lib at all? It has always bugged me that I need to compile two libs to get the most basic things working.

@uniquejack
Copy link

Yeah, an unique library would be optimal, I always compile them together when I setup my Visual Studio Projects. The only problem is that there are multiple .cpp files with the same name, that's probably the reason why they got separated in the first place.

@mikke89
Copy link
Owner Author

mikke89 commented Mar 12, 2020

Yeah, integrating the Controls library into Core is very tempting, I don't see many people having the need for the library without it. On the other hand, it helps a bit with navigating the code, and also forcing a well defined separation of principles (ie. Core not depending on Control elements).

I think removing the Core and Controls namespaces would go a long way in making it easier and more comfortable to use the library.

@mikke89
Copy link
Owner Author

mikke89 commented Jul 3, 2020

See e9844e3. I decided to merge the Controls library. Let me know if you have any comments before I merge into master.

Se the detailed changes here: https://github.com/mikke89/RmlUi/blob/merge_controls/changelog.md#restructuring-rmlui.

@mikke89 mikke89 closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants