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

cimgui-go Migration #628

Merged
merged 121 commits into from
Sep 22, 2023
Merged

cimgui-go Migration #628

merged 121 commits into from
Sep 22, 2023

Conversation

gucio321
Copy link
Collaborator

@gucio321 gucio321 commented Dec 10, 2022

Hi there!
Here is my proposal of a simple way to migrate from imgui-go to cimgui-go.
I'm using regular expressions within a simple shell script.
As I finish this, I'll try to keep it up to data and uptade to the latest cimgui-go (when available)

NOTE - this .sh script is really primitive - it is just a set of sed calls on various files in the project.

progress

  • bug in font atlas - causes strange panic
  • Single Window doesn't work anymore
  • giu theme is broken
  • textures does not work
    • plain image
    • image from file
    • image from URL
  • some examples don't compile
  • fix workflows
  • some MasterWindow methods dono't have their implementation in cimgui-go backend: export methods cimgui-go#169, backend: PollEvents and WaitForEvents cimgui-go#195
  • Font Atlas is broken (examples/multiplefonts) (panic when closing demo)
  • broken example examples/hugelist (segfault)
  • Implement stuff in Plot.go (many TODOs)
  • implement content scaling
conversion list list is currently outdated - I'm fixing all bugs manually now

the list above shows, which files (after running migrate.sh) does not have any build errors:

  • Alignment.go
  • build_windows.go
  • Canvas.go
  • ClickableWidgets.go (NOTE: need to fix ImageButton)
  • CodeEditor.go (disabled)
  • Context.go
  • Context_test.go
  • CSS.go
  • Direction.go
  • doc.go
  • EventHandler.go
  • Events.go (fix Keycode first)
  • examples
  • ExtraWidgets.go
  • Flags.go (NOTE fix ColorEditFlags)
  • FontAtlasProsessor.go (platform and renderer dependency; cannot resolve some reference)
  • ImageWidgets.go (platform dependency - probably will fix manually)
  • InputHandler.go
  • InputHandler_test.go
  • Keycode.go
  • Layout.go
  • Layout_test.go
  • ListClipper.go
  • Markdown.go (disabled)
  • MasterWindow.go
  • MemoryEditor.go (disabled)
  • Msgbox.go
  • Plot.go
  • Popups.go
  • ProgressIndicator.go
  • SliderWidgets.go
  • SplitLayout.go
  • StackWidget.go
  • Style.go
  • StyleIDs.go
  • StyleIDs_string2enum.go
  • StyleIDs_string.go
  • StyleSetter.go
  • TableWidgets.go
  • TextureFilters.go (I'm not actually sure what these constants reffers to - no typed)
  • Texture.go (it's not really clear to me but I suppose giu wraps a wrong type atm - cimgui.ImGuiTextureID vs cimgui.Texture)
  • TextWidgets.go
  • Utils.go
  • Utils_test.go
  • Widgets.go (problemm with ColorEditWidget - api has changed a bit; also see TODOs in migration.sh)
  • Window.go (problem with platform stuff)

* files tagged with (disabled) are commented-out because they are not supported by cimgui-go

@AllenDang
Copy link
Owner

Great progress!

@gucio321
Copy link
Collaborator Author

UPDATE

Now I'm working on implementation of Markdown widget (see cimmarkdown)

@Chillance
Copy link

I had no idea this was such a huge effort. And it seems to keep add things... Is there any way some things could be fixes after merging this?

@gucio321
Copy link
Collaborator Author

Yes. I can merge the current state to master (it mostly works) and keep adding missing things

  • code editor
  • markdown editor
  • some plots

@AllenDang
Copy link
Owner

Yes. I can merge the current state to master (it mostly works) and keep adding missing things

  • code editor
  • markdown editor
  • some plots

Thanks so much for your effort, I think we should do the migration now, with a new release, and add more fixes later.

@gucio321
Copy link
Collaborator Author

@AllenDang I'm going to perform the following actions:

  • create release from current master
  • create a clone of matter and call it e.g. imgui-go
  • merge this to master

@gucio321 gucio321 marked this pull request as ready for review September 22, 2023 12:26
@gucio321 gucio321 merged commit fcf5e15 into AllenDang:master Sep 22, 2023
@gucio321 gucio321 deleted the migration branch September 22, 2023 12:44
@Chillance
Copy link

Wow! This is big deal! Thank you all for your efforts!

@gucio321
Copy link
Collaborator Author

finally after.... 9.5 months 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants