Giter Site home page Giter Site logo

hoffstadt / dearpygui Goto Github PK

View Code? Open in Web Editor NEW
12.1K 148.0 644.0 140.46 MB

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies

Home Page: https://dearpygui.readthedocs.io/en/latest/

License: MIT License

CMake 0.65% C++ 84.50% Batchfile 0.04% Python 12.26% Objective-C++ 0.88% Objective-C 0.02% Shell 0.09% C 1.35% Pawn 0.22%
cpp python imgui toolkit native tools gui graphics macos linux

dearpygui's Introduction


Dear PyGui logo

A modern, fast and powerful GUI framework for Python

Python versions PYPI Downloads MIT License

static-analysis static-analysis Deployment Documentation Status

FeaturesInstallationHow To UseDemoResourcesSupportTech stackCreditsLicenseGallery


Themes

Features

  • Modern look — Complete theme and style control
  • Great performance — GPU-based rendering and efficient C/C++ code
  • Stable operation — Asynchronous function support
  • Fast graphs — Display over 1 million datapoints at 60 fps, zoom and pan
  • Node editor — Intuitive user interaction
  • Built-in demo — Quickly learn all features
  • Developer tools — Theme and resource inspection, runtime metrics, debugger
  • Cross-platform — Windows, Linux, MacOS
  • MIT license

        

        

Installation

Ensure you have at least Python 3.8 64bit.

pip install dearpygui
or
pip3 install dearpygui

How to use?

Using Dear PyGui is as simple as the following Python script.

import dearpygui.dearpygui as dpg

def save_callback():
    print("Save Clicked")

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Example Window"):
    dpg.add_text("Hello world")
    dpg.add_button(label="Save", callback=save_callback)
    dpg.add_input_text(label="string")
    dpg.add_slider_float(label="float")

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

Dear PyGui example window

Demo

The built-in demo shows all of Dear PyGui's functionality. Use this code to run the demo. The following impression shows a few, but not nearly all, of the available widgets and features. Since the Python code of the demo can be inspected, you can leverage the demo code to build your own apps.

Dear PyGui demo

Resources

Support

If you are having issues or want to help, here are some places you can go.

Chat on Discord       Reddit

Tech stack

Dear PyGui is built on top of Dear ImGui, including the ImPlot and imnodes extensions, and is fundamentally different than other Python GUI frameworks. Under the hood, it uses the immediate mode paradigm and your computer's GPU to facilitate extremely dynamic interfaces. In the same manner Dear ImGui provides a simple way to create tools for game developers, Dear PyGui provides a simple way for python developers to create quick and powerful GUIs for scripts. Dear PyGui is written in C/C++ resulting in highly performant Python applications. Dear PyGui is currently supported on the following platforms.

Platform Graphics API Newest Version
Windows 10 DirectX 11 PYPI
macOS Metal PYPI
Linux OpenGL 3 PYPI
Raspberry Pi 4 OpenGL ES PYPI

Credits

License

Dear PyGui is licensed under the MIT License.

Sponsor

Continued maintenance and development are a full-time endeavor which we would like to sustain and grow. Ongoing development is financially supported by users and private sponsors. If you enjoy Dear PyGui please consider becoming a sponsor or buy us a cup of coffee.

     

Gallery

Plotting/Graphing

Dear PyGui includes a plotting API built with ImPlot

        

        

        

        

Node Editor

Dear PyGui includes a node editor built with imnodes

Canvas

Dear PyGui includes a drawing API to create custom drawings, plot, and even 2D games.


BasicUsageExample

dearpygui's People

Contributors

99hats avatar abdhan avatar adwaithhs avatar amirmohammadzarif avatar arrys avatar atallahade avatar atlamillias avatar badsugar avatar bandit-masked avatar codecox avatar dataexploreruser avatar geekbozu avatar hoffstadt avatar ifreilicht avatar ily83 avatar jah-on avatar jmatthysen avatar keck-in-space avatar liu-kan avatar mainetim avatar mef51 avatar mmorandi avatar mstpyt avatar pbk0 avatar pcothren avatar romanssinicins avatar saasaa avatar uysalibov avatar v-ein avatar vanekrus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dearpygui's Issues

Data source default

for any items where data_source is used it should be the default value for the item on the first render instead of the value input when creating the item
to view issue
add_data("dataitem","source default")
add_label_text("input label", "creation default", data_source="dataitem")

3D Widget

Is your feature request related to a problem? Please describe.
Currently, there is no support for a 3D canvas.

Describe the solution you'd like
Add a 3D widget

Embedded Python Script Upgrade

Currently in Scripts/PrepareEmbeddedPython.py, both the debug and release versions of the built python are packaged up and moved to both the debug and release MarvelSandbox build directory.

This script needs to be modified to move debug to debug and release to release.

Tables API

Version of Dear PyGui:

Version: 0.1.0b0

OS

Operating System: Windows 10 Home 10.0.18363

My Issue/Question

The method get_table_selection() replies with a list of cell coordinates. (list[ list[ float, float ] ] )
when sending these coordinates into the get_table_item it takes in a list of integers

Expected behavior

Suggestion is to change the get_table_selection() to reply with (list[ list[ int, int] ] ) since cells only exist in integer coordinates anyway.

Standalone, minimal, complete and verifiable example:

from dearpygui.dearpygui import *

show_metrics()
show_documentation()
add_table("Table Example", ["Header 0", "Header 1"], callback="tablePrinter")
insert_row("Table Example", 0, ["row 0", "text"])


def tablePrinter(sender, data):
    coordList = get_table_selections("Table Example")
    print("Selected Cells (coordinates): ", coordList)
    names = []
    for coordinates in coordList:
        names.append(get_table_item("Table Example", coordinates[0], coordinates[1]))
    print(names)


start_dearpygui()

Can't Run Provided Sample Code

Describe the bug
When attempting to run the code found at https://github.com/RaylockLLC/DearPyGui#usage, an error is given:

Traceback (most recent call last):
File "c:\Users\dylan\Desktop\Programming\dpygui\tempCodeRunnerFile.py", line 1, in
from dearpygui.dearpygui import *
ImportError: DLL load failed while importing dearpygui: The specified module could not be found.

To Reproduce
Steps to reproduce the behavior:

  1. Copy code, paste code
  2. Run
  3. See error

Additional context
Python Version: 3.8.1
DearPyGui Version: 0.1.0a21
Code Editor: VSCode
Platform: Windows 10 v 1909 (18363.959)

I tried a simple uninstall-reinstall, but the behavior wasn't any different. Very neat project, looking forward to seeing this grow. Hello from Reddit!

Plot Commands can cause crash

Version of Dear PyGui:

Version: v0.1.0b4

OS

Operating System: All

My Issue/Question
Plot commands cause a crash if not called on actual plot items.

[Documentation Error] Mistaken comment symbol in Tutorials

My Issue/Question

The tutorial has // for a comment when it should be # which leads to an error when you copy paste the block.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Tutorials link (as of now making of this issue, https://hoffstadt.github.io/DearPyGui/tutorial.html)

  2. Scroll down to Developer Tools

  3. Copy paste the code in it and try to run it. It won't work because
    image
    image

Expected behavior

Should be # replace "main.py" with your python file name and not
//replace"main.py" with your python file name

Linux/Mac Keycodes

Linux and Mac keycodes are still mapped to Win32 keycodes. This needs to be updated to platform specific keycodes.

Manager Mode

Is your feature request related to a problem? Please describe.
Management of multiple apps.

Describe the solution you'd like
A complete management system responsible for:

  • App Locations
  • App Layouts
  • Global Theme/Styles
  • 3rd Party Library Location

[NEW APP] Vector Operations

Please describe the app

A Vector operations calculator.

Additional context

Below is a previous version of this app in Engineer's Sandbox:
image
image

It is not necessary that they look or act the same. Engineer's Sandbox was very limited in features.

Previous Code From Engineer's Sandbox

