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

<?import javafx.scene.canvas.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.*?>
<?import java.net.*?>

<AnchorPane xmlns:fx="http://javafx.com/fxml" fx:controller="net.zamasoft.reader.book.ImageController"
            fx:id="root" styleClass="image"
            AnchorPane.rightAnchor="10" AnchorPane.leftAnchor="10" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="10"
            onMouseMoved="#mouseMoved">
  <stylesheets>
    <URL value="@image.css" />
  </stylesheets>

  <!-- スクロール領域 -->
  <ScrollPane fx:id="scrollPane"
              AnchorPane.rightAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0">
    <AnchorPane fx:id="anchor"
                onMousePressed="#mousePressed" onMouseDragged="#mouseDragged" onMouseReleased="#mouseReleased"
                onZoomStarted="#zoomStarted" onZoom="#zoom">
      <ImageView fx:id="imageView" preserveRatio="true" />
    </AnchorPane>
  </ScrollPane>
  
  <!-- 閉じるボタン -->
  <Button onAction="#closeAction" AnchorPane.rightAnchor="10" AnchorPane.topAnchor="10"
          styleClass="close">
    <graphic>
      <ImageView fitWidth="48" pickOnBounds="true" preserveRatio="true">
        <Image url="@../icons/close.png" />
      </ImageView>
    </graphic>
  </Button>
</AnchorPane>