This would indeed be useful, the only reason it hasn't been done already is
that it's much easier said than done :)

It could be implemented by giving widgets a function equivalent to a copy
constructor, but I think it would be better if this was combined with a way
to serialize the contents of a widget. Each widget would have functions to
load and save its contents to a buffer, and the pgDup for widgets would
copy using those functions.

A spiffy way to implement this would be a server request to save a tree of
widgets into a widget template. This could make it very easy to make user
settings persistent, or it could be used in WT editors.


On Thu, Dec 05, 2002 at 02:23:27PM +0100, Philippe Ney wrote:
> Hello Micah,
> 
> The implementation of the pgDup function doesn't allow to duplicate widgets
> other than string's ones.
> It could be useful to have pgDup act on every widget's type. For example, to
> use it with the widget template support. For a list of items, you define only
> one item in the template and when you create the list in the application,
> you juste have to duplicate the already defined listitem widget to create it.
> 
> What do you think about this?
> -philippe
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/pgui-devel

-- 
Only you can prevent creeping featurism!


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to