wTypes

Basic types definition for wNim. Symbols in this module will automatically export by wApp, so the user don't need to import this module in most situation. However, sometimes the nim compiler cannot distinguish wNim types from module names (generic instantiation, etc). In that case, you can import wTypes and specify the type name. For example: wTypes.wIcon.

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.
wWparam = WPARAM
wLparam = LPARAM
wId = enum
  wIdAny = -1, 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.
wApp = ref object of RootObj
wEvent = ref object of RootObj
wCommandEvent = ref object of wEvent
wContextMenuEvent = ref object of wEvent
wDialogEvent = ref object of wEvent
wDragDropEvent = ref object of wEvent
wHyperlinkEvent = ref object of wCommandEvent
wIpEvent = ref object of wCommandEvent
wKeyEvent = ref object of wEvent
wListEvent = ref object of wCommandEvent
wMouseEvent = ref object of wEvent
wMoveEvent = ref object of wEvent
wNavigationEvent = ref object of wEvent
wOtherEvent = ref object of wEvent
wScrollEvent = ref object of wCommandEvent
wScrollWinEvent = ref object of wEvent
wSetCursorEvent = ref object of wEvent
wSizeEvent = ref object of wEvent
wSpinEvent = ref object of wCommandEvent
wStatusBarEvent = ref object of wCommandEvent
wTrayEvent = ref object of wEvent
wTreeEvent = ref object of wCommandEvent
wWebViewEvent = ref object of wCommandEvent
wDataObject = ref object
wPrintData = ref object
wAcceleratorTable = ref object of RootObj
wImage = ref object of RootObj
wImageList = ref object of RootObj
wIconImage = ref object of RootObj
wResizable = ref object of RootObj
wResizer = ref object of RootObj
wWindow = ref object of wResizable
wFrame = ref object of wWindow
wPanel = ref object of wWindow
wControl = ref object of wWindow
wButton = ref object of wControl
wCalendarCtrl = ref object of wControl
wCheckBox = ref object of wControl
wCheckComboBox = ref object of wControl
wComboBox = ref object of wControl
wDatePickerCtrl = ref object of wControl
wGauge = ref object of wControl
wHotkeyCtrl = ref object of wControl
wHyperlinkCtrl = ref object of wControl
wIpCtrl = ref object of wControl
wListBox = ref object of wControl
wListCtrl = ref object of wControl
wNoteBook = ref object of wControl
wRadioButton = ref object of wControl
wRebar = ref object of wControl
wScrollBar = ref object of wControl
wSlider = ref object of wControl
wSpinButton = ref object of wControl
wSpinCtrl = ref object of wControl
wSplitter = ref object of wControl
wStaticBitmap = ref object of wControl
wStaticBox = ref object of wControl
wStaticLine = ref object of wControl
wStaticText = ref object of wControl
wStatusBar = ref object of wControl
wTextCtrl = ref object of wControl
wTimePickerCtrl = ref object of wDatePickerCtrl
wToolBar = ref object of wControl
wTreeCtrl = ref object of wControl
wTreeItem = object
wWebView = ref object of wControl
wMenuItemKind = enum
  wMenuItemNormal, wMenuItemSeparator, wMenuItemCheck, wMenuItemRadio,
  wMenuItemSubMenu
wMenuBase = ref object of RootObj
wMenu = ref object of wMenuBase
wMenuBar = ref object of wMenuBase
wMenuItem = ref object of RootObj
wGdiObject = ref object of RootObj
wBitmap = ref object of wGdiObject
wBrush = ref object of wGdiObject
wCursor = ref object of wGdiObject
wFont = ref object of wGdiObject
wIcon = ref object of wGdiObject
wPen = ref object of wGdiObject
wRegion = ref object of wGdiObject
wDialog = ref object of wWindow
wColorDialog = ref object of wDialog
wDirDialog = ref object of wDialog
wFileDialog = ref object of wDialog
wFindReplaceDialog = ref object of wDialog
wFontDialog = ref object of wDialog
wMessageDialog = ref object of wDialog
wPageSetupDialog = ref object of wDialog
wPrintDialog = ref object of wDialog
wTextEntryDialog = ref object of wDialog
wPasswordEntryDialog = ref object of wTextEntryDialog

Consts

wDefault = -2147483648
Used in wNim as default value.
wDefaultFloat = 0x0000000000000000'f64
Used in wNim as default float value.
wDefaultColor: wColor = 0xFFFFFFFF'i32
Used in wNim as default color.
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 = (seconds: -9223372036854775808, nanosecond: 0)
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

Converters

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