from utilities.Raylock import *
from math import cos, sin, pi

class App:

    def __init__(self):

        StartAppUtility(self)
        
        AddToggleSet(self, 
            "Operation",
            [0, "Normalize"],[1, "Decomposition"],[2, "Dot Product"],[3,"Cross Product"], 
            location="East", outline=False)
        
        AddInput(self, "An", default="1,2,3", label="A", id=0, numbers=False)
        AddInput(self, "Ad", default="1,2,3", label="A", id=2, numbers=False)
        AddInput(self, "Ac", default="1,2,3", label="A", id=3, numbers=False)
        AddInput(self, "Bd", default="1,2,3", label="B", id=2, numbers=False)
        AddInput(self, "Bc", default="1,2,3", label="B", id=3, numbers=False)
        AddInput(self,  "R",                             id=1, tip="Vector Magnitude")
        AddInput(self,  "A", label="\u0398",             id=1, tip="Vector Angle")
        
        
        AddOutput(self, "normal", label="   |A|",        id=0)
        AddOutput(self,    "dot", label="   A \u2022 B", id=2)
        AddOutput(self,  "cross", label="   A x B",      id=3)
        
        AddOutput(self, "X Component", id=1, format="%.6f")
        AddOutput(self, "Y Component", id=1, format="%.6f")
        
        
        AddDrawing(self, "drawing1", method="GetDrawing")
        self.GetDrawing()
        
    def GetDrawing(self):

        ClearDrawing(self, "drawing1")
        
        checked = GetInput(self, "Operation")

        if checked == 3:
            DrawArrow(self, "drawing1", -60,70,-60,-40,8, pen="AreaOutline1", brush="AreaOutline1", textcolor="AreaOutline1")
            DrawText(self, "drawing1", "A x B",-75,25)
            DrawText(self, "drawing1", "|A x B|",10,-30)
            DrawArrow(self, "drawing1", 0,-70,-60,-40,8, pen="AreaOutline2", brush="AreaOutline2", textcolor="AreaOutline2")
            DrawArrow(self, "drawing1", 20,10,-60,-40,8)
            DrawText(self, "drawing1", "A",-35,-55)
            DrawText(self, "drawing1", "B",-28,-15)
            DrawLine(self, "drawing1", (20),(10),(80),(-20), pen="Dimensions", brush="Dimensions", textcolor="Dimensions", penstyle="wxPENSTYLE_LONG_DASH")
            DrawLine(self, "drawing1", (0),(-70),(80),(-20))
            DrawLine(self, "drawing1", (-60),(-30),(-50),(-30))
            DrawLine(self, "drawing1", (-50),(-30),(-50),(-40))
        
        elif checked == 2:
            DrawArrow(self, "drawing1", 20,70,-40,-40,8, pen="AreaOutline1", brush="AreaOutline1", textcolor="AreaOutline1")
            DrawText(self, "drawing1", "A",-15,20)
            DrawArrow(self, "drawing1", 40,-40,-40,-40,8, pen="AreaOutline2", brush="AreaOutline2", textcolor="AreaOutline2")
            DrawText(self, "drawing1", "B",5,-33)
            DrawHBDimension(self, "drawing1", "a \u2022 b/|b|",-40,-40,20,-40, pen="Dimensions", brush="Dimensions", textcolor="Dimensions")
            DrawText(self, "drawing1", "\u0398",-16,-21)
            DrawArrow(self, "drawing1", -28,-23,-24,-27,8)
            DrawArc(self, "drawing1", -25,-40,-26,-20,-27,-33, brush="transparent")
            DrawLine(self, "drawing1", 20,70,20,-40, penstyle="wxPENSTYLE_LONG_DASH")
            
        elif checked == 1:
            DrawArrow(self, "drawing1", 40, 70, -40, -40, 8, pen="Dimensions", brush="Dimensions", textcolor="Dimensions")
            DrawArrow(self, "drawing1", -28, -23, -24, -27, 8)
            DrawText(self, "drawing1", "R", -5, 20)
            DrawText(self, "drawing1", "\u0398", -16, -21)
            DrawArrow(self, "drawing1", 40, -40, -40, -40, 8, pen="AreaOutline2", brush="AreaOutline2", textcolor="AreaOutline2")
            DrawText(self, "drawing1", "X", 5, -33)
            DrawArrow(self, "drawing1", 40, 70, 40, -40, 8, pen="AreaOutline1", brush="AreaOutline1", textcolor="AreaOutline1")
            DrawText(self, "drawing1", "Y", 35, 10)
            DrawArc(self, "drawing1", -25, -40, -26, -20, -27, -33, pen="Dimensions", brush="transparent")           
        
        elif checked == 0:
            DrawArrow(self, "drawing1", -50,50,-50,-50,3, pen="Dimensions", brush="Dimensions", textcolor="Dimensions")
            DrawArrow(self, "drawing1", 50,-50,-50,-50,3)
            DrawArrow(self, "drawing1", 16.6,0,-50,-50,8, pen="AreaOutline2", brush="AreaOutline2", textcolor="AreaOutline2")
            DrawText(self, "drawing1", "A",-13,-15)
            DrawArrow(self, "drawing1", -28.349,-33,-50,-50,8, pen="AreaOutline1", brush="AreaOutline1", textcolor="AreaOutline1")
            DrawText(self, "drawing1", "A (unit vector)",-5,-40)
            

        
        return ReturnDrawing(self, "drawing1")
        

    def solve(self):

        check = GetInput(self, "Operation")

        if check == 0:
            
            A = Vector(GetInput(self, 'An'))
            An = A.Normalize()
            SetOutput(self, 'normal',An.GetString())
       
        elif check== 1:
            magnitude = GetInput(self, "R")
            angle = GetInput(self, 'A')

            SetOutput(self, 'X Component', magnitude * cos(angle * pi / 180))
            SetOutput(self, 'Y Component', magnitude * sin(angle * pi / 180))
       
        elif check == 2:
                A = Vector(GetInput(self, "Ad"))
                B = Vector(GetInput(self, 'Bd'))
                Ad = A.DotProduct(B)
                SetOutput(self, 'dot',Ad)
                
        elif check == 3:
                A = Vector(GetInput(self, "Ac"))
                B = Vector(GetInput(self, 'Bc'))
                SetOutput(self, 'cross',A.CrossProduct(B).GetString())

