add todo note

This commit is contained in:
2024-09-25 20:34:59 +01:00
parent 2528e67375
commit 57fbf5f1aa
3 changed files with 58 additions and 1 deletions

BIN
dotscape

Binary file not shown.

View File

@@ -358,12 +358,21 @@ struct
fun enterBrowseMode model =
let
val model = AppWith.mode (model, AppType.BROWSE_MODE)
(* should draw modal window as well, but that's not needed right now *)
(* todo: should draw modal window as well *)
val fileMsg = LOAD_FILES (#openFilePath model)
in
(model, FILE fileMsg)
end
fun handleFileBrowserAndPath (model, fileBrowser, path) =
let
val model = AppWith.fileBrowserAndPath (model, fileBrowser, path)
(* todo: update and recreate vector indicating text to redraw,
* if not in normal mode *)
in
(model, NO_MAILBOX)
end
fun updateNormalMode (model: app_type, inputMsg) =
case inputMsg of
MOUSE_MOVE {x = mouseX, y = mouseY} =>
@@ -388,6 +397,8 @@ struct
| KEY_SPACE => enterOrSpaceCoordinates model
| USE_TRIANGLES triangles => useTriangles (model, triangles)
| TRIANGLES_LOAD_ERROR => trianglesLoadError model
| FILE_BROWSER_AND_PATH {fileBrowser, path} =>
handleFileBrowserAndPath (model, fileBrowser, path)
fun update (model: app_type, inputMsg) =
case #mode model of

View File

@@ -9,6 +9,10 @@ sig
val mousePosition: AppType.app_type * Real32.real * Real32.real
-> AppType.app_type
val fileBrowserAndPath:
AppType.app_type * AppType.file_browser_item vector * string
-> AppType.app_type
val arrowX: AppType.app_type * int -> AppType.app_type
val arrowY: AppType.app_type * int -> AppType.app_type
@@ -576,4 +580,46 @@ struct
, fileBrowser = fileBrowser
}
end
fun fileBrowserAndPath (app: app_type, fileBrowser, path) =
let
val
{ mode
, xClickPoints
, yClickPoints
, numClickPoints
, windowWidth
, windowHeight
, triangles
, triangleStage
, undo
, redo
, showGraph
, mouseX
, mouseY
, arrowX
, arrowY
, openFilePath = _
, fileBrowser = _
} = app
in
{ mode = mode
, xClickPoints = xClickPoints
, yClickPoints = yClickPoints
, numClickPoints = numClickPoints
, triangles = triangles
, triangleStage = triangleStage
, windowWidth = windowWidth
, windowHeight = windowHeight
, undo = undo
, redo = redo
, showGraph = showGraph
, mouseX = mouseX
, mouseY = mouseY
, arrowX = arrowX
, arrowY = arrowY
, fileBrowser = fileBrowser
, openFilePath = path
}
end
end