{"action":"created","comment":{"url":"https://api.github.com/repos/wjakob/nanogui/pulls/comments/85659460","pull_request_review_id":6361435,"id":85659460,"diff_hunk":"@@ -62,11 +69,18 @@ class NANOGUI_EXPORT Window : public Widget {\n protected:\n     /// Internal helper function to maintain nested window position values; overridden in \\ref Popup\n     virtual void refreshRelativePlacement();\n+\n+    virtual int checkHorizontalResize(const Vector2i &mousePos);\n+    virtual int checkVerticalResize(const Vector2i &mousePos);\n protected:\n     std::string mTitle;\n     Widget *mButtonPanel;\n     bool mModal;\n     bool mDrag;\n+    bool mResize;","path":"include/nanogui/window.h","position":42,"original_position":42,"commit_id":"0b327aebc24ce364b44f0b3d8ad4b53e58f92640","original_commit_id":"0b327aebc24ce364b44f0b3d8ad4b53e58f92640","user":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"body":"I think that the ``mResize`` variable is not needed. Instead of redoing the layout on every draw call (probably many more necessary), call ``performLayout`` when a motion event changes the size of the window. For this, you will need the NanoVG context, which can be acquired from the ``static_cast<Screen *>(parent())->nvgContext()``.","created_at":"2016-10-30T13:06:28Z","updated_at":"2016-10-30T13:06:28Z","html_url":"https://github.com/wjakob/nanogui/pull/146#discussion_r85659460","pull_request_url":"https://api.github.com/repos/wjakob/nanogui/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/comments/85659460"},"html":{"href":"https://github.com/wjakob/nanogui/pull/146#discussion_r85659460"},"pull_request":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/wjakob/nanogui/pulls/146","id":89191455,"html_url":"https://github.com/wjakob/nanogui/pull/146","diff_url":"https://github.com/wjakob/nanogui/pull/146.diff","patch_url":"https://github.com/wjakob/nanogui/pull/146.patch","issue_url":"https://api.github.com/repos/wjakob/nanogui/issues/146","number":146,"state":"open","locked":false,"title":"Bare bones resize feature","user":{"login":"byECHO","id":6375449,"avatar_url":"https://avatars.githubusercontent.com/u/6375449?v=3","gravatar_id":"","url":"https://api.github.com/users/byECHO","html_url":"https://github.com/byECHO","followers_url":"https://api.github.com/users/byECHO/followers","following_url":"https://api.github.com/users/byECHO/following{/other_user}","gists_url":"https://api.github.com/users/byECHO/gists{/gist_id}","starred_url":"https://api.github.com/users/byECHO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byECHO/subscriptions","organizations_url":"https://api.github.com/users/byECHO/orgs","repos_url":"https://api.github.com/users/byECHO/repos","events_url":"https://api.github.com/users/byECHO/events{/privacy}","received_events_url":"https://api.github.com/users/byECHO/received_events","type":"User","site_admin":false},"body":"Resize window feature. There are 5 different rectangles to\r\nmanages this. 2 at the corners, one at the right, one at the left,\r\none at he bottom. You can use corner rectangles to resize diagonally.\r\n\r\nI think it needs to give more feedback to user though. For instance mouse could change in resize ares. \r\nThe thing GLFW does not have mouse icon for diagonal resize, only horizontal or vertical.\r\n\r\nAlso, I think there should be event for resize. Widgets may want to know that they are going to be resized.\r\n\r\nBut if we put these aside, resizing works as it is.","created_at":"2016-10-13T12:25:02Z","updated_at":"2016-10-30T13:07:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb023d52e30a203b7b38d622867bacc46e3f4ce0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wjakob/nanogui/pulls/146/commits","review_comments_url":"https://api.github.com/repos/wjakob/nanogui/pulls/146/comments","review_comment_url":"https://api.github.com/repos/wjakob/nanogui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wjakob/nanogui/issues/146/comments","statuses_url":"https://api.github.com/repos/wjakob/nanogui/statuses/0b327aebc24ce364b44f0b3d8ad4b53e58f92640","head":{"label":"byECHO:master","ref":"master","sha":"0b327aebc24ce364b44f0b3d8ad4b53e58f92640","user":{"login":"byECHO","id":6375449,"avatar_url":"https://avatars.githubusercontent.com/u/6375449?v=3","gravatar_id":"","url":"https://api.github.com/users/byECHO","html_url":"https://github.com/byECHO","followers_url":"https://api.github.com/users/byECHO/followers","following_url":"https://api.github.com/users/byECHO/following{/other_user}","gists_url":"https://api.github.com/users/byECHO/gists{/gist_id}","starred_url":"https://api.github.com/users/byECHO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byECHO/subscriptions","organizations_url":"https://api.github.com/users/byECHO/orgs","repos_url":"https://api.github.com/users/byECHO/repos","events_url":"https://api.github.com/users/byECHO/events{/privacy}","received_events_url":"https://api.github.com/users/byECHO/received_events","type":"User","site_admin":false},"repo":{"id":70789240,"name":"nanogui","full_name":"byECHO/nanogui","owner":{"login":"byECHO","id":6375449,"avatar_url":"https://avatars.githubusercontent.com/u/6375449?v=3","gravatar_id":"","url":"https://api.github.com/users/byECHO","html_url":"https://github.com/byECHO","followers_url":"https://api.github.com/users/byECHO/followers","following_url":"https://api.github.com/users/byECHO/following{/other_user}","gists_url":"https://api.github.com/users/byECHO/gists{/gist_id}","starred_url":"https://api.github.com/users/byECHO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byECHO/subscriptions","organizations_url":"https://api.github.com/users/byECHO/orgs","repos_url":"https://api.github.com/users/byECHO/repos","events_url":"https://api.github.com/users/byECHO/events{/privacy}","received_events_url":"https://api.github.com/users/byECHO/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/byECHO/nanogui","description":"Minimalistic GUI library for OpenGL","fork":true,"url":"https://api.github.com/repos/byECHO/nanogui","forks_url":"https://api.github.com/repos/byECHO/nanogui/forks","keys_url":"https://api.github.com/repos/byECHO/nanogui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/byECHO/nanogui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/byECHO/nanogui/teams","hooks_url":"https://api.github.com/repos/byECHO/nanogui/hooks","issue_events_url":"https://api.github.com/repos/byECHO/nanogui/issues/events{/number}","events_url":"https://api.github.com/repos/byECHO/nanogui/events","assignees_url":"https://api.github.com/repos/byECHO/nanogui/assignees{/user}","branches_url":"https://api.github.com/repos/byECHO/nanogui/branches{/branch}","tags_url":"https://api.github.com/repos/byECHO/nanogui/tags","blobs_url":"https://api.github.com/repos/byECHO/nanogui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/byECHO/nanogui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/byECHO/nanogui/git/refs{/sha}","trees_url":"https://api.github.com/repos/byECHO/nanogui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/byECHO/nanogui/statuses/{sha}","languages_url":"https://api.github.com/repos/byECHO/nanogui/languages","stargazers_url":"https://api.github.com/repos/byECHO/nanogui/stargazers","contributors_url":"https://api.github.com/repos/byECHO/nanogui/contributors","subscribers_url":"https://api.github.com/repos/byECHO/nanogui/subscribers","subscription_url":"https://api.github.com/repos/byECHO/nanogui/subscription","commits_url":"https://api.github.com/repos/byECHO/nanogui/commits{/sha}","git_commits_url":"https://api.github.com/repos/byECHO/nanogui/git/commits{/sha}","comments_url":"https://api.github.com/repos/byECHO/nanogui/comments{/number}","issue_comment_url":"https://api.github.com/repos/byECHO/nanogui/issues/comments{/number}","contents_url":"https://api.github.com/repos/byECHO/nanogui/contents/{+path}","compare_url":"https://api.github.com/repos/byECHO/nanogui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/byECHO/nanogui/merges","archive_url":"https://api.github.com/repos/byECHO/nanogui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/byECHO/nanogui/downloads","issues_url":"https://api.github.com/repos/byECHO/nanogui/issues{/number}","pulls_url":"https://api.github.com/repos/byECHO/nanogui/pulls{/number}","milestones_url":"https://api.github.com/repos/byECHO/nanogui/milestones{/number}","notifications_url":"https://api.github.com/repos/byECHO/nanogui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/byECHO/nanogui/labels{/name}","releases_url":"https://api.github.com/repos/byECHO/nanogui/releases{/id}","deployments_url":"https://api.github.com/repos/byECHO/nanogui/deployments","created_at":"2016-10-13T09:11:22Z","updated_at":"2016-10-13T09:11:23Z","pushed_at":"2016-10-29T13:54:27Z","git_url":"git://github.com/byECHO/nanogui.git","ssh_url":"git@github.com:byECHO/nanogui.git","clone_url":"https://github.com/byECHO/nanogui.git","svn_url":"https://github.com/byECHO/nanogui","homepage":null,"size":4076,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"wjakob:master","ref":"master","sha":"a9aaf4f01d814e1b528ef2ff611c10b3ade03b58","user":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"repo":{"id":30134765,"name":"nanogui","full_name":"wjakob/nanogui","owner":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wjakob/nanogui","description":"Minimalistic GUI library for OpenGL","fork":false,"url":"https://api.github.com/repos/wjakob/nanogui","forks_url":"https://api.github.com/repos/wjakob/nanogui/forks","keys_url":"https://api.github.com/repos/wjakob/nanogui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wjakob/nanogui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wjakob/nanogui/teams","hooks_url":"https://api.github.com/repos/wjakob/nanogui/hooks","issue_events_url":"https://api.github.com/repos/wjakob/nanogui/issues/events{/number}","events_url":"https://api.github.com/repos/wjakob/nanogui/events","assignees_url":"https://api.github.com/repos/wjakob/nanogui/assignees{/user}","branches_url":"https://api.github.com/repos/wjakob/nanogui/branches{/branch}","tags_url":"https://api.github.com/repos/wjakob/nanogui/tags","blobs_url":"https://api.github.com/repos/wjakob/nanogui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wjakob/nanogui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wjakob/nanogui/git/refs{/sha}","trees_url":"https://api.github.com/repos/wjakob/nanogui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wjakob/nanogui/statuses/{sha}","languages_url":"https://api.github.com/repos/wjakob/nanogui/languages","stargazers_url":"https://api.github.com/repos/wjakob/nanogui/stargazers","contributors_url":"https://api.github.com/repos/wjakob/nanogui/contributors","subscribers_url":"https://api.github.com/repos/wjakob/nanogui/subscribers","subscription_url":"https://api.github.com/repos/wjakob/nanogui/subscription","commits_url":"https://api.github.com/repos/wjakob/nanogui/commits{/sha}","git_commits_url":"https://api.github.com/repos/wjakob/nanogui/git/commits{/sha}","comments_url":"https://api.github.com/repos/wjakob/nanogui/comments{/number}","issue_comment_url":"https://api.github.com/repos/wjakob/nanogui/issues/comments{/number}","contents_url":"https://api.github.com/repos/wjakob/nanogui/contents/{+path}","compare_url":"https://api.github.com/repos/wjakob/nanogui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wjakob/nanogui/merges","archive_url":"https://api.github.com/repos/wjakob/nanogui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wjakob/nanogui/downloads","issues_url":"https://api.github.com/repos/wjakob/nanogui/issues{/number}","pulls_url":"https://api.github.com/repos/wjakob/nanogui/pulls{/number}","milestones_url":"https://api.github.com/repos/wjakob/nanogui/milestones{/number}","notifications_url":"https://api.github.com/repos/wjakob/nanogui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wjakob/nanogui/labels{/name}","releases_url":"https://api.github.com/repos/wjakob/nanogui/releases{/id}","deployments_url":"https://api.github.com/repos/wjakob/nanogui/deployments","created_at":"2015-02-01T03:16:12Z","updated_at":"2016-10-30T08:33:44Z","pushed_at":"2016-10-30T10:09:04Z","git_url":"git://github.com/wjakob/nanogui.git","ssh_url":"git@github.com:wjakob/nanogui.git","clone_url":"https://github.com/wjakob/nanogui.git","svn_url":"https://github.com/wjakob/nanogui","homepage":null,"size":4579,"stargazers_count":950,"watchers_count":950,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":163,"mirror_url":null,"open_issues_count":5,"forks":163,"open_issues":5,"watchers":950,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/146"},"html":{"href":"https://github.com/wjakob/nanogui/pull/146"},"issue":{"href":"https://api.github.com/repos/wjakob/nanogui/issues/146"},"comments":{"href":"https://api.github.com/repos/wjakob/nanogui/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wjakob/nanogui/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/wjakob/nanogui/statuses/0b327aebc24ce364b44f0b3d8ad4b53e58f92640"}}}}
{"actor":{"display_login":"wjakob"}}