Forum: Ruby-Gnome 2 map-like thing with custom location marking

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Marko V. (Guest)
on 2009-01-28 23:11
before I say anything else, I'd like to take this oppertunity to say hi
to everyone (at least all who'll read this) since I'm new here.

now on to business!
here's the thing:
I'm quite new to ruby and newer still to gtk (not a promising combo, but
hey.. we all have to start somewhere, right? .... right??) so my
knowledge of the gtk api isn't all that good.

what I'm trying to do is basically this:
I'd like to make an application that would (among other things) take an
image file (let's say the image is some sort of a map) and display it,
and allow the user to add markings to it (kind of like wikimapia does,
for instance)
so basically you click on the image, and a dialog prompts you for
certain information that you wish to associate with that locations, and
once that's done, that location gets that little rectangle thingy that
signifies that it's marked. and somewhere on the side there's a list of
all those markings.

now the problem is that, like I said, I'm not that familiar with gtk api
so I don't know how to do that and which widgets and objects to use.
(for that map and mark thing)
any kind of help and/or suggestion would be greatly appriciated
Guillaume C. (Guest)
on 2009-01-29 10:02
(Received via mailing list)
Welcome!

> now the problem is that, like I said, I'm not that familiar with gtk api
> so I don't know how to do that and which widgets and objects to use.
> (for that map and mark thing)
> any kind of help and/or suggestion would be greatly appriciated

There are two answers:

- tell you what widgets and objects to use. Quite fast for you but not
necessarily for me, and doesn't teach you much about gtk overall big
picture, way of doing things, etc.

- suggest you to read a gtk tutorial. Quite fast for me but not for
you, but will teach you a lot on gtk, so pretty good in the mid/long
term.

I've chosen the second solution :)

http://library.gnome.org/devel/gtk-tutorial/stable/

Enjoy the reading :)

--
Guillaume C. - http://zarb.org/~gc/
Dobai-Pataky Bálint (Guest)
on 2009-01-29 10:22
(Received via mailing list)
:)
Dobai-Pataky Bálint (Guest)
on 2009-01-29 10:44
(Received via mailing list)
attached is something to start from,
a guide for the reading.
Andrew S. Townley (Guest)
on 2009-01-29 11:18
(Received via mailing list)
For something like this, you'd be better off looking at the goocanvas
API and examples.  I've done something similar in the past, and
goocanvas is going to take care of a lot of the gruntwork for you vs.
doing it by hand as you have below.

Check out the API (unfortunately not published on the Hiki as it's
experimental at the momoment), but it's similar in spirit to the
GnomeCanvas library (which is there).  If you pull the full source
package, you can see the examples which will help get you going (but you
might have to build it yourself--not sure as I haven't worked with it
since it's been included in the full distribution.

HTH,

ast

On Thu, 2009-01-29 at 10:43 +0200, Dobai-Pataky Bálint wrote:
> > hey.. we all have to start somewhere, right? .... right??) so my
> > signifies that it's marked. and somewhere on the side there's a list of
> w.signal_connect("destroy"){Gtk.main_quit}
>     pc=c
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________ ruby-gnome2-devel-en mailing list 
removed_email_address@domain.invalid 
https://lists.sourceforge.net/lists/listinfo/ruby-...
--
Andrew S. Townley <removed_email_address@domain.invalid>
http://atownley.org
Marko V. (Guest)
on 2009-01-29 17:58
thanks a lot for your replies everyone

that goocanvas just hit the spot. I checked it out and tried it out a
bit and it seems like it just might be perfect for what I need.

as for that tutorial, I will check it out (eventually :P)
the thing is that I did work with gtk before a little,
so I'm not completely clueless about it, as I might have made myself
look.
it would seem that I declued myself a bit too much haha
(oh look, I just made up a new word... silly me)

anyways,
once again, thank you all, your help is much appreciated!

I will be sure to ask something when I get stuck again!
This topic is locked and can not be replied to.