-
Notifications
You must be signed in to change notification settings - Fork 20
/
wx.nim
116 lines (95 loc) · 2.58 KB
/
wx.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# wx wrapper for Nim
# See LICENSE.txt for details of the license.
# Andreas Rumpf 2015
const
wxh* = """#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif"""
{.noforward: on.}
include "private/object"
include private/string
converter toWxString*(s: string): WxString =
result = constructWxString(cstring(s), s.len)
include private/arrstr
include private/colour
include private/fontenc
include private/defs
const
fileWildcard* = when defined(windows): "*.*" else: "*"
include private/list
include private/gdicmn
include private/font
include private/fontdata
include private/fontenum
include private/image
include private/bitmap
include private/icon
include private/intl
type
WxClientDataType* {.importcpp: "wxClientDataType", header: "<wx/wx.h>".} = object of WxObject
const isForward = 1
include private/event
include private/window
include private/layout
include private/aboutdlg
include private/any
include private/control
include private/anybutton
include private/app
include private/bannerwindow
include private/button
include private/bmpbuttn
include private/calctrl
include private/checkbox
include private/listbox
include private/checklst
include private/choice
include private/colordlg
include private/combo
include private/combobox
include private/commandlinkbutton
include private/dataobj
include private/dataview
include private/datetimectrl
include private/datectrl
include private/dialog
include private/dirdlg
include private/filedlg
include private/fontdlg
include private/fontpicker
include private/frame
include private/gauge
include private/hyperlink
include private/kbdstate
include private/listbook
include private/listctrl
include private/menu
include private/menuitem
#include private/notebook
include private/ownerdrw
include private/panel
include private/position
include private/radiobox
include private/radiobut
include private/sizer
#include private/slider
include private/spinbutt
include private/spinctrl
include private/statusbar
include private/textctrl
include private/toolbar
include private/treectrl
include private/types
include private/variant
include private/webview
include private/stattext
proc cnew*[T](x: T): ptr T {.importcpp: "(new @)", nodecl.}
converter toEventType*[T](x: WxEventTypeTag[T]): WxEventType {.
importcpp: "#", header: "<wx/wx.h>".}
when false:
proc registerEventCallback(attachedTo: int;
callback: proc (x: WxEvent) {.closure.}) =
{.emit: """
wxTheApp->Bind();
""".}