Skip to content

Naming conventions? #20

@eliasdaler

Description

@eliasdaler

Hello, I have a proposal.
The readme says:

For functions, 'Im/ImGui/ig' is trimmed. 'GetCursorPos' is renamed to 'GetDrawCursor', same with "SetCursor...".

Maybe we should do the same for various enums/constants/flags and even types as well? For example:

cimgui.ImGuiKey_Tab // before
cimgui.Key_Tab // after
cimgui.KeyTab // even better!
cimgui.ImGuiWindowFlags_NoCollapse // before
cimgui.WindowFlags_NoCollapse // after
cimgui.WindowFlagsNoCollapse // even better!
cimgui.ImVec2 // before
cimgui.Vec2 // after

and so on... If you agree, I can do the work and later submit the PR.

P.S. And another question - why is the package named cimgui, not imgui? I feel like naming it "imgui" will make end-user experience better, for example you could call imgui.Text instead of cimgui.Text and so on. I know that you can import cimgui-go as "imgui" and do the same, but it's better to be convenient for user by default, imo.

Also see imgui-rs as the example. It uses cimgui as well, but doesn't call itself "imgui", because after all the end user is more interested in "imgui" part more than "cimgui" part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions