{"action":"created","comment":{"url":"https://api.github.com/repos/swistakm/pyimgui/pulls/comments/104427766","pull_request_review_id":25255436,"id":104427766,"diff_hunk":"@@ -1935,6 +1935,220 @@ def menu_item(\n     return clicked, inout_selected\n \n \n+def open_popup(str name):\n+    \"\"\"Open a popup window.\n+\n+    Marks a popup window as open. Popups are closed when user click outside,\n+    or activate a pressable item, or :func:`close_current_popup()` is\n+    called within a :func:`begin_popup()`/:func:`end_popup()` block.\n+    Popup identifiers are relative to the current ID-stack\n+    (so :func:`open_popup` and :func:`begin_popup` needs to be at\n+    the same level).\n+\n+    .. visual-example::\n+        :title: Simple popup window\n+        :height: 100\n+        :width: 220\n+        :auto_layout:\n+\n+        imgui.begin(\"Example: popup window\")\n+        show_popup = imgui.button(\"Open\")\n+        closable = True\n+        if show_popup:\n+            imgui.open_popup(\"Popup Title\")\n+        popup_opened, popup_visible = imgui.begin_popup_modal(\n+            \"Popup Title\",\n+            closable\n+        )\n+        if popup_opened:\n+            imgui.text(\"Popup contents\")\n+            imgui.end_popup()\n+        imgui.end()\n+\n+    Args:\n+        name (str): label of the modal window.\n+\n+    .. wraps::\n+        void OpenPopup(\n+            const char* str_id\n+        )\n+    \"\"\"\n+    cimgui.OpenPopup(_bytes(name))\n+\n+\n+def begin_popup(str name):\n+    \"\"\"Open a popup window.\n+\n+    Returns ``True`` if the popup is open and you can start outputting\n+    content to it. Only call :func:`end_popup()` if :func:`begin_popup()`\n+    returned true.\n+\n+    For practical example how to use this function, please see documentation\n+    of :func:`open_popup`.\n+\n+    Args:\n+        name (str): label of the modal window.\n+\n+    Returns:\n+        opened (bool): True if popup is opened.\n+\n+    .. wraps::\n+        bool BeginPopup(\n+            const char* str_id\n+        )\n+    \"\"\"\n+    return cimgui.OpenPopup(_bytes(name))\n+\n+\n+def begin_popup_modal(str title, closable=None, cimgui.ImGuiWindowFlags flags=0):\n+    \"\"\"Begin pouring popup contents.\n+\n+    For practical example how to use this function, please see documentation\n+    of :func:`open_popup`.\n+\n+    Args:\n+        title (str): label of the modal window.\n+        closable (bool): define if popup is closable with X.\n+        flags: Window flags. See:\n+            :ref:`list of available flags <window-flag-options>`.\n+\n+    Returns:\n+        tuple: ``(opened, visible)`` tuple of bools.\n+        opened can be False when the popup is completely clipped\n+        (e.g. zero size display).\n+\n+    .. wraps::\n+        bool BeginPopupModal(\n+            const char* name,\n+            bool* p_open = NULL,\n+            ImGuiWindowFlags extra_flags = 0\n+        )\n+    \"\"\"\n+    cdef cimgui.bool inout_opened = closable\n+\n+    return cimgui.BeginPopupModal(\n+        _bytes(title),\n+        &inout_opened if closable else NULL,","path":"imgui/core.pyx","position":97,"original_position":97,"commit_id":"4be94a487ff130317a94863dec83bd653b018eec","original_commit_id":"4be94a487ff130317a94863dec83bd653b018eec","user":{"login":"swistakm","id":1258054,"avatar_url":"https://avatars0.githubusercontent.com/u/1258054?v=3","gravatar_id":"","url":"https://api.github.com/users/swistakm","html_url":"https://github.com/swistakm","followers_url":"https://api.github.com/users/swistakm/followers","following_url":"https://api.github.com/users/swistakm/following{/other_user}","gists_url":"https://api.github.com/users/swistakm/gists{/gist_id}","starred_url":"https://api.github.com/users/swistakm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swistakm/subscriptions","organizations_url":"https://api.github.com/users/swistakm/orgs","repos_url":"https://api.github.com/users/swistakm/repos","events_url":"https://api.github.com/users/swistakm/events{/privacy}","received_events_url":"https://api.github.com/users/swistakm/received_events","type":"User","site_admin":false},"body":"should be:\r\n\r\n    &inout_opened if closable is not None else NULL\r\n\r\nSee previous comment.","created_at":"2017-03-06T14:40:21Z","updated_at":"2017-03-06T14:45:16Z","html_url":"https://github.com/swistakm/pyimgui/pull/17#discussion_r104427766","pull_request_url":"https://api.github.com/repos/swistakm/pyimgui/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/comments/104427766"},"html":{"href":"https://github.com/swistakm/pyimgui/pull/17#discussion_r104427766"},"pull_request":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/swistakm/pyimgui/pulls/17","id":108804846,"html_url":"https://github.com/swistakm/pyimgui/pull/17","diff_url":"https://github.com/swistakm/pyimgui/pull/17.diff","patch_url":"https://github.com/swistakm/pyimgui/pull/17.patch","issue_url":"https://api.github.com/repos/swistakm/pyimgui/issues/17","number":17,"state":"open","locked":false,"title":"Popups","user":{"login":"supudo","id":138193,"avatar_url":"https://avatars2.githubusercontent.com/u/138193?v=3","gravatar_id":"","url":"https://api.github.com/users/supudo","html_url":"https://github.com/supudo","followers_url":"https://api.github.com/users/supudo/followers","following_url":"https://api.github.com/users/supudo/following{/other_user}","gists_url":"https://api.github.com/users/supudo/gists{/gist_id}","starred_url":"https://api.github.com/users/supudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supudo/subscriptions","organizations_url":"https://api.github.com/users/supudo/orgs","repos_url":"https://api.github.com/users/supudo/repos","events_url":"https://api.github.com/users/supudo/events{/privacy}","received_events_url":"https://api.github.com/users/supudo/received_events","type":"User","site_admin":false},"body":"Hey :)\r\n\r\nNew PR on the way - this one includes the Popups methods. Hopefully i didn't miss anything now :)\r\n\r\nCheers,\r\nS.","created_at":"2017-03-02T17:01:40Z","updated_at":"2017-03-06T14:45:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97f5d87c08208575c45f15780694a092aac04271","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/swistakm/pyimgui/pulls/17/commits","review_comments_url":"https://api.github.com/repos/swistakm/pyimgui/pulls/17/comments","review_comment_url":"https://api.github.com/repos/swistakm/pyimgui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swistakm/pyimgui/issues/17/comments","statuses_url":"https://api.github.com/repos/swistakm/pyimgui/statuses/4be94a487ff130317a94863dec83bd653b018eec","head":{"label":"supudo:PopupsModals","ref":"PopupsModals","sha":"4be94a487ff130317a94863dec83bd653b018eec","user":{"login":"supudo","id":138193,"avatar_url":"https://avatars2.githubusercontent.com/u/138193?v=3","gravatar_id":"","url":"https://api.github.com/users/supudo","html_url":"https://github.com/supudo","followers_url":"https://api.github.com/users/supudo/followers","following_url":"https://api.github.com/users/supudo/following{/other_user}","gists_url":"https://api.github.com/users/supudo/gists{/gist_id}","starred_url":"https://api.github.com/users/supudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supudo/subscriptions","organizations_url":"https://api.github.com/users/supudo/orgs","repos_url":"https://api.github.com/users/supudo/repos","events_url":"https://api.github.com/users/supudo/events{/privacy}","received_events_url":"https://api.github.com/users/supudo/received_events","type":"User","site_admin":false},"repo":{"id":81945262,"name":"pyimgui","full_name":"supudo/pyimgui","owner":{"login":"supudo","id":138193,"avatar_url":"https://avatars2.githubusercontent.com/u/138193?v=3","gravatar_id":"","url":"https://api.github.com/users/supudo","html_url":"https://github.com/supudo","followers_url":"https://api.github.com/users/supudo/followers","following_url":"https://api.github.com/users/supudo/following{/other_user}","gists_url":"https://api.github.com/users/supudo/gists{/gist_id}","starred_url":"https://api.github.com/users/supudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supudo/subscriptions","organizations_url":"https://api.github.com/users/supudo/orgs","repos_url":"https://api.github.com/users/supudo/repos","events_url":"https://api.github.com/users/supudo/events{/privacy}","received_events_url":"https://api.github.com/users/supudo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/supudo/pyimgui","description":"Cython-based Python bindings for dear imgui","fork":true,"url":"https://api.github.com/repos/supudo/pyimgui","forks_url":"https://api.github.com/repos/supudo/pyimgui/forks","keys_url":"https://api.github.com/repos/supudo/pyimgui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supudo/pyimgui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supudo/pyimgui/teams","hooks_url":"https://api.github.com/repos/supudo/pyimgui/hooks","issue_events_url":"https://api.github.com/repos/supudo/pyimgui/issues/events{/number}","events_url":"https://api.github.com/repos/supudo/pyimgui/events","assignees_url":"https://api.github.com/repos/supudo/pyimgui/assignees{/user}","branches_url":"https://api.github.com/repos/supudo/pyimgui/branches{/branch}","tags_url":"https://api.github.com/repos/supudo/pyimgui/tags","blobs_url":"https://api.github.com/repos/supudo/pyimgui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supudo/pyimgui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supudo/pyimgui/git/refs{/sha}","trees_url":"https://api.github.com/repos/supudo/pyimgui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supudo/pyimgui/statuses/{sha}","languages_url":"https://api.github.com/repos/supudo/pyimgui/languages","stargazers_url":"https://api.github.com/repos/supudo/pyimgui/stargazers","contributors_url":"https://api.github.com/repos/supudo/pyimgui/contributors","subscribers_url":"https://api.github.com/repos/supudo/pyimgui/subscribers","subscription_url":"https://api.github.com/repos/supudo/pyimgui/subscription","commits_url":"https://api.github.com/repos/supudo/pyimgui/commits{/sha}","git_commits_url":"https://api.github.com/repos/supudo/pyimgui/git/commits{/sha}","comments_url":"https://api.github.com/repos/supudo/pyimgui/comments{/number}","issue_comment_url":"https://api.github.com/repos/supudo/pyimgui/issues/comments{/number}","contents_url":"https://api.github.com/repos/supudo/pyimgui/contents/{+path}","compare_url":"https://api.github.com/repos/supudo/pyimgui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supudo/pyimgui/merges","archive_url":"https://api.github.com/repos/supudo/pyimgui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supudo/pyimgui/downloads","issues_url":"https://api.github.com/repos/supudo/pyimgui/issues{/number}","pulls_url":"https://api.github.com/repos/supudo/pyimgui/pulls{/number}","milestones_url":"https://api.github.com/repos/supudo/pyimgui/milestones{/number}","notifications_url":"https://api.github.com/repos/supudo/pyimgui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supudo/pyimgui/labels{/name}","releases_url":"https://api.github.com/repos/supudo/pyimgui/releases{/id}","deployments_url":"https://api.github.com/repos/supudo/pyimgui/deployments","created_at":"2017-02-14T12:56:28Z","updated_at":"2017-02-14T12:56:29Z","pushed_at":"2017-03-05T21:20:41Z","git_url":"git://github.com/supudo/pyimgui.git","ssh_url":"git@github.com:supudo/pyimgui.git","clone_url":"https://github.com/supudo/pyimgui.git","svn_url":"https://github.com/supudo/pyimgui","homepage":"http://pyimgui.readthedocs.io","size":269,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swistakm:master","ref":"master","sha":"6150dca438669daa3cf2edbd29cbf08d79326756","user":{"login":"swistakm","id":1258054,"avatar_url":"https://avatars0.githubusercontent.com/u/1258054?v=3","gravatar_id":"","url":"https://api.github.com/users/swistakm","html_url":"https://github.com/swistakm","followers_url":"https://api.github.com/users/swistakm/followers","following_url":"https://api.github.com/users/swistakm/following{/other_user}","gists_url":"https://api.github.com/users/swistakm/gists{/gist_id}","starred_url":"https://api.github.com/users/swistakm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swistakm/subscriptions","organizations_url":"https://api.github.com/users/swistakm/orgs","repos_url":"https://api.github.com/users/swistakm/repos","events_url":"https://api.github.com/users/swistakm/events{/privacy}","received_events_url":"https://api.github.com/users/swistakm/received_events","type":"User","site_admin":false},"repo":{"id":69750363,"name":"pyimgui","full_name":"swistakm/pyimgui","owner":{"login":"swistakm","id":1258054,"avatar_url":"https://avatars0.githubusercontent.com/u/1258054?v=3","gravatar_id":"","url":"https://api.github.com/users/swistakm","html_url":"https://github.com/swistakm","followers_url":"https://api.github.com/users/swistakm/followers","following_url":"https://api.github.com/users/swistakm/following{/other_user}","gists_url":"https://api.github.com/users/swistakm/gists{/gist_id}","starred_url":"https://api.github.com/users/swistakm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swistakm/subscriptions","organizations_url":"https://api.github.com/users/swistakm/orgs","repos_url":"https://api.github.com/users/swistakm/repos","events_url":"https://api.github.com/users/swistakm/events{/privacy}","received_events_url":"https://api.github.com/users/swistakm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swistakm/pyimgui","description":"Cython-based Python bindings for dear imgui","fork":false,"url":"https://api.github.com/repos/swistakm/pyimgui","forks_url":"https://api.github.com/repos/swistakm/pyimgui/forks","keys_url":"https://api.github.com/repos/swistakm/pyimgui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swistakm/pyimgui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swistakm/pyimgui/teams","hooks_url":"https://api.github.com/repos/swistakm/pyimgui/hooks","issue_events_url":"https://api.github.com/repos/swistakm/pyimgui/issues/events{/number}","events_url":"https://api.github.com/repos/swistakm/pyimgui/events","assignees_url":"https://api.github.com/repos/swistakm/pyimgui/assignees{/user}","branches_url":"https://api.github.com/repos/swistakm/pyimgui/branches{/branch}","tags_url":"https://api.github.com/repos/swistakm/pyimgui/tags","blobs_url":"https://api.github.com/repos/swistakm/pyimgui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swistakm/pyimgui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swistakm/pyimgui/git/refs{/sha}","trees_url":"https://api.github.com/repos/swistakm/pyimgui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swistakm/pyimgui/statuses/{sha}","languages_url":"https://api.github.com/repos/swistakm/pyimgui/languages","stargazers_url":"https://api.github.com/repos/swistakm/pyimgui/stargazers","contributors_url":"https://api.github.com/repos/swistakm/pyimgui/contributors","subscribers_url":"https://api.github.com/repos/swistakm/pyimgui/subscribers","subscription_url":"https://api.github.com/repos/swistakm/pyimgui/subscription","commits_url":"https://api.github.com/repos/swistakm/pyimgui/commits{/sha}","git_commits_url":"https://api.github.com/repos/swistakm/pyimgui/git/commits{/sha}","comments_url":"https://api.github.com/repos/swistakm/pyimgui/comments{/number}","issue_comment_url":"https://api.github.com/repos/swistakm/pyimgui/issues/comments{/number}","contents_url":"https://api.github.com/repos/swistakm/pyimgui/contents/{+path}","compare_url":"https://api.github.com/repos/swistakm/pyimgui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swistakm/pyimgui/merges","archive_url":"https://api.github.com/repos/swistakm/pyimgui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swistakm/pyimgui/downloads","issues_url":"https://api.github.com/repos/swistakm/pyimgui/issues{/number}","pulls_url":"https://api.github.com/repos/swistakm/pyimgui/pulls{/number}","milestones_url":"https://api.github.com/repos/swistakm/pyimgui/milestones{/number}","notifications_url":"https://api.github.com/repos/swistakm/pyimgui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swistakm/pyimgui/labels{/name}","releases_url":"https://api.github.com/repos/swistakm/pyimgui/releases{/id}","deployments_url":"https://api.github.com/repos/swistakm/pyimgui/deployments","created_at":"2016-10-01T16:42:24Z","updated_at":"2017-03-06T02:08:29Z","pushed_at":"2017-03-05T21:21:12Z","git_url":"git://github.com/swistakm/pyimgui.git","ssh_url":"git@github.com:swistakm/pyimgui.git","clone_url":"https://github.com/swistakm/pyimgui.git","svn_url":"https://github.com/swistakm/pyimgui","homepage":"http://pyimgui.readthedocs.io","size":276,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/17"},"html":{"href":"https://github.com/swistakm/pyimgui/pull/17"},"issue":{"href":"https://api.github.com/repos/swistakm/pyimgui/issues/17"},"comments":{"href":"https://api.github.com/repos/swistakm/pyimgui/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swistakm/pyimgui/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/swistakm/pyimgui/statuses/4be94a487ff130317a94863dec83bd653b018eec"}}}}
{"actor":{"display_login":"swistakm"}}