X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.graph%2Fscl%2FSpreadsheet%2FAll.scl;h=a6660e57bcfc8e0bdb089ca8221fd51943fdc773;hb=7db836e2d27d5be0a122a917c0d4e5576b76cef0;hp=88d8e47aad2448cc299e3721bded398f92dcccd7;hpb=82ed7c74dbd83a2a557e781b8674b3262b52da54;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.spreadsheet.graph/scl/Spreadsheet/All.scl b/bundles/org.simantics.spreadsheet.graph/scl/Spreadsheet/All.scl index 88d8e47aa..a6660e57b 100644 --- a/bundles/org.simantics.spreadsheet.graph/scl/Spreadsheet/All.scl +++ b/bundles/org.simantics.spreadsheet.graph/scl/Spreadsheet/All.scl @@ -1,9 +1,13 @@ include "Simantics/DB" include "Simantics/Ontologies" include "Simantics/SCL" +include "Simantics/UI" include "Document/All" include "File" +importJava "org.simantics.spreadsheet.graph.ExternalRef" where + data ExternalRef + importJava "org.simantics.spreadsheet.common.TableCell" where data TableCell @@ -14,6 +18,8 @@ importJava "org.simantics.spreadsheet.common.TreeTableCell" where getTreeTableCellData :: TreeTableCell -> a createTreeTableCell :: String -> a -> Maybe b -> Integer -> Integer -> Integer -> Boolean -> TreeTableCell + + createTreeTableCell2 :: String -> a -> Maybe b -> a -> Integer -> Integer -> Boolean -> TreeTableCell @JavaName getText treeTableCellText :: TreeTableCell -> String @@ -39,6 +45,8 @@ importJava "org.simantics.spreadsheet.graph.SpreadsheetGraphUtils" where saveInitialCondition :: Variable -> Resource -> String -> Resource findCell :: Variable -> String -> Maybe Variable invalidateAll :: Variable -> () + extRefVariable :: Variable -> Variant + extRefActiveVariable :: Variable -> Variant importJava "org.simantics.spreadsheet.util.SpreadsheetUtils" where createSheet :: Resource -> String -> Resource @@ -63,6 +71,11 @@ importJava "org.simantics.spreadsheet.graph.SpreadsheetSessionManager" where importJava "org.simantics.spreadsheet.graph.ExcelImport" where importBook :: Resource -> File -> () +importSpreadsheetBookAction :: Resource -> () +importSpreadsheetBookAction res = match fileDialog "foo" [("Excel file", "*.xls"), ("Excel File", "*.xlsx")] with + Nothing -> () + Just file -> importBook res file + createSpreadsheetBookAction :: Resource -> () createSpreadsheetBookAction res = do syncWrite (\() -> createSpreadsheetBookDefault res)