From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3af4bf9fdc8875b,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-31 05:37:31 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: karlran1234@yahoo.com (Karl Ran) Newsgroups: comp.lang.ada Subject: Getting started with GtkAda & Glade Date: 31 Aug 2001 05:37:31 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 62.104.223.81 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 999261451 12506 127.0.0.1 (31 Aug 2001 12:37:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 31 Aug 2001 12:37:31 GMT Xref: archiver1.google.com comp.lang.ada:12604 Date: 2001-08-31T12:37:31+00:00 List-Id: Hi there, I'm trying to created a GUI with GtkAda and Glade(the RAD tool). It's just one window with one horizontal scale widget (Class GtkHScale); Glade create this file (window1_pkg-callbacks.adb) for me: ----------------------------------------------------------------- with System; use System; with Glib; use Glib; with Gdk.Event; use Gdk.Event; with Gdk.Types; use Gdk.Types; with Gtk.Accel_Group; use Gtk.Accel_Group; with Gtk.Object; use Gtk.Object; with Gtk.Enums; use Gtk.Enums; with Gtk.Style; use Gtk.Style; with Gtk.Widget; use Gtk.Widget; with Ada.Text_IO; package body Window1_Pkg.Callbacks is use Gtk.Arguments; ------------------------------------ -- On_Hscale1_Motion_Notify_Event -- ------------------------------------ function On_Hscale1_Motion_Notify_Event (Object : access Gtk_Widget_Record'Class; Params : Gtk.Arguments.Gtk_Args) return Boolean is Arg1 : Gdk_Event := To_Event (Params, 1); begin Ada.Text_IO.Put_Line("Well, the user moved the slider but I don't know the position :("); return False; end On_Hscale1_Motion_Notify_Event; end Window1_Pkg.Callbacks; ----------------------------------------------------------------- What I like to accomplish is to print the current value(position) of the slider while the user is moving it. Anyone know what have to be placed inside the Put_Line-brackets? Karl PS: This is the XML Glade source... Menu2 menu2 src pixmaps Ada 95 False True GtkWindow window1 window1 GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True False GtkHScale hscale1 True motion_notify_event on_hscale1_motion_notify_event Fri, 31 Aug 2001 12:16:08 GMT True GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS 0 1 42 1 0 0