[Y-devel] Suggestion: View-pane
James Harr james at grickle.org
Thu Oct 28 03:57:19 BST 2004
I like the idea, but I must bring up a couple points at least to discuss.
Generally every different *ML has a different idea on how you are suppose to
position and size text/image objects. Trying to generalize that into
something that all widgets can use could be very painfull and not worth the
effort. When you look at HTML at its bare bones it's really easy, a string of
text with some formatting options. However when you get into things like
tables, divs, and _layers_, etc. Drawing html can get rather complex. Add in
things like javascript and you really have to do several things: convert HTML
to WhateverML to display it and either make a way to add/remove/modify things
on the display pane or to be forced to re-send the WhateverML and redraw the
whole thing.
Generalizing things is a good idea, but I think an HTML widget would be best
left to the end application to draw through a canvas widget. Like "draw
dropdown box here, draw a rectangle with this color in it, fill put this
image here..."
Having a widget that draws things like HTML also brings complications in the
form of how well the widget draws it, if the converter is built into the
server or the Y++ libraries, then everyone will be limited by that one
widget. Now IIRC, gecko is windowing system independent (or could be adapted
easily), and is being refined the most at the moment.
I might be misunderstanding your idea too. I think having a nice general text
format drawer for canvas widgets would be nice though. You could feed it a
stream of text with things like font face, size, weight, and and some
dimensions that limit where it can draw the text. That would be a very nice
utility taking a lot of the pain out of drawing text on canvas widgets. Then
it'd be up to the application to determine where and how it is drawn.
I do like your idea, I just have to be the devil's advocate :)
Regards,
James
On Wednesday 27 October 2004 7:50 pm, Alza wrote:
> Hi,
>
> I am not sure if it is possible or practical but I think a view pane
> that can display data from any source ie text or HTML format would make
> a good idea for a widget.
>
> The source file, whether it is a text file or web page, is read into a
> stream. If there is any formatting in the source ie bold, tab etc. It is
> added to the stream as a command that is understood by the widget
>
> The view pane reads the stream and displays it whether it is a
> formatting command or text character.
>
> I think the benefit of this would be that rather than half a dozen
> different widgets that displays different kind of data, there is only
> one which is easy to maintain.
>
> If anybody has any other ideas about expanding this or reasons why this
> would not be practice, I would be grateful for the posts.
>
> Thanks
>
> Alza.
--
James Harr <james at grickle.org>
https://www.grickle.org/
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved