<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<?import javafx.scene.control.MenuButton?>
<?import javafx.scene.control.MenuItem?>
<AnchorPane fx:id="scenePane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="1300.0" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.bytevibe.hyperpoint.Controller">
   <children>
      <!-- 顶部菜单栏 -->
      <VBox layoutX="0" layoutY="0" prefHeight="50.0" prefWidth="1300.0" style="-fx-border-color: #cccccc; -fx-border-width: 0 0 1 0;">
         <children>
            <HBox spacing="5" style="-fx-padding: 5;">
               <children>
                   <!-- 文件菜单 -->
                   <MenuButton mnemonicParsing="false" text="文件">
                       <items>
                           <MenuItem mnemonicParsing="false" onAction="#onNewSlide" text="新建幻灯片" />
                           <MenuItem mnemonicParsing="false" onAction="#onOpenSlideFile" text="打开幻灯片" />
                           <MenuItem mnemonicParsing="false" onAction="#onSaveSlide" text="保存幻灯片" />
                           <MenuItem mnemonicParsing="false" onAction="#onExportSlide" text="导出幻灯片(PDF)" />
                       </items>
                   </MenuButton>

                   <!-- 页面菜单 -->
                   <MenuButton mnemonicParsing="false" text="页面">
                       <items>
                           <MenuItem mnemonicParsing="false" onAction="#onNewPage" text="新建页面" />
                           <MenuItem mnemonicParsing="false" onAction="#onDeletePage" text="删除页面" />
                           <MenuItem mnemonicParsing="false" onAction="#onExportPage" text="导出页面(图片)" />
                       </items>
                   </MenuButton>

                   <!-- 插入菜单 -->
                   <MenuButton mnemonicParsing="false" text="插入">
                       <items>
                           <MenuItem mnemonicParsing="false" onAction="#onAddText" text="文本框" />
                           <MenuItem mnemonicParsing="false" onAction="#onAddLine" text="直线" />
                           <MenuItem mnemonicParsing="false" onAction="#onAddRectangle" text="矩形" />
                           <MenuItem mnemonicParsing="false" onAction="#onAddCircle" text="圆形" />
                           <MenuItem mnemonicParsing="false" onAction="#onAddEllipse" text="椭圆" />
                           <MenuItem mnemonicParsing="false" onAction="#onAddImage" text="图片" />
                       </items>
                   </MenuButton>

                   <!-- 演示菜单 -->
                   <MenuButton mnemonicParsing="false" text="演示">
                       <items>
                           <MenuItem mnemonicParsing="false" onAction="#onStartPresentation" text="开始演示(F5)" />
                           <MenuItem mnemonicParsing="false" onAction="#onPresentationWithFade" text="淡出淡入效果演示" />
                           <MenuItem mnemonicParsing="false" onAction="#onPresentationWithPushLeft" text="从右推入效果演示" />
                           <MenuItem mnemonicParsing="false" onAction="#onPresentationWithPushRight" text="从左推入效果演示" />
                           <MenuItem mnemonicParsing="false" onAction="#onPresentationWithZoomIn" text="缩放放大效果演示" />
                           <MenuItem mnemonicParsing="false" onAction="#onPresentationWithRotate" text="旋转翻页效果演示" />
                       </items>
                   </MenuButton>

                   <Label text=" | " />

                   <!-- 退出菜单 -->
                   <MenuButton mnemonicParsing="false" text="更多">
                       <items>
                           <MenuItem mnemonicParsing="false" onAction="#logout" text="退出应用" />
                       </items>
                   </MenuButton>
               </children>
            </HBox>
         </children>
      </VBox>

      <!-- 主内容区域 -->
      <HBox layoutX="0" layoutY="50" prefHeight="652.0" prefWidth="1300.0">
         <!-- 左侧页面列表 -->
         <VBox prefHeight="657.0" prefWidth="200.0" style="-fx-border-color: #e0e0e0; -fx-border-width: 0 1 0 0;">
            <Label style="-fx-padding: 5; -fx-font-weight: bold;" text="页面列表" />
            <ListView fx:id="pageListView" prefHeight="619.0" prefWidth="195.0" VBox.vgrow="ALWAYS" />
         </VBox>

         <!-- 右侧编辑区域 -->
         <VBox spacing="10" style="-fx-padding: 10;" HBox.hgrow="ALWAYS">
            <Label fx:id="pageNameLabel" style="-fx-font-size: 14; -fx-font-weight: bold;" text="页面名称:" />
            <!-- 绘图Canvas将在这里动态添加 -->
            <AnchorPane fx:id="drawingCanvasContainer" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS" />
         </VBox>

         <!-- 右侧属性编辑面板 -->
         <VBox fx:id="propertyPanelContainer" prefWidth="200.0" />
      </HBox>
   </children>
</AnchorPane>
