Neural Net



Hey,

I'm writing a program to put a fairly complicated GUI on a simple neural network. What I would like is to be able to show nodes in a different color depending on how active they are, to draw links between nodes, to drag nodes onto an "activation" window (or section of window) to activate them continuously, and to be able to alter the weight of this link by clicking on it. I'm a newbie to GTK+, but I've been spending a couple of days looking over the gtkmm documentation. I'm not sure I can do all of the above in GTK+, and I wanted to see what those more experienced than I thought.

I think the best approach might be to put the nodes of the net in a DrawingArea widget. That way I can put the links in the picture, and I can figure out what a user clicked on (clumsily) by reading the location of the button_press_event. The problem is that if I want to put a piece of text on that DrawingArea widget, how do I do it? If I put the text in a button or something like that, Pango takes care of things. But to put text in a drawing area, I'd have to generate the letters myself. I'm too lazy to want to do that.

Just the same, I can't think of any of the other widgets in GTK+ to make things easier for me. If I could figure out a way to represent links as buttons, then this would be easier, but I'd want to be able to lay out the nodes as I chose. I think this would be doable, but ugly, using a Table widget, with each cell being a pixel? If I could pull that off, is there a way to change the color of a button widget?

Like I said, I'm not sure GTK+ and this project are a match made in heaven. Just the same, I'd like very much to use GTK+ for it. Are there tricks to this library that I don't know that would make this job easier?

Thanks in advance,
Ethan Glasser-Camp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]