forked from hoffstadt/DearPyGui_Ext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit
- Loading branch information
0 parents
commit 2a8cedd
Showing
24 changed files
with
1,136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: hoffstadt | ||
open_collective: DearPyGui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
1. PLEASE CAREFULLY READ: [FAQ](https://github.com/hoffstadt/DearPyGui/discussions/categories/frequently-asked-questions-faq) | ||
|
||
2. PLEASE CAREFULLY READ: [Documentation](https://github.com/hoffstadt/DearPyGui/wiki) | ||
|
||
3. FOR FIRST-TIME USERS ISSUES, please use the [Discord server](https://discord.gg/tyE7Gu4). | ||
|
||
4. REMOVE ALL 3RD PARTY LIBRARIES. | ||
|
||
5. PLEASE MAKE SURE that you have: read the FAQ; explored the examples; searched among Issues; and read the link provided in (1) (2). | ||
|
||
6. Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users. | ||
|
||
7. Delete points 1-7 and PLEASE FILL THE TEMPLATE BELOW before submitting your issue or we will immediately close it. | ||
|
||
Thank you! | ||
|
||
---- | ||
|
||
## Version of Dear PyGui | ||
|
||
Version: XXX | ||
Operating System: XXX (Windows 10, macOs xx, Ubuntu 20.04, etc.) | ||
|
||
## My Issue/Question | ||
|
||
A clear and concise description of what the issue/question is. Please provide as much context as possible. | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
## Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
## Screenshots/Video | ||
|
||
XXX _(you can drag files here)_ | ||
|
||
## Standalone, minimal, complete and verifiable example | ||
|
||
```python | ||
# Here's some code anyone can copy and paste to reproduce your issue | ||
import dearpygui.dearpygui as dpg | ||
|
||
with dpg.window(label="tutorial"): | ||
dpg.add_button(label="Press me") | ||
|
||
more_code_to_explain_my_issue() | ||
|
||
dpg.start_dearpygui() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: Documentation Improvement | ||
about: Not Documented, Not Done... Help us be done! | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
--- | ||
We'd love help and you are welcome to improve the the documentation with the exception of the api reference because | ||
it is currently generated manually from the stub file. It needs to be integrated within our CI process soon. | ||
If you'd like to change the API reference, update the stub file and we will generate the api docs during releases: | ||
|
||
https://github.com/hoffstadt/DearPyGui/blob/master/DearPyGui/stubs/dearpygui.pyi | ||
|
||
|
||
What can be modified related to docs: | ||
* Wiki | ||
* https://github.com/hoffstadt/DearPyGui/tree/gh-pages except (api_docs.html) | ||
* Readme | ||
* https://github.com/hoffstadt/DearPyGui/blob/master/DearPyGui/include/mvMarvel.h (this shows up in _show_documentation()_) | ||
* https://github.com/hoffstadt/DearPyGui/blob/master/DearPyGui/src/Core/StandardWindows/mvDocWindow.cpp (this shows up in _show_documentation()_) | ||
* https://github.com/hoffstadt/DearPyGui/tree/master/Examples (adding examples) | ||
|
||
Currently the CSS formatting is inherited from the autogenerated AIP docs done using pdoc3 to keep uniformity. | ||
|
||
Delete the above comment between the lines and PLEASE FILL THE TEMPLATE BELOW before submitting your issue. | ||
|
||
Thank you! | ||
|
||
---- | ||
|
||
**My Improvement** | ||
|
||
A clear and concise description of what the improvement is. Please provide as much context as possible. | ||
|
||
**Necessary Assets** | ||
|
||
- [ ] Pictures | ||
- [x] Code Sample | ||
- [ ] GIFs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Pull Request | ||
about: Create a pull request to help us improve | ||
title: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- dont forget to use the reviewer settings to notify any required reviewers --> | ||
<!-- using "Closes #issue-number" will link and autoclose all issue that this pull fixes upon accepting pull request --> | ||
|
||
**Description:** | ||
<!-- A clear and concise description of what the pull request contains. --> | ||
|
||
**Concerning Areas:** | ||
<!--A clear and concise description of any concerning areas that may need extra attention during the pull request.--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Deploy Package | ||
|
||
on: | ||
push: {} | ||
pull_request: {} | ||
|
||
jobs: | ||
|
||
build-windows: | ||
|
||
runs-on: windows-2019 | ||
if: "! contains(github.event.head_commit.message, '[skip ci]')" | ||
strategy: | ||
matrix: | ||
python-version: [ 3.9 ] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel build | ||
pip install dearpygui | ||
- name: Build package | ||
run: | | ||
python -m build | ||
- name: Deploy package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.idea/ | ||
.vs/ | ||
out/ | ||
venv/ | ||
dist/ | ||
dearpygui_ext.egg-info/ | ||
Output/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Raylock, LLC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!*.ttf | ||
!*.otf | ||
!.gitignore | ||
!*.py | ||
!*.png | ||
!*.ico |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import dearpygui.dearpygui as dpg | ||
|
||
|
||
class mvLogger: | ||
|
||
def __init__(self, parent=None): | ||
|
||
self.log_level = 0 | ||
self._auto_scroll = True | ||
self.filter_id = None | ||
if parent: | ||
self.window_id = parent | ||
else: | ||
self.window_id = dpg.add_window(label="mvLogger", pos=(200, 200), width=500, height=500) | ||
self.count = 0 | ||
self.flush_count = 1000 | ||
|
||
with dpg.group(horizontal=True, parent=self.window_id): | ||
dpg.add_checkbox(label="Auto-scroll", default_value=True, callback=lambda sender:self.auto_scroll(dpg.get_value(sender))) | ||
dpg.add_button(label="Clear", callback=lambda: dpg.delete_item(self.filter_id, children_only=True)) | ||
|
||
dpg.add_input_text(label="Filter", callback=lambda sender: dpg.set_value(self.filter_id, dpg.get_value(sender)), | ||
parent=self.window_id) | ||
self.child_id = dpg.add_child(parent=self.window_id, autosize_x=True, autosize_y=True) | ||
self.filter_id = dpg.add_filter_set(parent=self.child_id) | ||
|
||
with dpg.theme() as self.trace_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (0, 255, 0, 255)) | ||
|
||
with dpg.theme() as self.debug_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (64, 128, 255, 255)) | ||
|
||
with dpg.theme() as self.info_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 255, 255, 255)) | ||
|
||
with dpg.theme() as self.warning_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 255, 0, 255)) | ||
|
||
with dpg.theme() as self.error_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 0, 0, 255)) | ||
|
||
with dpg.theme() as self.critical_theme: | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 0, 0, 255)) | ||
|
||
def auto_scroll(self, value): | ||
self._auto_scroll = value | ||
|
||
def _log(self, message, level): | ||
|
||
if level < self.log_level: | ||
return | ||
|
||
self.count+=1 | ||
|
||
if self.count > self.flush_count: | ||
self.clear_log() | ||
|
||
theme = self.info_theme | ||
|
||
if level == 0: | ||
message = "[TRACE]\t\t" + message | ||
theme = self.trace_theme | ||
elif level == 1: | ||
message = "[DEBUG]\t\t" + message | ||
theme = self.debug_theme | ||
elif level == 2: | ||
message = "[INFO]\t\t" + message | ||
elif level == 3: | ||
message = "[WARNING]\t\t" + message | ||
theme = self.warning_theme | ||
elif level == 4: | ||
message = "[ERROR]\t\t" + message | ||
theme = self.error_theme | ||
elif level == 5: | ||
message = "[CRITICAL]\t\t" + message | ||
theme = self.critical_theme | ||
|
||
new_log = dpg.add_text(message, parent=self.filter_id, filter_key=message) | ||
dpg.set_item_theme(new_log, theme) | ||
if self._auto_scroll: | ||
scroll_max = dpg.get_y_scroll_max(self.child_id) | ||
dpg.set_y_scroll(self.child_id, -1.0) | ||
|
||
def log(self, message): | ||
self._log(message, 0) | ||
|
||
def log_debug(self, message): | ||
self._log(message, 1) | ||
|
||
def log_info(self, message): | ||
self._log(message, 2) | ||
|
||
def log_warning(self, message): | ||
self._log(message, 3) | ||
|
||
def log_error(self, message): | ||
self._log(message, 4) | ||
|
||
def log_critical(self, message): | ||
self._log(message, 5) | ||
|
||
def clear_log(self): | ||
dpg.delete_item(self.filter_id, children_only=True) | ||
self.count = 0 |
Oops, something went wrong.