\hypertarget{external_elm_panes_8edc-example}{}\section{external\+\_\+elm\+\_\+panes.\+edc}
This example shows E\+X\+T\+E\+R\+N\+A\+L elementary panes in action.


\begin{DoxyCodeInclude}
1 collections \{
2    /* tell edje that we are going to use elementary external parts */
3    externals \{
4       external: "elm";
5    \}
6    
7    /* those groups are the buttons used as content for the panes */
8    group \{ name: "button1";
9       parts \{
10          part \{ name: "btn";
11             type: EXTERNAL;
12             source: "elm/button";
13             description \{ state: "default" 0.0;
14                params.string: "label" "Left";
15             \}
16          \}
17       \}
18    \}
19    group \{ name: "button2";
20       parts \{
21          part \{ name: "btn";
22             type: EXTERNAL;
23             source: "elm/button";
24             description \{ state: "default" 0.0;
25                params.string: "label" "Top";
26             \}
27          \}
28       \}
29    \}
30    group \{ name: "button3";
31       parts \{
32          part \{ name: "btn";
33             type: EXTERNAL;
34             source: "elm/button";
35             description \{ state: "default" 0.0;
36                params.string: "label" "Right";
37             \}
38          \}
39       \}
40    \}
41 
42    /* this is the vertical panes */
43    group \{ name: "panes2";
44       parts \{
45          part \{ name: "panes";
46             type: EXTERNAL;
47             source: "elm/panes";
48             description \{ state: "default" 0.0;
49                params \{
50                   bool: "horizontal" 1;
51                   string: "content left" "button2";
52                   string: "content right" "button3";
53                \}
54             \}
55          \}
56       \}
57    \}
58    
59    group \{ name: "main";
60       /* set a min window size */
61       min: 300 400;
62 
63       parts \{
64          part \{ name: "bg";
65             type: RECT;
66             description \{ state: "default" 0.0;
67                color: 255 255 255 255;
68             \}
69          \}
70 
71          part \{ name: "title";
72             type: TEXT;
73             effect: SOFT\_SHADOW;
74             description \{ state: "default" 0.0;
75                color: 255 255 255 255;
76                color3: 70 70 70 70;
77                text \{
78                   text: "Elementary Panes";
79                   font: "Sans";
80                   size: 16;
81                   align: 0.5 0.0;
82                \}
83             \}
84          \}
85 
86          /* first panes (horiz) */
87          part \{ name: "panes1";
88             type: EXTERNAL;
89             source: "elm/panes";
90             description \{ state: "default" 0.0;
91                rel1.offset: 0 35;
92                rel2.offset: 0 -45;
93                params \{
94                   string: "content left" "button1";
95                   string: "content right" "panes2";
96                \}
97             \}
98             description \{ state: "swapped" 0.0;
99                inherit: "default" 0.0;
100                params \{
101                   string: "content left" "panes2";
102                   string: "content right" "button1";
103                \}
104             \}
105          \}
106 
107          /* button used to swap the content of the panes1 */
108          part \{ name: "swap\_button";
109             type: EXTERNAL;
110             source: "elm/button";
111             description \{ state: "default" 0.0;
112                rel1 \{
113                   relative: 0.0 1.0;
114                   offset: 0 -40;
115                \}
116                params \{
117                   string: "label" "Swap & back";
118                \}
119             \}
120          \}
121       \}
122 
123       programs \{
124          /* when button is pressed set the 'swapped' state */
125          program \{ name: "swap";
126             signal: "clicked";
127             source: "swap\_button";
128             action: STATE\_SET "swapped" 0.0;
129             target: "panes1";
130             after: "go\_back";
131          \}
132          /* after 1 second return to the 'default' state */
133          program \{ name: "go\_back";
134             in: 1.0 0.0;
135             action: STATE\_SET "default" 0.0;
136             target: "panes1";
137          \}
138       \}
139    \}
140 \}
\end{DoxyCodeInclude}
 