| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to you under the Apache License, |
| Version 2.0 (the "License"); you may not use this file except in |
| compliance with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <Frame title="MenuBar Test" maximized="false" preferredWidth="320" preferredHeight="240" |
| styles="{padding:{top:0, left:4, bottom:4, right:4}, showWindowControls:true}" |
| xmlns:bxml="http://pivot.apache.org/bxml" |
| xmlns:content="org.apache.pivot.wtk.content" |
| xmlns="org.apache.pivot.wtk"> |
| <menuBar> |
| <MenuBar> |
| <MenuBar.Item buttonData="File"> |
| <Menu> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:ButtonData text="New"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:ButtonData text="Open"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:ButtonData text="Close"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:ButtonData text="Close All"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| <Menu.Section> |
| <Menu.Item enabled="false"> |
| <buttonData> |
| <content:ButtonData text="Save"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:ButtonData text="Save As"/> |
| </buttonData> |
| |
| <Menu> |
| <Menu.Section> |
| <Menu.Item buttonData="JPEG"/> |
| <Menu.Item buttonData="PNG"/> |
| <Menu.Item buttonData="GIF"/> |
| <Menu.Item buttonData="PDF"/> |
| </Menu.Section> |
| </Menu> |
| </Menu.Item> |
| </Menu.Section> |
| </Menu> |
| </MenuBar.Item> |
| |
| <MenuBar.Item buttonData="Edit"> |
| <Menu> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Undo" |
| keyboardShortcut="CTRL-Z"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Redo" |
| keyboardShortcut="SHIFT-CTRL-Z"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Cut" |
| keyboardShortcut="CTRL-X"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Copy" |
| keyboardShortcut="CTRL-C"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Paste" |
| keyboardShortcut="CTRL-V"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Delete" |
| keyboardShortcut="DELETE"/> |
| </buttonData> |
| </Menu.Item> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Select All" |
| keyboardShortcut="CTRL-A"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| </Menu> |
| </MenuBar.Item> |
| |
| <MenuBar.Item buttonData="View"> |
| <Menu> |
| <Menu.Section> |
| <bxml:define> |
| <ButtonGroup bxml:id="view"/> |
| </bxml:define> |
| <Menu.Item buttonData="Large" toggleButton="true" buttonGroup="$view" selected="true"/> |
| <Menu.Item buttonData="Medium" toggleButton="true" buttonGroup="$view"/> |
| <Menu.Item buttonData="Small" toggleButton="true" buttonGroup="$view"/> |
| </Menu.Section> |
| <Menu.Section> |
| <Menu.Item> |
| <buttonData> |
| <content:MenuItemData text="Refresh" |
| keyboardShortcut="F5"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| </Menu> |
| </MenuBar.Item> |
| |
| <MenuBar.Item buttonData="Window"> |
| <Menu> |
| <Menu.Section> |
| <Menu.Item buttonData="Minimize"/> |
| <Menu.Item buttonData="Maximize"/> |
| </Menu.Section> |
| </Menu> |
| </MenuBar.Item> |
| |
| <MenuBar.Item buttonData="Empty"/> |
| |
| <MenuBar.Item buttonData="Help"> |
| <Menu> |
| <Menu.Section> |
| <Menu.Item action="about"> |
| <buttonData> |
| <content:MenuItemData text="About" keyboardShortcut="F1"/> |
| </buttonData> |
| </Menu.Item> |
| </Menu.Section> |
| </Menu> |
| </MenuBar.Item> |
| |
| </MenuBar> |
| </menuBar> |
| |
| <Border styles="{padding:8}"> |
| <Form> |
| <Form.Section> |
| <TextInput bxml:id="textInput1" Form.label="Field 1"/> |
| <TextInput bxml:id="textInput2" Form.label="Field 2"/> |
| <TextInput bxml:id="textInput3" Form.label="Field 3"/> |
| </Form.Section> |
| </Form> |
| </Border> |
| </Frame> |