GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Dec 26, 2014 11:32 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Custom Widget: PupWin
PostPosted: Wed Dec 26, 2007 6:16 pm 
Offline
Never Seen the Sunlight

Joined: Thu Jun 14, 2007 11:02 pm
Posts: 923
Location: Falun, WI USA
Hello,
as I posted about before ( http://www.gtkforums.com/viewtopic.php?t=938 ), I've been writing a widget similar to the GtkCombo widget, except mine is just an entry, not an entry with a button. It catches a "keyletter" signal when the specified letter is typed at the entry, and that's the equivalent of the GtkButton in a GtkCombo.

The sources are here:
http://tdreblen.googlepages.com/pupwin.c
http://tdreblen.googlepages.com/pupwin.h

An example program is here:
http://tdreblen.googlepages.com/example.c

I would like people to test it and let me know if there are any problems. Also please let me know if it seems too specific, because I did write it for a project that I'm doing by myself. Also, for the text_column property, I didn't know what I should put for the maximum, is there a max amount of columns that can be put in a tree view that should be put there?

Lastly, I licensed it under LGPL v2 like GTK so it would be compatible, the source gives a URL for the LGPL text, but here it is also:
http://www.gnu.org/licenses/old-licenses/library.txt

I hope this is useful for someone. Thank you...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 6:19 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Just as an FYI, though I'm sure you're already aware, but is sounds similar to http://library.gnome.org/devel/gtk/unstable/GtkEntryCompletion.html.

Is this the intention? To implement a sort of autocomplete? Or just to have a single letter trigger the combo box regardless of what's inside?

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 8:12 pm 
Offline
Never Seen the Sunlight

Joined: Thu Jun 14, 2007 11:02 pm
Posts: 923
Location: Falun, WI USA
Yes, I was aware of the entry completion widget, and yes, my intention was to make a sort of auto complete. However, my intention was to allow you to type something in (e.g. "A:") then have suggestions in relation to the 'A' char, whereas with the entry completion, I don't think you can have a prefix (e.g. have something like "A:Atom B:") and have it pop up for the 'B' that was pressed, not just look for entries that start with 'A:At...' then complete from there.
I wrote this for a Taxonomy program that I'm writing, and I wanted to have a list of predefined kingoms, phyla etc. so my "keyletter" callback looks for K, P, etc. then loads a list of the proper classifications. This was the purpose it was written, and that's why I asked if it seemed to specific.
I appreciate your comment, thank you...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group