Data adding constancy

Version of Dear PyGui: dearpygui-0.1.0a38-cp38-cp38-win_amd64.whl

OS

Operating System: 10.0.18363 Build 18363 Windows 10

My Issue/Question

Adding data item before widget doesn't apply value to the widget until second frame, while adding after applies value to item on the initial render

Expected behavior

Constancy when adding data item before and after widget item

Standalone, minimal, complete and verifiable example:

# Here's some code anyone can copy and paste to reproduce your issue

from dearpygui.dearpygui import *

show_logger()
add_checkbox("Radio Button", data_source="data1")
add_data("data1", True)
add_button("button", callback="print_me")
print(get_value("Radio Button"))


def print_me(sender, data):
    print(str(get_value("Radio Button")))


start_dearpygui()

[NEW APP] Mohr's Circle

Please describe the app

A Mohr's Circle calculator.

Additional context

Below is a previous version of this app in Engineer's Sandbox:
image

It is not necessary that they look or act the same. Engineer's Sandbox was very limited in features.

Previous Code From Engineer's Sandbox

from utilities.Raylock import *
from math import cos, sin, pi, atan

class App:

    def __init__(self):

        StartAppUtility(self)

        AddInput(self, "Sx", label="\u03c3x", location="West")
        AddInput(self, "Sy", label="\u03c3y")
        AddInput(self, "txy", label="\u03c4xy")

        AddOutput(self, "S1", label="\u03c31", location="West")
        AddOutput(self, "S2", label="\u03c32")
        AddOutput(self, "Tmax", label="\u03c4max")
        AddOutput(self, "t", label="\u0398")

        # add and setup a drawing
        AddDrawing(    self, "drawing1")
        SetDrawingSize(self, "drawing1", 400)
        DrawRectangle( self, "drawing1", -40,  40,  80,  80, pen="AreaOutline1", brush="Area1")
        DrawArrow(     self, "drawing1",   0,  80,   0,  40, 7, pen="Pi", brush="Pi", textcolor="Pi")
        DrawArrow(     self, "drawing1",   0, -80,   0, -40, 7)
        DrawArrow(     self, "drawing1",  80,   0,  40,   0, 7)
        DrawArrow(     self, "drawing1", -80,   0, -40,   0, 7)
        DrawText(      self, "drawing1", "\u03C3x", 80,   8)
        DrawText(      self, "drawing1", "\u03C3y",  8,  80)
        DrawArrow(     self, "drawing1",  45,  40,   45, -40,  7, pen="Po", brush="Po", textcolor="Po")
        DrawArrow(     self, "drawing1", -45, -40,  -45,  40,  7)
        DrawArrow(     self, "drawing1",  40,  45,  -40,  45,  7)
        DrawArrow(     self, "drawing1", -40, -45,   40, -45, 7)
        DrawText(      self, "drawing1", "\u03C4xy", 48,  48)
        
        # add and setup a plot
        AddPlot(      self, "Mohr's Circle", column=1)
        SetTitleSize( self, "Mohr's Circle", 10)
        SetXAxisTitle(self, "Mohr's Circle", "\u03c3")
        SetYAxisTitle(self, "Mohr's Circle", "\u03c4")
        SetYSymmetry( self, "Mohr's Circle")
        SetSize(      self, "Mohr's Circle", 400, 400)
        ShowBorder(   self, "Mohr's Circle", False)
        ShowLegend(   self, "Mohr's Circle", False)


    def solve(self):

        Sx  = GetInput(self, "Sx")
        Sy  = GetInput(self, "Sy")
        Txy = GetInput(self, "txy")
        
        Save     = (Sx + Sy) / 2.0
        R        = (((Sx - Sy) / 2.0)**2 + Txy**2)**0.5
        S_first  = Save + R
        S_second = Save - R


        S1 = 0
        S2 = 0
        if  S_first >= S_second:
            S1 = S_first
            S2 = S_second
        else:
            S1 = S_second
            S2 = S_first

        Tmax   = abs(R)
        ThetaP = (atan(2 * Txy / (Sx - Sy)) / 2.0) * 180 / pi


        SetOutput(self, 'S1', S1)
        SetOutput(self, 'S2', S2)
        SetOutput(self, 'Tmax', Tmax)
        SetOutput(self, 't', ThetaP)
        
        ClearData(     self, "Mohr's Circle")
        SetYBoundaries(self, "Mohr's Circle", -Tmax * 1.1, Tmax * 1.1)
        SetXBoundaries(self, "Mohr's Circle", S2 - (abs(S2) * 0.1), abs(S1) * 1.1)
        LockRatio(     self, "Mohr's Circle", True)
        AddCircle(     self, "Mohr's Circle", Save,    0,  R,"Pi", thickness=1)
        AddLine(       self, "Mohr's Circle",   Sx, -Txy, Sy, Txy, "Dimensions")
        AddPoint(      self, "Mohr's Circle", Save,    0, "PlotText", label="C")
        AddPoint(      self, "Mohr's Circle",   Sx, -Txy, "PlotText", label="A")
        AddPoint(      self, "Mohr's Circle",   Sy,  Txy, "PlotText", label="B")
        AddPoint(      self, "Mohr's Circle",   S1,    0, "PlotText", label="\u03C31")
        AddPoint(      self, "Mohr's Circle",   S2,    0, "PlotText", label="\u03C32")

