Skip to main content

module salix::canvas::Demo

rascal-0.40.17
salix-contrib-0.2.7

Usage

import salix::canvas::Demo;

Source code

http://github.com/usethesource/salix-contrib/src/main/rascal/salix/canvas/Demo.rsc

Dependencies

import salix::canvas::Canvas;
import salix::App;
import salix::HTML;
import salix::Core;
import salix::Index;

alias Model

tuple[str color, list[str] colors, MouseXY lastClick]

function init

Model init()

function canvasApp

SalixApp[Model] canvasApp(str id = "canvasApp")

function canvasWebApp

App[Model] canvasWebApp()

data Msg

data Msg  
= flipColor()
| mouseClick(MouseXY coords)
;

function update

Model update(Msg msg, Model m)

function view

void view(Model m)