Re: [gtk-list] RE: GTK Markup Language
- From: Phil Dawes <philipd parallax co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] RE: GTK Markup Language
- Date: Thu, 09 Apr 1998 10:56:34 +0100
I've split the animation and markup lanugage thread. Hope nobody minds.
Tony Gale wrote:
>
> On 09-Apr-98 Phil Dawes wrote:
> > Perhaps a markup language written in XML could be a good idea?
>
> I don't believe anyone is, although a couple of us have tentatively
> discussed the idea on irc. I'm not an XML person, but it would need
> to be:
> 1. compact
> 2. human readable - and writeable!
> 3. flexible enough to describe a complete interface (with
> widget attributes, styles, etc.)
>
Of course. I'm not sure myself if XML is the right way to go. It depends
on how much benefit you get from ready-to-go parsers compared to the
added constraints of being restricted by the markup rules.
I've just had a look at how VisualBasic does this (a VB .frm file is
just a text file with the Gui description at the top and the callbacks
written in basic at the bottom)
Here's an example (form with a textbox and button in it):
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7245
ClientLeft = 60
ClientTop = 345
ClientWidth = 8115
LinkTopic = "Form1"
ScaleHeight = 7245
ScaleWidth = 8115
StartUpPosition = 3 'Windows Default
Begin VB.TextBox detailvin
Height = 375
Left = 1440
TabIndex = 24
Text = "SAXXHELLOMUM12345"
Top = 1440
Width = 1935
End
Begin VB.CommandButton GetClaimDetails
Caption = "GetClaimDetails"
Height = 495
Left = 840
TabIndex = 23
Top = 4080
Width = 1935
End
End
Of course the GUI in VB is a lot less sophisticated than gtk, there's no
auto layout - everything is specified in static coordinates, but the
general idea is sound and easy to read and change.
The areas that I forsee needing special attention are:
- How to represent the different parameters passed to containers when
nesting children in them
- How to describe signals (seeing as the callback code won't be in the
description, and could be in any language.)
In VB, callbacks are basically specially named functions - this is a bit
crap and not really language-portable.
Cheers,
Phil.
--
_______________________________________________________________________
Phil Dawes | My opinions are my own
WWW: err.. temporarily non-existant | and nothing to do with
Email: philipd@parallax.co.uk | my employer.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]