wTypes

Basic types definition for wNim.

Types

wSize = tuple[width: int, height: int]
A data structure contains integer width and height.
wPoint = tuple[x: int, y: int]
A data structure contains integer x and y.
wRect = tuple[x: int, y: int, width: int, height: int]
A data structure contains x, y, width, and height.
wDirection = tuple[left: int, up: int, right: int, down: int]
A data structure contains left, up, right, down.
wError = object of Exception
  
Base of exception use in wNim.
wCommandID = distinct int
A integer number used in menus or GUI controls as the ID.
wStyle = int64
The wNim window style type. It simply combine of windows' style and exstyle.
wColor = int32
Representing a combination of Red, Green, and Blue (RGB) intensity values. Same as windows' COLORREF.
wTime = Time
Represents a point in time.
wId = enum
  wIdZero = 0, wIdLowest = 4999, wIdOpen, wIdClose, wIdNew, wIdSave, wIdSaveAS, wIdRevert,
  wIdExit, wIdUndo, wIdRedo, wIdHelp, wIdPrint, wIdPrintSetup, wIdPreview, wIdAbout,
  wIdHelpContents, wIdHelpCommands, wIdHelpProcedures, wIdCloseAll, wIdDelete,
  wIdProperties, wIdReplace, wIdCut = 5030, wIdCopy, wIdPaste, wIdClear, wIdFind,
  wIdDuplicate, wIdSelectAll, wIdFile1 = 5050, wIdFile2, wIdFile3, wIdFile4, wIdFile5,
  wIdFile6, wIdFile7, wIdFile8, wIdFile9, wIdOk = 5100, wIdCancel, wIdApply, wIdYes,
  wIdNo, wIdStatic, wIdForward, wIdBackward, wIdDefault, wIdMore, wIdSetup, wIdReset,
  wIdContextHelp, wIdYesToAll, wIdNoToAll, wIdAbort, wIdRetry, wIdIgnore, wIdContinue,
  wIdTryAgain, wIdSystemMenu = 5200, wIdCloseFrame, wIdMoveFrame, wIdResizeFrame,
  wIdMaximizeFrame, wIdIconizeFrame, wIdRestoreFrame, wIdHighest = 5999, wIdUser
Predefined names to use as menus or controls ID.

Consts

wDefault = -2147483648
Used in wNim as default value.
wDefaultFloat = 0x0000000000000000'f64
Used in wNim as default float value.
wDefaultPoint: wPoint = (-2147483648, -2147483648)
Used in wNim as default point.
wDefaultPosition: wPoint = (-2147483648, -2147483648)
Used in wNim as default position.
wDefaultSize: wSize = (-2147483648, -2147483648)
Used in wNim as default size.
wDefaultRect: wRect = (-2147483648, -2147483648, -2147483648, -2147483648)
Used in wNim as default rect.
wDefaultID: wCommandID = -1
Used in wNim as default command ID.
wDefaultTime: wTime
Used in wNim as default time.
wNotFound = -1
Used in wNim as default value.
wLeft = 0x00000010
wRight = 0x00000020
wUp = 0x00000040
wDown = 0x00000080
wTop = 0x00000040
wBottom = 0x00000080
wNorth = 0x00000040
wSouth = 0x00000080
wWest = 0x00000010
wEast = 0x00000020
wHorizontal = 48
wVertical = 192
wBoth = 240
wCenter = 48
wMiddle = 192

Procs

proc hash(o: ref object): Hash {...}{.inline.}

Converters

converter converterIntEnumTowCommandID(x: int | enum): wCommandID
We usually use the enum for where need a command ID. see the examples.