Code Monkey home page Code Monkey logo

gtkinteract.jl's People

Contributors

catawbasam avatar grero avatar jverzani avatar mfalt avatar mvkma avatar shashi avatar timholy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

gtkinteract.jl's Issues

button woes

To make a button with a callback utilizes a pattern like

b = button("click me")
window(b)
map(b) do args...
   println("clicked me")
end

All good, but if things get more complicated, the button fails to be lifted:

window(toolbar(b), grow(b))

Now clicking on b does not update the GUI (any of the three instances)

Also directly pushing a value doesn't work, though this will at first:

push!(b.signal, nothing)

Not sure what happens here...

Not working

In #10 it was pointed out this is not working. The issue lies in the relationship between Gtk and Reactive and is reported here: JuliaGraphics/Gtk.jl#229

Until that gets sorted out, this package will only work with older commits, such as can be done through Pkg.pin.

Add image to a window doesn't work

I tried with Immerse, inspectDR and Gadfly to add a image in a window with widgets, for example sliders.
When i use the slider i get this error:
MethodError: no methiod matchin update_view.

For example, this code from examples:

w = mainwindow(title="Simple test")
n = slider(1:10, label="n")
m = slider(11:20, label="m")
cg = cairographic()

append!(w, [n, m, cg])

map(n,m) do n,m
  push!(cg, plot(sin, n*pi, m*pi))
end

Can you show me an example. A simple one, for example a plot of a function that changes in real time when you move the slider. It would be nice if you tell me packages versions.

Thanks.

Is it possible to integrate ImageView into GtkInteract?

I have a program, which could run for a very long time and generate a lot of pictures associated with different parameters. I want to use GtkInteract to visualize those pictures by

using GtkInteract,ImageView
@manipulate for a=1:10, b=1:10, c=1:10
   img=imread("...")
   view(img)
end

Is it difficult to integrate ImageView into GtkInteract? Or could you suggest other methods to achieve this?

Thanks

Example in README fails

I tried the @manipulate example in the README and got the following error:

ERROR: MethodError: `display` has no method matching display(::Gtk.GtkCanvas, ::Winston.FramedPlot)
Closest candidates are:
  display(::AbstractString, ::Any)
  display(::TextDisplay, ::Any)
  display(::MIME{mime}, ::Any)

Usage with Immerse

I was trying to get this package to work with Immerse using the following flow, but had some problems. There may be simpler implementations of this, but I have found none that works with multiple plots and sliders/checkboxes (feel free to give me some pointers if there is). Below follows a toy example:

using GtkInteract, Immerse
k = slider(1:0.1:10)
cg1 = cairographic(width=200,height=150)
w = window(hbox(k,grow(cg1)))
Reactive.preserve(map(k) do k
    fig1 = Immerse.plot(y=(1:10).^k)
    push!(cg1, fig1)
end)
w

The code above doesn't work, but I was able to create a solution.
Would you consider adding the following function to the package? (I can create a pull request, but wanted to know if I'm using the package correctly first)

function Base.push!(obj::CairoGraphic, p::Gadfly.Plot)
    if obj.obj != nothing
      push!(obj.obj, p)
    end
end

The problem that the old image doesn't disappear is still present. This can be easily solved by adding a backgound to the plot:

fig1 = Immerse.plot(y=(1:10).^k, Theme(background_color=Colors.RGB(1.,1.,1.)))

is there a way to generalize this or solve it in some other way?

The new Reactive.jl

JuliaGizmos/Reactive.jl#65 was a big (and likely breaking) change that just got merged. Once it gets tagged (CC @shashi), this will likely need updating. I might be able to help, but first some questions:

  • Are you interested in registering this sometime? If so, I might use it in GtkUtilities.jl.
  • Given the existence of Immerse.jl, what do you think of removing the Winston dependency? I went with Gadfly mostly because it is more actively maintained.

Not working

Is this package still being developed?
It doesn't seem to work for me on Fedora 22 with julia 0.4.5. I simply get either a completely black or completely transparent window depending on which window manager I use.

typo? missing ';' in README.md

using GtkInteract

w = mainwindow(title="Simple test")
n = slider(1:10, label="n")
m = slider(11:20, label="m")
cg = cairographic();           # without the trailing ';', a StackOverflowError occurs
                               # because it does not know how to show(cg)

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.