{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/219","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/219/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/219/events","html_url":"https://github.com/ocornut/imgui/issues/219","id":75355918,"number":219,"title":"Cleanup","user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ocornut/imgui/labels/in%20progress","name":"in progress","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-05-11T21:00:30Z","updated_at":"2015-07-19T20:15:47Z","closed_at":null,"body":"I'd like to have a pass of cleanup to\r\n- reduce lines of code and/or source code size\r\n- maybe split into multiple files\r\n- generally make the code more accessible\r\n\r\nNo specific requirement but generally anything that makes the more simpler helps.\r\n\r\nSome metrics from the WIP menus branch:\r\n\r\nimgui.h - 1066 LoC\r\nimgui.cpp - 11865 LoC, including:\r\n\r\n395 lines: comments, docs\r\n154 lines: includes, forward declarations\r\n481 lines: helpers\r\n7074 lines: main code\r\n395 lines: ImDrawList\r\n1159 lines : ImFontAtlas, ImFont, text rendering, UTF-8 routines\r\n308 lines : platform dependent helpers\r\n200 lines : ShowUserGuide, ShowStyleEditor\r\n1608 lines : ShowTestWindow + micro sample apps\r\n336 : font data + decompressor\r\n\r\nThis thread is mainly for me noting ideas but if you have feedback please let me know. Personally I don't have a problem with imgui.cpp being so big. But it is important to factor in other people impression (people who may want to work on improving imgui) and also the \"portability\" of it.. I would prefer to aim to keep the code a little smaller of course, and will work on that.  Splitting into more files isn't out of question either."},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/122700461","html_url":"https://github.com/ocornut/imgui/issues/219#issuecomment-122700461","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/219","id":122700461,"user":{"login":"emoon","id":350822,"avatar_url":"https://avatars.githubusercontent.com/u/350822?v=3","gravatar_id":"","url":"https://api.github.com/users/emoon","html_url":"https://github.com/emoon","followers_url":"https://api.github.com/users/emoon/followers","following_url":"https://api.github.com/users/emoon/following{/other_user}","gists_url":"https://api.github.com/users/emoon/gists{/gist_id}","starred_url":"https://api.github.com/users/emoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emoon/subscriptions","organizations_url":"https://api.github.com/users/emoon/orgs","repos_url":"https://api.github.com/users/emoon/repos","events_url":"https://api.github.com/users/emoon/events{/privacy}","received_events_url":"https://api.github.com/users/emoon/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T20:15:47Z","updated_at":"2015-07-19T20:15:47Z","body":"I like having an imgui_internal.h file because then implementation details will not 'leak' into the main imgui.h file (or ar less likely to do so) I vote (A)"}}