C++ Analogue for WPF C++ Analogue for WPF wpf wpf

C++ Analogue for WPF


  1. There isn't really anything like this. Not cross-platform at any rate. Direct2D works reasonably well, but is obviously Windows-only. And NVIDIA recently dropped this "path" extension of OpenGL that is similar in basic functionality, but it is NVIDIA-only (and not available on Mac OSX). Cairo has an OpenGL backend, but I have no idea how good it is. It can't be that good if Mozilla dumped Cairo in favor of D2D on Windows.
  2. Many GUI toolkits have some form of language for making a GUI. Qt has one that is pre-compiled into C++.
  3. Not that I know of. Data binding requires some form of reflection (WPF-style data binding does), and C++ has no native support for reflection. So you would need to implement reflection of some sort before you can even begin to make WPF-style data binding work.
  4. That comes with #1. More or less, as any GPU-based renderer will be able to operate at arbitrary resolutions.

I love C++, but honestly, this sort of thing is best implemented for a higher level language. The lack of language-based reflection support will make implementing data binding a huge pain. Whereas, you could just implement the low-level "render stuff to area" and basic window/event management in C++, then expose it to a scripting language where data binding and such work. That way, you have native code speed where you need it, but the versatility and reflection of a scripting language for dealing with the GUI and its associated data.


I'm several years late, but for the benefit of anybody else reading this question: you're looking for Qt Quick / QML:

http://qt-project.org/doc/qt-4.8/qml-intro.html

http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html