|
234 | 234 | fMinimized: bool
|
235 | 235 | fAlwaysOnTop: bool
|
236 | 236 | fWidth, fHeight: int
|
| 237 | + fMinWidth, fMinHeight: int |
| 238 | + fResizable: bool |
237 | 239 | fClientWidth, fClientHeight: int
|
238 | 240 | fX, fY: int
|
239 | 241 | fControl: Control
|
@@ -705,6 +707,15 @@ method `width=`*(window: Window, width: int) {.base, locks: "unknown".}
|
705 | 707 | method height*(window: Window): int {.base.}
|
706 | 708 | method `height=`*(window: Window, height: int) {.base, locks: "unknown".}
|
707 | 709 |
|
| 710 | +method minWidth*(window: Window): int {.base.} |
| 711 | +method `minWidth=`*(window: Window, minWidth: int) {.base, locks: "unknown".} |
| 712 | + |
| 713 | +method minHeight*(window: Window): int {.base.} |
| 714 | +method `minHeight=`*(window: Window, minHeight: int) {.base, locks: "unknown".} |
| 715 | + |
| 716 | +method resizable*(window: Window): bool {.base.} |
| 717 | +method `resizable=`*(window: Window, resizable: bool) {.base, locks: "unknown".} |
| 718 | + |
708 | 719 | method clientWidth*(window: Window): int {.base.}
|
709 | 720 |
|
710 | 721 | method clientHeight*(window: Window): int {.base.}
|
@@ -1443,6 +1454,7 @@ proc init(window: Window) =
|
1443 | 1454 | window.fVisible = false
|
1444 | 1455 | window.fWidth = 640 # do not trigger resize
|
1445 | 1456 | window.height = 480 # trigger resize
|
| 1457 | + window.resizable = true |
1446 | 1458 | window.fX = -1 # window will be centered on screen
|
1447 | 1459 | window.fY = -1
|
1448 | 1460 | window.title = getAppFilename().extractFilename().changeFileExt("")
|
@@ -1556,6 +1568,24 @@ method `height=`(window: Window, height: int) =
|
1556 | 1568 | window.fHeight = height
|
1557 | 1569 | # has to be extended by WindowImpl
|
1558 | 1570 |
|
| 1571 | +method minWidth(window: Window): int = window.fMinWidth |
| 1572 | + |
| 1573 | +method `minWidth=`(window: Window, minWidth: int) = |
| 1574 | + window.fMinWidth = minWidth |
| 1575 | + # has to be extended by WindowImpl |
| 1576 | + |
| 1577 | +method minHeight(window: Window): int = window.fMinHeight |
| 1578 | + |
| 1579 | +method `minHeight=`(window: Window, minHeight: int) = |
| 1580 | + window.fMinHeight = minHeight |
| 1581 | + # has to be extended by WindowImpl |
| 1582 | + |
| 1583 | +method resizable(window: Window): bool = window.fResizable |
| 1584 | + |
| 1585 | +method `resizable=`(window: Window, resizable: bool) = |
| 1586 | + window.fResizable = resizable |
| 1587 | + # has to be extended by WindowImpl |
| 1588 | + |
1559 | 1589 | method clientWidth(window: Window): int = window.fClientWidth
|
1560 | 1590 |
|
1561 | 1591 | method clientHeight(window: Window): int = window.fClientHeight
|
|
0 commit comments