Skip to content

Conversation

@scotty007
Copy link
Contributor

Allows user/system clipboard integration (aside from the internal ImGui clipboard and the out-of-the-box supported Windows clipboard).
System clipboard is enabled in GLFW integration.

@coveralls
Copy link

coveralls commented Mar 17, 2020

Coverage Status

Coverage decreased (-0.5%) to 53.607% when pulling be0fe0b on scotty007:feature/clipboard-callbacks into 1d25392 on swistakm:master.

@swistakm
Copy link
Member

Thanks for contribution! It features callbacks and we had some memory-safety issues when doing callbacks in different place. So I will just do some testing manually to check whether this needs some warnings in documentation. Will try to do that as soon as possible

@scotty007
Copy link
Contributor Author

@swistakm Thanks for developing and maintaining this awesome library!

There may also be Python 2/3 type compatibility issues when passing strings around. I can't trigger TypeErrors with the clipboard callbacks, but I stumbled upon such errors when I tried to add support for GetClipboardText() and SetClipboardText(). When I get this solved I can add docstring examples for unit testing (w/o this two functions a would have to fake user input somehow, is this possible?).

BTW: These type errors are triggered in imgui.core.show_style_selector() as well (Python 3). I will open an issue after further investigation.

@swistakm
Copy link
Member

Thanks for PR, sorry it took so long to review. I have verified the SDL2 implementation under Python2 and Python3 and fixed the typing issue I think you was referring to.

@swistakm swistakm merged commit 96d7a05 into pyimgui:master Jul 17, 2020
@swistakm swistakm added the release pending Merged but still needs official release label Jul 17, 2020
@swistakm swistakm added enhancement / feature and removed release pending Merged but still needs official release labels Jul 17, 2020
@swistakm
Copy link
Member

Feature released in 1.2.0.

@scotty007 scotty007 deleted the feature/clipboard-callbacks branch July 24, 2020 13:24
@scotty007
Copy link
Contributor Author

Thanks for the release! Installed it already :-)

NaleRaphael added a commit to NaleRaphael/codememo that referenced this pull request Oct 4, 2020
- Facilities for accessing system clipboard are not supported on Linux, hence that
  we are not able to copy text from another program and paste it into `imgui`
  widgets. Since there is no native solution implemented in `pyglet`, we use an
  external module called `pyperclip` to solve this problem. See also:
  - pyimgui/pyimgui#115
  - pyimgui/pyimgui#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants