Mercurial > gui
comparison remotePager.ur @ 31:b5432d74841a
Update for key/mouse handler change
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 21 Jul 2012 10:15:14 -0400 |
parents | 2e397d373289 |
children | 2e7f8f7d71d4 |
comparison
equal
deleted
inserted
replaced
30:c1f06342c81f | 31:b5432d74841a |
---|---|
11 style curPage | 11 style curPage |
12 style rangeCtl | 12 style rangeCtl |
13 | 13 |
14 fun defaultFormatLbl {First = fLbl, Back = bLbl, Next = nLbl, Last = lLbl} = | 14 fun defaultFormatLbl {First = fLbl, Back = bLbl, Next = nLbl, Last = lLbl} = |
15 let | 15 let |
16 fun mkLink c txt = fn a => <xml><li onclick={a} class={c}><a class={c} onclick={return ()}>{[txt]}</a></li></xml> | 16 fun mkLink c txt = fn a => <xml><li onclick={fn _ => a} class={c}><a class={c} onclick={fn _ => return ()}>{[txt]}</a></li></xml> |
17 in | 17 in |
18 {Width = 5, | 18 {Width = 5, |
19 RangeCtl = {First = mkLink firstCtl fLbl, | 19 RangeCtl = {First = mkLink firstCtl fLbl, |
20 Back = mkLink backCtl bLbl, | 20 Back = mkLink backCtl bLbl, |
21 Next = mkLink nextCtl nLbl, | 21 Next = mkLink nextCtl nLbl, |
22 Last = mkLink lastCtl lLbl}, | 22 Last = mkLink lastCtl lLbl}, |
23 PageCtl = {Unsel = fn n a => <xml><li onclick={a}><a onclick={return ()}>{[n + 1]}</a></li></xml>, | 23 PageCtl = {Unsel = fn n a => <xml><li onclick={fn _ => a}><a onclick={fn _ => return ()}>{[n + 1]}</a></li></xml>, |
24 Sel = fn n a => <xml><li onclick={a} class={curPage}><a class={curPage} onclick={return ()}>{[n + 1]}</a></li></xml>}, | 24 Sel = fn n a => <xml><li onclick={fn _ => a} class={curPage}><a class={curPage} onclick={fn _ => return ()}>{[n + 1]}</a></li></xml>}, |
25 WrapPageCtl = fn x => x, | 25 WrapPageCtl = fn x => x, |
26 Wrap = fn {First = f, Back = b, Pages = p, Next = n, Last = l} => <xml><ul class={rangeCtl}>{f}{b}{p}{n}{l}</ul></xml>} | 26 Wrap = fn {First = f, Back = b, Pages = p, Next = n, Last = l} => <xml><ul class={rangeCtl}>{f}{b}{p}{n}{l}</ul></xml>} |
27 end | 27 end |
28 | 28 |
29 val defaultFormat = defaultFormatLbl {First = "<<", Back = "<", Next = ">", Last = ">>"} | 29 val defaultFormat = defaultFormatLbl {First = "<<", Back = "<", Next = ">", Last = ">>"} |