include "Simantics/SCL"
include "Simantics/UI"
include "Document/All"
+include "Spreadsheet/Solver"
include "File"
-
-effect SpreadsheetTransaction
- "spreadsheetTransaction"
- "org.simantics.spreadsheet.Transaction"
-
-importJava "org.simantics.spreadsheet.graph.ExternalRef" where
- data ExternalRef
-
importJava "org.simantics.spreadsheet.common.TableCell" where
data TableCell
-importJava "java.util.function.Consumer" where
- data Consumer
-
-importJava "org.simantics.spreadsheet.CellEditor" where
- data CellEditor
- startTransaction :: CellEditor -> OperationMode -> <Proc> Transaction
- @JavaName "edit"
- editProperty_ :: CellEditor -> String -> String -> a -> Binding a -> Maybe Consumer -> <SpreadsheetTransaction> ()
- @JavaName "edit"
- editContent :: CellEditor -> String -> Variant -> Maybe Consumer -> <SpreadsheetTransaction> ()
-
@inline
editProperty :: Serializable a => CellEditor -> String -> String -> a -> Maybe Consumer -> <SpreadsheetTransaction> ()
editProperty editor location property value consumer = editProperty_ editor location property value binding consumer
-importJava "org.simantics.spreadsheet.OperationMode" where
- data OperationMode
- OPERATION :: OperationMode
- EDIT_MODE :: OperationMode
-
-importJava "org.simantics.spreadsheet.Transaction" where
- data Transaction
- commit :: Transaction -> <Proc> ()
-
importJava "org.simantics.spreadsheet.common.TreeTableCell" where
data TreeTableCell
treeTableCellRow :: TreeTableCell -> <Proc> Integer
@JavaName getColumn
treeTableCellColumn :: TreeTableCell -> <Proc> Integer
-
-importJava "org.simantics.spreadsheet.common.SpreadsheetCell" where
- data SpreadsheetCell
importJava "org.simantics.spreadsheet.graph.SCL" where
toVariant :: a -> Variant
invalidateAll :: Variable -> <ReadGraph> ()
extRefVariable :: Variable -> <ReadGraph> Variant
extRefActiveVariable :: Variable -> <ReadGraph> Variant
+ forRows :: Variable -> String -> Integer -> Integer -> (Variable -> <ReadGraph,Proc> ()) -> <ReadGraph> ()
+ rowCell :: Variable -> Integer -> <ReadGraph> Maybe Variable
+ offsetCell :: Variable -> Integer -> Integer -> <ReadGraph> Maybe Variable
cellEditor :: Resource -> <ReadGraph> CellEditor
syncExec :: CellEditor -> OperationMode -> (<SpreadsheetTransaction, Proc> a) -> <Proc> a
cellColumn :: Variable -> <ReadGraph> Integer
-
-importJava "org.simantics.spreadsheet.Spreadsheets" where
- cellName :: Integer -> Integer -> String
+ spreadsheetBook :: Variable -> <Proc> SpreadsheetBook
importJava "org.simantics.spreadsheet.util.SpreadsheetUtils" where
createSheet :: Resource -> String -> <WriteGraph> Resource
@JavaName "sheetRun"
bookRun :: Resource -> Variable -> <ReadGraph> Variable
-sheetRunDefault :: Resource -> <ReadGraph> Variable
-sheetRunDefault sheet = sheetRun sheet (resourceVariable sheet)
+sheetRunDefault = bookRunDefault
-importJava "org.simantics.spreadsheet.graph.SpreadsheetSessionManager" where
- removeSpreadsheetSession :: Variable -> <Proc, WriteGraph> ()
+bookRunDefault :: Resource -> <ReadGraph> Variable
+bookRunDefault book = bookRun book (resourceVariable book)
importJava "org.simantics.spreadsheet.graph.ExcelImport" where
importBook :: Resource -> File -> <Proc> ()