Mercurial > libervia-backend
diff frontends/src/tools/xmlui.py @ 1473:675e0e9f1653
core , privmitivus (xmlui): add jidInput handling, with a simple String for now
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 18 Aug 2015 10:35:44 +0200 |
parents | 069ad98b360d |
children | 90130847a0a8 |
line wrap: on
line diff
--- a/frontends/src/tools/xmlui.py Tue Aug 18 10:04:47 2015 +0200 +++ b/frontends/src/tools/xmlui.py Tue Aug 18 10:35:44 2015 +0200 @@ -83,34 +83,49 @@ often called Edit in toolkits """ + pass + + +class JidInputWidget(Widget): + """Input widget wich require a string + + often called Edit in toolkits + """ + pass class PasswordWidget(Widget): """Input widget with require a masked string""" + pass class TextBoxWidget(Widget): """Input widget with require a long, possibly multilines string often called TextArea in toolkits """ + pass class BoolWidget(Widget): """Input widget with require a boolean value often called CheckBox in toolkits """ + pass class IntWidget(Widget): """Input widget with require an integer""" + pass class ButtonWidget(Widget): """A clickable widget""" + pass class ListWidget(Widget): """A widget able to show/choose one or several strings in a list""" + pass class Container(Widget): @@ -129,6 +144,7 @@ class PairsContainer(Container): """Widgets are disposed in rows of two (usually label/input) """ + pass class TabsContainer(Container): @@ -136,13 +152,16 @@ Often called Notebook in toolkits """ + pass class VerticalContainer(Container): """Widgets are disposed vertically""" + pass class AdvancedListContainer(Container): """Widgets are disposed in rows with advaned features""" + pass class Dialog(object): @@ -176,10 +195,12 @@ class MessageDialog(Dialog): """Dialog with a OK/Cancel type configuration""" + pass class NoteDialog(Dialog): """Dialog with a OK/Cancel type configuration""" + pass class ConfirmDialog(Dialog): @@ -194,6 +215,7 @@ class FileDialog(Dialog): """Dialog with a OK/Cancel type configuration""" + pass class XMLUIBase(object): @@ -386,6 +408,9 @@ elif type_=="string": ctrl = self.widget_factory.createStringWidget(_xmlui_parent, value, self._isAttrSet("read_only", node)) self.ctrl_list[name] = ({'type':type_, 'control':ctrl}) + elif type_=="jid_input": + ctrl = self.widget_factory.createJidInputWidget(_xmlui_parent, value, self._isAttrSet("read_only", node)) + self.ctrl_list[name] = ({'type':type_, 'control':ctrl}) elif type_=="password": ctrl = self.widget_factory.createPasswordWidget(_xmlui_parent, value, self._isAttrSet("read_only", node)) self.ctrl_list[name] = ({'type':type_, 'control':ctrl})