add viewport node, return ptr instead of ref for layout[id] to check wether is valid or not

This commit is contained in:
2017-03-02 21:40:36 +00:00
parent 75f1b96b4f
commit 8242db8815
5 changed files with 148 additions and 38 deletions

47
data/layout2.xml Normal file
View File

@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<root>
<layout id="popup">
</layout>
<layout id="main">
<border dir="col" wrap="0" width="100%" height="100%" pad="10" color="0">
<!--menu bar-->
<border width="100%" height="25" color=".2" dir="row"
flood-events="1" pad="0" margin="0 0 10 0">
<button-custom pad="5" dir="row" align="center">
<text text="File" font-face="arial" font-size="11"></text>
</button-custom>
<button-custom pad="5" dir="row" align="center">
<text text="Modify" font-face="arial" font-size="11"></text>
</button-custom>
<button-custom pad="5" dir="row" align="center">
<text text="View" font-face="arial" font-size="11"></text>
</button-custom>
<button-custom pad="5" dir="row" align="center">
<text text="Layers" font-face="arial" font-size="11"></text>
</button-custom>
</border>
<!--toolbar-->
<border width="100%" height="60" color=".2" dir="row"
flood-events="1" pad="5">
<button-custom color=".3" width="50" pad="5">
<icon icon="add"></icon>
</button-custom>
<button id="btn-popup" text="Do Something" margin="0 0 0 10" height="100%" width="100"/>
</border>
<!--central row-->
<node width="100%" height="100" pad="10 0 10 0" dir="row" grow="1">
<!--sidebar-->
<border color=".1" border-color=".4" thickness="1"
width="300" height="100%" margin="0 10 0 0"></border>
<!--viewport-->
<border grow="1" color=".1" pad="10">
<viewport grow="1"></viewport>
</border>
</node>
<!--status bar-->
<border color=".1" width="100%" height="50" dir="row" pad="10" align="center">
<text text="Status message" font-face="arial" font-size="11"></text>
</border>
</border>
</layout>
</root>