GtkBasic currently supports Drag'n'Drop for Clists (lists that can display pictures and texts).
I have written some custom functions to simplify this, there is a demo included.
I did not try the drag'n'drop functionality of the native Gtk-functions that GtkBasic supports now.
So I cannot tell, if they are wrapped correctly or not.
However with the Clists you can build very comfortable Drag'n'Drop programs.

GtkBasic will not be in Puppy until we program utilities that make it a "must"
Barry has pointed out, that he wants to keep Dingo (Puppy4) as small as possible, and so just leaves in GtkDialog and Xdialog.

So GtkBasic must be installed in addition, but it certainly soon will be bundled with addons like ezpup.

The size is reasonable: 200 k compressed with upx, or 930 k uncompressed.
Plus some kb for examples or utilities like the file-selection dialog, that is written in GtkBasic.
It just depends on X, Gtk2, and libglade.
Those are usually already in Puppy.

I updated the Dotpup for Puppy 3 (which was reported to work in Puppy2, too).
And uploaded the sourcecode, too.

New:
Objectdestruction
In the past, the function gtk_destroyobject() did not work.
I now rewrote the internal reference-handling of the objects.

GtkBasic allows to handle 1000 Gtk-widgets at once.
If you need more, you first must destroy older ones, or you application crashes.

I could add support for more, but that increases memory-usage.
Tell me, when you need more.

IMPORTANT:
If you have an old application, that crashes now, please tell me.
I then will repackage it.
It will be sufficient, to remove lines using
gtk_destroyobject()
I had added that for tests in the past, but it had no function.
Now this could crash your app, if those objects still are needed.

For debugging I added:
gtk_dumpobjects()

This shows a list of all objects you created, and the length of the internal reference-list.
So you can see, if you properly destroyed objects.

This creates a button, where signalhandling is not added to libglade.
You can assign a new signaldetection like this:
gtk_singleclick("buttontest" )

When this button now is clicked, you can detect this in the mainloop.
To be able to avoid confusion with the standard (libglade) eventmessages, this function returns the widgetname modifed.
The returnvalue for the widget now has a leading "single-".

So to detect it, you would write:
if widget = "single-buttontest" then

This application makes use of it:
http://murga-linux.com/puppy/viewtopic.php?p=174389#174389

Using the latest gtkbasic, downloaded last week, I encounter a glitch with clists. The program is a menu editor that uses two clists and reads the icons that match the menu and applications from the normal locations in puppy 4.0. I can drag & drop from one clist to the other ok but if I drag a file from rox the program crashes hard with [Internal error] Memory error (SIGSEGV). It seems to be related to the type of image used for the icons. To verify it I modified the demo that comes with gtkbasic so it uses a png instead of the xpm images and it crashed in the same way. That png was created with mtpaint. When I used another png selected at random it did not crash. Very strange. I seem to recall that the latest gtkbasic was modified for drag and drop with xfe. Could this glitch be related to that?

I do not bundle both, as Puppybasic uses less memory, so it should be used for small scripts instead of Gtkbasic.

Clists now can return multiple selections:
alist = gtk_get_list_selections("mylist1")
this returns a list with the numbers of the selected rows.
There is no example available yet, it will come in the next update of the GtkBasic-Filer:
http://www.murga-linux.com/puppy/viewtopic.php?t=32575

It crashes when I hit the Apply button.
I originally noticed this because GTB-StructrEd does not load files.
I have installed puppybasic-2.6._________________Will
contribute: community website, screenshots, puplets, wiki, rss

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum