-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm trying to build a GTK application in glade, I know it's possible to push!(widget, container) and can access object made in Glade with dict-like accessors i.e.,
gladefile = GtkBuilder(filename=joinpath(@__DIR__, "testfile.glade"))
win = gladefile["main_window"]
button1 = gladefile["button1"]But once I'm here, how can I use GtkObservables.jl to link a Plots.jl (or any other backend) plot to a GtkCanvas or similar widget, and insert it into my GUI? I'm starting with something simple here:
using Gtk, Plots, GtkObservables
gladefile = GtkBuilder(filename=joinpath(@__DIR__, "testfile.glade"))
win = gladefile["main_window"]
button1 = gladefile["button1"]
plot_frame = gladefile["plot_frame"]
canv = GtkCanvas()
showall(win)
function button_clicked_callback(widget)
println(get_gtk_property(widget, :name, String), " was clicked!")
h = Gtk.height(plot_frame)
w = Gtk.width(plot_frame)
x = randn(1000)
y = randn(1000)
# myplot = scatter(x, y)
# push!(plot_frame, myplot) # unsafe_convert doesn't know how to deal with this
end
signal_connect(button_clicked_callback, button1, "clicked")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels