tkxml

T

Trans

Ok. How about any interest in creating Tk GUIs form an xml markup. Eg.

<Tk:Root name="test" title="Test">

<Tk:Frame name="menuframe">
<Tk:Menubutton name="filebutton" text="File"
underline="0">
<Tk:Menu name="filemenu" tearoff="false">
<Tk:_add
_1="command"
label="Open"
command="openDocument"
underline="0"
accel="Ctrl+O" />
<Tk:_add
_1="command"
label="Exit"
command="exitApplication"
underline="0"
accel="Ctrl+Q" />
</Tk:Menu>
<Tk:_pack side="left" />
</Tk:Menubutton>
<Tk:_pack side="left" />
</Tk:Frame>

<Tk:_bind
_1="Control-o"
_2="openDocument" />

<Tk:_bind
_1="Control-q"
_2="exitApplication" />

</Tk:Root>

T.
 
M

Martin DeMello

Ok. How about any interest in creating Tk GUIs form an xml markup. Eg.

Why not builder-style ruby markup?

[:Root, {:name => 'test', :title => 'test'},
[:Frame, {:name => 'menuframe'},
[:Menubutton, {:name => 'filebutton', :text => "File", :underline => 0}, ...

or even sexps

(Root [(name :test) (title "test")]
(Frame [(name :menuframe)]
(Menubutton [(name :filebutton) (text "File")]


martin
 
G

Gregory Brown

or even sexps

(Root [(name :test) (title "test")]
(Frame [(name :menuframe)]
(Menubutton [(name :filebutton) (text "File")]

Or even Ruby:

Root:)name => :test, :title => "test) do
Frame:)menuframe) do
Menubutton:)filebutton) { text "File" }
end
end
 
T

Trans

Ok. How about any interest in creating Tk GUIs form an xml markup. Eg.

Why not builder-style ruby markup?

[:Root, {:name =3D> 'test', :title =3D> 'test'},
=A0 [:Frame, {:name =3D> 'menuframe'},
=A0 =A0 =A0 =A0 =A0 [:Menubutton, {:name =3D> 'filebutton', :text =3D> "F= ile", :underline =3D> 0}, ...

or even sexps

(Root [(name :test) (title "test")]
=A0 (Frame [(name :menuframe)]
=A0 =A0 =A0 =A0 =A0 (Menubutton [(name :filebutton) (text "File")]

Sure one can do that. I just happen to have code laying around already
that already handles the xml. I wrote it long ago, thinking of
something like Glade, but for Tk instead of Gtk. I never used it
though. So I was just wondering if anyone wanted it.

I hear Tk is going to get a native look-and-feel face-lift by the way.
That could be interesting.

T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top