Application Approach



Gtk-Developers,

I am somewhat new to the GTK environment and have only started using/looking over the API a month ago. I am trying to write an application that amongst other things will allow the user to manipulate a series of icons in a workspace. For instance the application would start with nothing in the workspace, the user would then be able to add icons to the workspace. The user would be able to draw lines between the icons to make logical links between the icons. Also, the icons must be freely movable in the workspace. Later once finished moving these icons and making these links the user will then be able to compile the workspace and receive the finished results in a custom file format that i wrote.

That is the overview the question that i have is about the overall approach to this project. I am thinking of using a GtkImage to display a GdkPixbuf which actually holds the contents of the workspace(icons,lines,nodes...). The Gtkimage is being displayed inside of a GtkDrawingArea, which catches events from the user.

First i would like to know if this is the correct approach according to the official GTK way. I am curious how to add one of my icons to the back pixbuf. Also, what are my options to actually allow the user to move the icons. Currently i am looking at using my own set of functions that check to see if the user clicked one of the icons already in the workspace then take appropriate action.

Any thoughts or input from the community would be great!

Thanks in advanced,
-chorlick



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