Creating Devices with Pages
In general devices with pages consist of a number of SurfaceGroups. Each SurfaceGroup has its own ShowValue which has to correspond with the State value of a button in order to be displayed. It is possible to group buttons and to let them behave like radio buttons. Therefore you have the possibility to use as many pages as you like.
Creating the Radio Button Group
We recommend that you start off by creating a SurfaceGroup for your radio buttons. This is done by dragging a SurfaceGroup module (XTC Special/Surface Kit) onto the main panel. Add one button of the type Button2 (XTC Special/Controls) for each page you want to create to this group.
Open the Pad Menu displaying the Variable List (In the Pads menu switch to the Variable List using the 'Var' button ) and adjust the State variable of each button to a different value. Keep this number in mind since you need it again for the corresponding page. We recommend that you name the buttons according to its State value.
Now all buttons need to be interconnected so they can notify each other when the state (active/inactive) of one button has been changed. This can be achieved by connecting the 'Val' Pad of each button to the 'Val' Pad of the first button.
Creating a Page
Now you can start off creating the content of the first page. In order to do this first create a SurfaceGroup for the page and rename it. Make sure, that the ViewTree Group flag in the GO Attributes is active and the ClipChildren and Custom size flags are inactive.
Add the desired surface elements to the group by dragging them from the FileBrowser into the SurfaceGroup in the Project Explorer.
Surface elements can be arranged and connected in the SurfaceGroups in the same manner as when designing a normal device surface.
In the GO Attributes of the SurfaceGroup containing the page elements select both Custom size flags and deselect the ViewTree Group flag. Adjust the dimensions of the surface and the page in Edit mode.
Assigning the ShowValue
Now the ready designed page has to receive its ShowValue. This is done in the Move mode while you are in Surface View. Right-Click on the SurfaceGroup of your page in the Project Window and select 'Create ShowValue Var'.
If the SurfaceGroup is not already selected in the Project Explorer do this now and open the Pad menu displaying the Variable List.
Assign a number to the ShowValue variable which corresponds to the State variable of the button with which you want to open the page.
Connecting the Radio Button with the Page
Now connect the 'Val' Pad of the button with the 'Show' Pad of the page.
Creating further pages
You can create the other pages by repeating the last three steps. It is important to hide the first page by selecting the next button on your surface in Use mode. It might be easier to start off creating the rest of the pages by copying the first page.
The Page Example
For your convenience we provided a little example how to use pages.
In your Scope /DP directory you can find a module called 'Page
Example' in the 'Examples/Surface Design/' folder.
Drag this module into the Project Window.

Basically this module is just an 'Empty Effect' to which three pages were added . In this example the pages have no controllers just some comments.
This is helpful in order to be able to distinguish the page which is displayed.

 |
The pages are turned by buttons, in this case the button2 is used. This button is a two-state button that also indicates when the mouse is over it.
In the picture the first button is inactive, the third one is active and the mouse is moving over the second one. |
The button consists of four different GOs - each of them can be edited. The text (Text), the inactive button (BTInvalid), the mouse-over-highlight
(BTHover) and the active button (BTO). |  |
 |
What makes the button really interesting is that multiple buttons can be grouped. Via the 'State' pad you can assign a specific value to each
button which will be send out (over the 'Val' pad) when it is active. This value should be different for each button - like 0, 1 and 2 for three
buttons/pages. |
As you can see in the following window a page is very similar to a control group - it is a SurfaceGroup module that acts as a folder and
holds a group of GOs. In the Project Explorer you can see that very clearly. In Edit mode you can select and edit this group as
any other group.Of course it is not important whether this group consists of controllers, text or other GOs.

This also means that any control or close group can be transformed into a page.
 |
If you take a look at the Pad list of your page you will see that it has a 'Show' pad. Up to this point it is just a normal show pad that hides the page when its
value is set to '0' and shows it when set to '1'. But two states are not enough to toggle between more than two pages. |
So close the surface and go into Surface View. Right click your page - you might like to assure in the project Explorer that you are really
focusing the right folder - and select 'Create ShowValue Var'. |
 |
The last step added a variable to the 'SurfaceGroup'. To see it you need to toggle to the Variable list in the Pad list window (by using the 'Vars' button). You should now assign the same value to this variable as to the appropriate button. |  |
 |
When you have assigned a specific pair of numbers to each pairs of 'pages and buttons' you should interconnect all the 'Val' Pads of the buttons with the equivalent 'Show' pads of the pages. Also the 'Val' Pads of each button should be connected to that one of the first button. |
We hope that we have provided a easy to understand example that will help you to use this technique for your own devices.
When you have followed all these steps your device should have fully functional pages then. You can connect the controls on your pages with the
designated pads as usual.
|