adding item with same name

Describe the bug
after adding and the same item 8-9 times with the same name and getting the appropriate warning the app crashed

To Reproduce
follow steps below using the code :
add_button("click me 9 times in row for crash", callback = 'runFun')

def runFun(Sender, data):
display_warning_message("this is my love letter to you")

def display_warning_message(message):
add_window("Warning Message",300, 100, autosize = True, title_bar = False)
add_text(message)
add_button("OK", callback = "deleteMessageWindow")

def deleteMessageWindow(sender, data):
delete_item("Warning Message")

Expected behavior
not a crash but just keeping the warning happening

Multi-File IDE

Is your feature request related to a problem? Please describe.
Currently the IDE can only view a single file.

Describe the solution you'd like
The ability to open multiple files that show on individual tabs.

Remove Python Translator Macros

Is your feature request related to a problem? Please describe.
The following helper macros in mvPythonTranslator.h were only needed when the API was changing rapidly:

  • MV_STANDARD_CALLBACK_INIT
  • MV_STANDARD_CALLBACK_PARSE
  • MV_STANDARD_CALLBACK_EVAL

Describe the solution you'd like
Remove this macros and replace with only applicable code per command.

TODO List

  • remove flag system where possible
  • XML type parser
  • New Widgets
  • Mac/Linux Port
  • Finish Plotting API
  • Custom Widget API
  • Non-Python Modifications
  • Documentation Wiki
  • Setup CI
  • Bug - IsItemVisible returns 205 when not visible
  • Bug - cannot Hide items inside of a collapsible header
  • Feature - cannot check if item is shown
  • Fix - unindent does not match the normal syntax or add, end
  • Feature - may be useful to be able to getCallback and return name of callback of sender or item
  • Crash - Crash occurs when required frame name is missing from the addPopout method
  • Feature - addPopout requires a button with the same name be made prior and not after the "addPopout" call. currently they way the syntax feels is as if the pop up isnt actually a callback of a button when it is. Similar to how close window works can we make the show with a show window so we can make multiple buttons able to display the same window. (useful for giving developer option to create error popup and letting an if loop be able to show the windows)
  • Feature - popup windows that don't disappear for things like pop out graphs

