Re: Any *nix testers available out there, please? - script below
| From: | Steph | Date: | Mon, 25 Feb 2002 20:52:19 +0000 |
| Subject: | Re: Any *nix testers available out there, please? - script below | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1336@lists.php.net to get a copy of this message | ||
Aha! I'm doing the right stuff but asking the wrong questions .. thanks, I'll check out
what you did for c)
:)
----- Original Message -----
From: "Gregory Kaczmarczyk" <casmar@mac.com>
To: "Steph" <steph.fox@btinternet.com>
Cc: "PHP-GTK gen" <php-gtk-general@lists.php.net>
Sent: Monday, February 25, 2002 8:50 PM
Subject: Re: [PHP-GTK] Any *nix testers available out there, please? - script below
> a) items 0-5 are selected & the following output in terminal:
> Item 5
> Item 0
> Item 1
> Item 2
> Item 3
> Item4
>
> b) Maintaining the 0-5 selection, I selected 7. Items 5-7 got selected &
> got the following output:
> Item 7
> Item 6
> Selecting 0, I selected 7 & dragged to 5 & received the following:
> Item 7
> Item 6
> Item 5
>
> c) Selecting 5, then selecting 7 & dragging to 4, I got the following:
> Item 7
> Item 6
> Item 4
> Selecting 0, then selecting 7 & dragging to 4, I got the following:
> Item 7
> Item 6
> Item 5
> Item 4
>
> d) & e) What is drag extended?
>
> Steph wrote:
>
> >I need to know what happens when:
> >a) 5 is selected and the mouse button immediately released,
> >b) a number below 5 is selected and then dragged up to 5 and released,
> >c) a number below 5 is selected and then dragged beyond 5 and released,
> >d) a number above 5 is selected and then drag extended to 5 and released,
> >e) a number above 5 is selected and the drag extended below 5 and released.
> >
> >I'm afraid all these need to be single runs to get the start_selection() working. Had
> >to put a counter on it to avoid fails.
> >
> >& btw it does nothing AT ALL on doze.
> >
> ><?
> >dl("php_gtk." . (strstr(PHP_OS, "WIN") ? "dll" :
> >"so"));
> >$x = 0;
> >
> >function echo_it($list, $selection, &$x) {
> > global $item;
> > if($x < 1) {
> > $list->start_selection();
> > }
> > $x++;
> > if($selection == $item[5]) $list->end_drag_selection();
> > $label = $selection->child;
> > echo $label->get()."\n";
> >}
> >$window = &new GtkWindow();
> >$window->set_position(GTK_WIN_POS_CENTER);
> >$window->connect_object("destroy", array("gtk",
> >"main_quit"));
> >
> >$box = &new GtkVBox();
> >$window->add($box);
> >$hbox = &new GtkHBox();
> >$box->pack_start($hbox);
> >
> >$scrollwin = &new GtkScrolledWindow();
> >$scrollwin->set_policy(GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
> >$scrollwin->set_usize(150, 300);
> >$hbox->pack_start($scrollwin);
> >
> >$list = &new GtkList();
> >$list->set_selection_mode(GTK_SELECTION_EXTENDED);
> >for ($i = 0; $i < 100; $i++) {
> >$item[] = &new GtkListItem("Item $i");
> >$item[$i]->show();
> >}
> >$list->append_items($item);
> >$list->connect('select-child', 'echo_it', &$x);
> >$scrollwin->add_with_viewport($list);
> >$list->set_focus_vadjustment($scrollwin->get_vadjustment());
> >$scrollwin->show_all();
> >
> >$button = &new GtkButton('Close');
> >$button->connect_object('clicked', array('gtk',
> >'main_quit'));
> >$box->pack_end($button);
> >$box->show_all();
> >
> >$window->show_all();
> >gtk::main();
> >?>
> >
> >
> >
> >
>
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>