1, The Elements
2, Compset and Item Renderer
3, Item Proxy
The item proxy is a basic type that can be used for accessing all items in a container widget, such as listbox, treebox. Meanwhile, the item proxy is an iterator of the widget, unlike the STL iterator, the value_type of the item_proxy is itself.
The iterators are a powerful technique and one of the fundamental design patterns. For example.... read more
Nana provides a mechanism which can flexibly configure the image processing algorithms. For an abstract algorithm, there would be many implementations. For example, Nana C++ Library provides two stretch algorithms, they are bilinear interoplation and proximal interoplation, you can switch the algorithms under your requirement.
See the example at:
http://nanapro.sourceforge.net/help/paint/image_process_selector.htm... read more
In C++, objects often provide copy ability and moveability to duplicate or move from an existing object. But it was by making a widget copyable or movable caused more problems than it solves.
If a widget could be copyable, what properties should be copied? E.g.
form fm1; button btn1(fm1); form fm2; button btn2(fm2); btn1 = btn2; //Assume that copy is allowed.
We can say that after copying, the caption, position and size of btn1 is same to btn2′s. But, which should be the parent of btn1? fm1 or fm2? and another important question, is a widget reference semantics or value semantics?... read more
Requires: C++11, Nana 0.5
In this tutorial, we will make a GUI calculator with Nana C++ Library. The calculator that we build will look like:
Using nana::gui::place which is introduced into Nana in the version of 0.5, we can create a such GUI easily.
Let's start the code.
#include <nana/gui/wvl.hpp> #include <nana/gui/widgets/button.hpp> #include <nana/gui/widgets/label.hpp> #include <nana/gui/place.hpp>... [read more](/p/nanapro/blog/2013/03/nana-tutorial-creating-a-gui-calculator/)
Although C++ is a powerful and sytnax-agile language, in fact, many programmers don’t like to do GUI in C++, because it is so difficault to make GUI in C++. Some exsiting C++ GUI frameworks define their own rule that makes you write some stiff code for running, it always causes some problems, such as leaving your code in a deep inheritance hierarchy, making maintenance painful. Now, there is an alternative, Nana C++ Library, a pure C++ library that will guide you in doing GUI with your immense and extensive C++ knowledge/skill/idioms, it makes a great progress in doing GUI in C++.... read more