Columns/Tables API

Is your feature request related to a problem? Please describe.
There is currently no way to visualize large amounts of data.

Describe the solution you'd like
Provide a Columns/Tables API around ImGui's column API.

draw_bezier_curve with same tag doesn't overwrite previous draw_bezier_curve

Version of Dear PyGui:

Version: 1.0b5

OS

Operating System: Windows 10

My Issue/Question

Reusing draw_bezier_curve with tag doesn't replace the existing bezier curve like it does it with other draw_ functions. Instead, it seems (I'm not sure) to use the previous points as reference and draws something random.

To Reproduce

Steps to reproduce the behavior:

  1. Create a single draw_bezier_curve with a tag on a drawing.
  2. Display it and check. There should be no problems.
  3. Create two exact same draw_bezier_curve with the same tag on a drawing, in which case the second call should overwrite the first draw_bezier_curve. For example,
draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")
draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")

But the second call does NOT overwrite.

Expected behavior

Whenever I update a bezier_curve using draw_bezier_curve with a tag, it should overwrite the previous bezier curve/weird.

Screenshots/Video

Single bezier_curve called -

draw_bezier_curve("drawing_tab1", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#1")

image

Same bezier_curve called two times -

draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")
draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")

image

Standalone, minimal, complete and verifiable example:

from dearpygui.dearpygui import *

set_main_window_size(800,640)
add_tab_bar("bezier_test")

x1, y1 = [100,100]
x2, y2 = [100, 200]
x3, y3 = [200, 200]
x4, y4 = [200,100]

add_tab("Single bezier")
add_drawing("drawing_tab1", width=600, height=500)
draw_bezier_curve("drawing_tab1", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#1")
end_tab()

add_tab("Double bezier, same tag")
add_drawing("drawing_tab2", width=600, height=500)
draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")
draw_bezier_curve("drawing_tab2", [x1,y1], [x2,y2], [x3,y3], [x4,y4], [255,255,255,255], 5, 10, tag="arc#2")
end_tab()

start_dearpygui()

set_value reflected in data source also

Version of Dear PyGui: dearpygui-0.1.0a38-cp38-cp38-win_amd64.whl

OS

Operating System: 10.0.18363 Build 18363 Windows 10

My Issue/Question

setting the value of an item specifically checkbox does not set the value of the data source

Expected behavior

setting the value should also set the data source

Standalone, minimal, complete and verifiable example:

# Here's some code anyone can copy and paste to reproduce your issue

from dearpygui.dearpygui import *

add_checkbox("Radio Button", data_source="data1")
add_data("data1", True)
add_button("button", callback="print_me")


def print_me(sender, data):
    set_value("Radio Button", False)
    print(get_value("Radio Button"))
    print(get_data("data1"))


start_dearpygui()

View Source Bug

Describe the bug
view_source command doesn't always work.

Solution
addedPath needs to be set for cases where sandbox is run outside of development. Check in MarvelApplication.cpp

addWindow: Interesting Behavior

Describe the bug
Scene1: when the window is placed on the main window it will steal and dispaly all items created after it's add/end. once the window is closed it will let the main window have its items back.

Scene2: when the window is placed in a container for example a collapse header, it will be displayed when the header is opened and steal all the items from the main window. and when the header is close it gives the items back. This window cant be close with the "x" button at the top right.

To Reproduce
pull the test app branch and look into the windows section, the item name is "normal window" this window's code can be moved inside and outside of the collapsible
header to see the different bug scenes

Expected behavior
I think the intended behavior was just to be like a normal container

Screenshots
Capture
Capture 2

Provide More Complete Documentation

Title says it all. Although we have the API reference and a built-in documentation app. A more complete and formal documentation is necessary.

Font Selection

Is your feature request related to a problem? Please describe.
The current font can be ugly. Some users would like to change the font or add their own ttf file.

Describe the solution you'd like
Add font selection and loading commands.

Multi-type logger

Version of Dear PyGui: dearpygui-0.1.0a38-cp38-cp38-win_amd64.whl

OS

Operating System: 10.0.18363 Build 18363 Windows 10

My Issue/Question

logger does not take in integers

Expected behavior

logger should take in all data types

Standalone, minimal, complete and verifiable example:

# Here's some code anyone can copy and paste to reproduce your issue

from dearpygui.dearpygui import *

log_warning(1)
log_warning(1.0)
log_warning(True)
log_warning("String")

start_dearpygui()

Widget Width/Height Concerns

Describe the bug
Some widgets, like child allow a width/height of 0 which autosizes the widget. However, calls to get_width/get_height should still return the actual width and height.

Add keyword to group item

Add hide keyword to group item. It should have similar functionality as the "hide" keyword in the window widget

[BUG] window widths and heights are the same

Describe the bug
the function "ge_main_window_size()" will return a tuple of (width,width) instead of (width,height)

To Reproduce
show_logger()
add_button("sizeIt", callback = "getSize")
def getSize(sender):
print(get_main_window_size())

Screenshots
Capture

Configuration File

Is your feature request related to a problem? Please describe.
Configuring a default mode to run. To prepare for the manager app.

Describe the solution you'd like
Add a configuration file and parser to the standard setup.

Custom Widget API

Is your feature request related to a problem? Please describe.
Currently, custom widgets can be created with the drawing API and events but custom widget creation is not treated as a first class feature.

Describe the solution you'd like
A formal method and system for creating custom widgets by users.

Additional Plot Types

Is your feature request related to a problem? Please describe.
Currently only scatter, point, and line series are available in the plotting API.

Describe the solution you'd like
The following additional plot types should be added:

  • shaded plots
  • vertical/horizontal bar graphs
  • pie charts
  • heatmap charts
  • area plots

Also, data querying should be supported.

Optional Closable Collapsing Header

Describe the bug
Currently, collapsing headers always show a close button. We do not want this.

Solution
There should be a "closable" keyword for this.

Style/Theme System

Is your feature request related to a problem? Please describe.
Changing app colors/styles is currently insufficient.

Describe the solution you'd like
A more formal theme system in which themes can be saved to files. Also, a theme can be selected through command line flags for app startup.

Menu Item visibility

Version of Dear PyGui:

Version: 0.1.0b4

OS

Operating System: Windows 10 Home 10.0.18363

My Issue/Question

it appears as though is_item_visible() is not updating for items inside the menu bar

Expected behavior

the "SecondMenu" should be replying with "True" when is_item_visible() button is pressed and them menu is visible

this can be verified with the layout tab in the debugger

Standalone, minimal, complete and verifiable example:

from dearpygui.dearpygui import *

show_debug()
show_logger()
add_menu_bar("MenuBar")
add_menu("FirstMenu")
add_menu_item("Create Second Menu", callback="addSecondMenu")
add_menu_item("Delete Second Menu", callback="deleteSecondMenu")
end_menu()
end_menu_bar()
add_button('Check is "SecondMenu" visible', callback="checkVisibility")

def addSecondMenu(sender, data):
    add_menu("SecondMenu", parent="MenuBar")
    end_menu()


def deleteSecondMenu(sender, data):
    delete_item("SecondMenu")


def checkVisibility(sender, data):
    log_debug(is_item_active("SecondMenu"))


start_dearpygui()

Pip Installing

Is your feature request related to a problem? Please describe.
We would like users to be able to pip install

MacOS Support

Is your feature request related to a problem? Please describe.
MacOS is not currently supported.

Describe the solution you'd like
Provide MacOS support.

order of rendering

Describe the bug
the order of rendering may need to be adjusted
Also Child windows widgets can't be polled
is item hovered an item not working
To Reproduce

add a window and a render callback at runtime in the same render frame (crashed program)
or this could be due to adding a render callback multiple times like in a loop

add a drawing and a drawing item in the same render frame (claims drawing doesnt exist)

Expected behavior
not sure

New Widgets

The following widgets are still needed:

  • ImageButton
  • Table API (when ready)

Linux Support

Is your feature request related to a problem? Please describe.
Currently, Linux is not supported.

Describe the solution you'd like
Added Linux support.

TextEdit Widget

Is your feature request related to a problem? Please describe.
Open up the API of the widget used in show_source() for users to be able to control it.

operating system window size

Describe the bug
When calling set main window size before the first draw were talking about the Window's window. When calling the get_main_window_size() at run time it replies with the "mainWindow" size. We Should decide if main window size commands should be setting the (window's window or the imgui MainWindow)
Also
When setting the main window to (400,500) and asking the size of "MainWindow" before the first render the size is (400,500) but after the first render the size shrinks by 16 width and 39 height. This could cause sizing issues when drawing things

To Reproduce
Steps to reproduce the behavior copy and run the code below:
set_main_window_size(400,500)
add_button("check size", callback = "getsize")
def getsize(sender,data):
print(get_main_window_size())

Expected behavior
get and set_main_window_size should always be talking about the operating system window
Also setting the size should not include the decorator at the top of the window

Add keyword to hide_item

Add keyword "children_only" to the "hide_item" command.
This should have similar functionality as the "delete_item" with "children_only" keyword

Canvas reaching outside of window

canvas is reaching outside of window

Describe the bug
The lines drawn on a canvas inside a window are still visible outside of the bounds of the window.

To Reproduce
add_window("canvas_holding",width = 500, height = 500)

add_child("canvas_holder")

add_drawing("canvas", width= 500, height= 500)
draw_line("canvas", p1 = line1.p1, p2 = line1.p2,color = [150,150,150], thickness = 1)
draw_line("canvas", p1 = sensor1.origin, p2 = sensor1.p2, color =[100,200,150],thickness = 1)

end_child()
end_window()

Expected behavior
i expected only to see the lines that could be seen in the window.

Screenshots
see above

Additional context
Add any other context about the problem here.

Errors/Warnings Exceptions

Is your feature request related to a problem? Please describe.
Now that this is primarily a python library, log errors/warning should be accompanied by python exceptions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.