Re: tree widget

Magnus Lie Hetland <[email protected]> Fri, 3 Jan 2003 16:38:37 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
ionutz <[email protected]>:
>
> Hi,
> 
> Happy New Year !
> 
> I'm new to the anygui but I like what I see :-)

:)

> I'd like to use it to do cross-development on Linux (using GTK) and
> Windoze (using native Win32).

That should definitely be possible.

(I feel I should warn you that Anygui is far from stable/finished
yet, though...)

> I intend to do somthing like the "Where is it!" application, but
> I'll need at least the tree widget. I see anygui doesn't have it
> yet, so the best thing I can do is to implement it

Great :)

> (if nobody is already working on it) :-)

In theory, we are. It's planned for release 0.2a2. We haven't agreed
on/designed the API for it yet, though.

> Can somebody give me some points on what should I use as an example
> to wrapp the tree widget from GTK and Win32 ?

Hm. I think you should take a look at the modules mswgui.py (or
possibly dwgui.py) and gtkgui.py for ideas on how this works.

If you want to put the TreeWidget code in your own program (for now),
you can test which backend is running with the backend() function.

> I don't intend to use
> other backends for now, so I'll focus only on the above two.
> 
> Is there any doc with coding style and best practices for the
> project ?

There is, but it's not completely updated. See the nondist package in
CVS. Under irfc, you'll find a file called irfc-0005.txt -- the Anygui
Style Guidelines.

It mentions the use of underscores in internal names -- we have now
switched to mixed case for all names except environment variables and
uppercase constant names.

Anyway, I suggest taking a look at the source, including the backends.

> TIA,
> 
> Ionutz

-- 
Magnus Lie Hetland
http://hetland.org


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf