Haxe externs (and wrappers) for wxWidgets
You need the hxcpp library and at least Haxe 3.4.0, we recommend Haxe 3.4.2.
WXWIN
environment var if setup didnt (eg: C:\wxWidgets-3.0.2
)vcvarsall.bat
from Visual Studio dir in your current prompt
(eg: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
)cd %WXWIN%\build\msw\
nmake.exe -f makefile.vc BUILD=release
nmake.exe -f makefile.vc BUILD=release SHARED=1
nmake.exe -f makefile.vc BUILD=release TARGET_CPU=X64
nmake.exe -f makefile.vc BUILD=release SHARED=1 TARGET_CPU=X64
You need wxWidgets 3.x and wx-config available in your path.
You can install wxWidgets with:
apt-get install libwxgtk3.0-gtk3-dev libwxbase3.0-dev libwxgtk-webview3.0-gtk3-dev
apt-get install libwxgtk3.0-dev libwxbase3.0-dev libwxgtk-webview3.0-dev
You need at least OSX 10.7 and you can install wxWidgets with:
brew update
brew install wxwidgets
hxWidgets is actually independent of haxeui-core (and haxeui-hxwidgets as well), and can be used on its own if you so desired (the showcase in this repo is an example of that). hxWidgets consists of two layers:
wx.widgets.*
(e.g., wx.widgets.Button
) : these are externs for Haxe (hxcpp) for wxWidgets,
and could be used as-is — though, working with externs, esp. C++ externs, can be... difficult.
hx.widgets.*
(e.g., hx.widgets.Button
) : these are nice Haxe wrappers for the externs so
you can just do new Button(...)
and be done with it (it manages all the pointers, etc.). They
also make things a little more "haxey" in the sense that you have myButton.bitmap = ...
rather
than the traditional wx way myButton.setBitmap(...)
.
Sometimes is useful to have the most up-to-date version of wxWidgets running on a linux or OSX system, to do this follow these steps:
/home/users/username/wxwidgets3.1.3/
mkdir wx_build
cd wx_build
../configure --with-opengl --disable-shared
sudo apt install build-essential
sudo apt install libgtk2.0-dev
sudo apt install libgtk-3-dev
sudo apt install freeglut3-dev
make
(adding -j3
will allow your system to use 3 cores and thus speed up the initial compile)make install
(may need sudo
if not default /usr/local
location)wx-config --version
should now show the version you just built