Editable Widgets stuff
Christian Stocker <chregu-zfZwwz/hh/[email protected]> 10 Mar 2003 11:43:24 +0100
| Newsgroups | gmane.comp.cms.oscom.twingle.devel |
|---|---|
| Organization | Bitflux GmbH |
| Message-ID | <[email protected]> |
Just commited a new interface for editable widgets (midaseditor,
sourceeditor, etc...)
The following is subject to changes....
We now have a viewerwidget, which contains the tabs and the content of
those. All viewerwidgets should extend from
genericviewer.xml#genericviewerbinding
so this would look like
<binding id="articleviewerbinding"
extends="genericviewer.xml#genericviewerbinding">
for the articleviewer (in editorbindings.xml)
then <xul:tabs> needs an oncommand event:
<xul:tabs
oncommand='document.getBindingParent(this).onTabsClick(this);'>
in <xul:tabpanel>s, we need to make a widget for every "content" of a
panel:
<xul:tabpanels>
<xul:tabpanel flex="1">
<xul:midaseditor flex="1" />
</xul:tabpanel>
<xul:tabpanel flex="1">
<xul:sourceeditor flex="1" />
</xul:tabpanel>
etc..
each of these widgets should inherir from
genericviewer.xml#genericwidget and have to provide a method called
"update". This method has to do the update of the content of the method.
In sourceeditor this looks just like the following:
<method name="update">
<body>
this.content = this.parentWidget.content;
return true;
</body>
</method>
Furthermore, we need a property called "content". It has to have a
reader (parentWidget will read it) and can have a setter, if you want
use that internally (as above):
<property name="content">
<getter>
return(this.sourceFrame.value);
</getter>
<setter>
this.sourceFrame.value = val;
</setter>
</property>
That's about it, what's needed as public methods/properties for the
moment
chregu
--
christian stocker | bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | chregu-zfZwwz/hh/[email protected] | gnupg-keyid 0x5CE1DECB