All topics
464
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
ravenspoint posted 4 days ago at 11:06 pm
I write code, over and over again, that looks like this:

fm.events().some_event([&](const nana::some_arg&arg)
{
// do some work in response to event
...

nana::API::refresh_window( fm );

});
Why????

nana::API::refresh_window() is not documented. I have been told that it is not documented because it should not be needed. But without it the display does not get update
10replies
42views
recent by ravenspoint  ·  4 days ago at 8:53 pm
ravenspoint posted 5 days ago at 4:21 pm
Nana does not provide an arc drawing primitive, so we have to use the windows API directly. Something like this:

#include <cmath>
#include <nana/gui.hpp>

#include <windows.h>

/** Draw Arc of circle
@param[in] graph context
@param[in] x for conter, pixels 0 at left of window
@param[in] y for center, pixels 0 at top of window
@param[in] r radius, pixels

5d54260006bce.png
1replies
11views
recent by jinhao  ·  4 days ago at 4:29 am
Hi,
I am creating a debugger, and want to continously show the value of a register, and also allow modifying it’s value.
I have looked at using nana::inputbox::integer, but I haven’t found a way to either automatically, or explicitly (button) refresh the associated value. Also, inputbox::integer is probably unsuitable for 64-bit registers.
I would really appreciate a suggesti
2replies
19views
recent by jinhao  ·  Aug 6 at 3:36 am
ravenspoint posted Aug 1 at 3:07 pm
Although it is NOT mentioned in the release notes, it seems to be the case that v1.7.2 suddenly needs c++17.

This is causing a lot of grief, centered around nana::filebox.

The codeblocks library build project is still using C++11. I have changed that and the library itself now builds successfully. But my apps now give

C:\Users\James\code\nana-1.7.2\build\codeblocks\libnana.a(filebox
13replies
49views
recent by ravenspoint  ·  Aug 5 at 6:18 pm
ravenspoint posted Aug 2 at 4:25 pm
Building

//Include nana/gui.hpp header file to enable Nana C++ Library
//for the program.
#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/filebox.hpp>
#include <nana/gui/msgbox.hpp>
int main()
{
//All names of Nana is in the namespace nana;
using namespace nana;
//Define a form object, class form will create a window
//
2replies
13views
recent by jinhao  ·  Aug 5 at 5:10 pm
elbui3 posted Jul 18 at 11:33 am
Hello all! I just started using nana libraries for implementing user interfaces. I am following the simple notepad tutorial, but when I build the project, during linking I get these errors:

/home/stefano/Projects/nana/source/gui/filebox.cpp:161: undefined reference to `nana::detail::theme::theme()'
/usr/bin/ld: /home/stefano/Projects/nana/source/gui/filebox.cpp:163: undefined reference to `na
4replies
28views
recent by jinhao  ·  Jul 20 at 11:28 am
Why is it called a "model"? Am I correct in assuming that it's part of the "model-view-adapter" software engineering concept?

model: the STL container provided by the user
view: the listbox, handled by the library
adapter (mediating controller): the user-provided functions that translate between container value and listbox cell??

1replies
12views
recent by jinhao  ·  Jul 18 at 4:30 pm
Hello,

I just upgraded nana v1.6.1 to v1.7.1.
As you know, some file constructor is removed v1.7.1 so I rewrote my code as follows:

// MyAppDlg inherits nana::form
void MyAppDlg::onBrowseVideoSource(int32 index)
{
// _filebox is std::unique_ptr<nana::filebox>
_filebox.reset(new nana::filebox(*this, true));
_filebox->add_filter("All Files", "*.*");
_filebox->
3replies
23views
recent by elbui3  ·  Jul 18 at 3:10 pm
mariusm posted Jun 25 at 2:28 pm
I need to make a function which open new form. In this form need to use mouse event and change label caption. Need this form to open many times.

bool openHold() {
using namespace nana::gui;

form fm(nana::rectangle(20, 20, 300, 300));
fm.caption(L"Hello World");

static label lm(fm);
lm.caption(L"Hello, world!");
button change(fm), quit(fm);
change.caption(L"Change
5replies
30views
recent by Error Flynn  ·  Jun 26 at 9:14 pm
qPCR4vir posted Jun 26 at 8:19 am
https://stackoverflow.com/questions/56759600/text-over-picture


0replies
12views
mariusm posted Jun 22 at 2:21 pm
I want to build a program with system tray. For this I used WINAPI WinMain

When I close the program using LRESULT CALLBACK WindowProcedure I get this error: Nana.Gui detects a memory leaks in window_manager, 2 windows are not uninstalled

I try nana::API::exitall() but get error: 'exitall' : is not a member of 'nana::gui::API

I use Visual Studio 2008

2replies
11views
recent by mariusm  ·  Jun 25 at 2:22 pm
The nana::group caption and nana::checkbox caption are behaving strangely in certain PC. In one PC everything is fine and in some others, the caption is chopped or none existent!

I guess it is some sort of buffer corruption in the nana library.

4replies
76views
recent by ABD  ·  Jun 12 at 2:23 pm
wertex posted Jun 12 at 9:39 am
Is it possible with nana API create textbox component, that support simple html and show small icons (like in telegram messages)?

0replies
10views
I tried to compile nana according to this but I get the following error:

||=== Build: Debug in nana (compiler: GNU GCC Compiler) ===|
C:\nana\source\gui\filebox.cpp||In constructor 'nana::folderbox::folderbox(nana::window, const path_type&, std::__cxx11::string)':|
C:\nana\source\gui\filebox.cpp|1592|error: 'weakly_canonical' is not a member of 'fs'|
||=== Build finished: 1 error(s), 0 wa
1replies
21views
recent by jinhao  ·  May 27 at 2:31 am
I'm trying to let the user select some items in a multi-selection listbox, and then pop up a menu when the user right-clicks on the selected items. The problem is that right-clicking resets the selection. Is there any way around that? I think there should be some way to tell the listbox to only allow selecting with left-click. I'm using Nana 1.7.

11replies
97views
recent by ABD  ·  May 24 at 8:51 pm
besh81 posted May 16 at 12:02 pm
Hi All,

I'm working on a new project and I would like to create a customizable layout where the user can show/hide, arrange, move, resize, etc ... several panels.
As reference example think to the MS Visual Studio editor.

I've worked a little with the DOCK field and it seems to be a good start but not yet complete.

Is there someone who use the DOCK field? If yes, what are your impr
2replies
23views
recent by besh81  ·  May 20 at 3:32 pm
The code below does not let me select multiple folders. I tried Shift+mouse, Ctrl+mouse, Alt+mouse and non of them worked! What am I doing wrong?

int main()
{
nana::folderbox picker;

picker.allow_multi_select(true);
auto paths = picker.show();
if(paths.empty())
{
std::cout<<"Cancelled"<<std::endl;
}
else
{
for(auto & p : paths)
4replies
45views
recent by ABD  ·  May 19 at 2:55 pm
Jbec posted Apr 5 at 10:06 pm
Hello

Nana has an interesting way to align the different widgets. I found this article:

http://nanapro.org/en-us/blog/2016/05/an-introduction-to-nana-c-library/

Using colors offers a very clear vision of how widgets are distributed on the screen.

For simple designs it is fine, but for more complex ones it can be a real chaos.

Using nana-creator I recreate a complex window (abo
35replies
209views
recent by qPCR4vir  ·  May 10 at 6:49 pm
jinhao posted Apr 9 at 8:31 am
I find that many people use MinGW on Windows, but some redistros don't support standard library and COM well, and the configurations for MinGW and nana are complicated, therefore people often encounter the compiling/linkage errors.

So, I decided to create a simple IDE which would contain a MinGW and compiled nana. Also will provide a package management that can easy to update MinGW and nana,
5cac14971f5b0.png
28replies
249views
recent by _-LC-_  ·  May 10 at 2:14 pm
Hello, first of all thanks for your great work! :-)

For the listbox there are two models. Typically, if you have complicated data and you want to avoid data duplication and senseless back and forward conversions, you'd pick the shared_model.
The problem is that this model still forces you to do unnecessary conversions.
If you pick a shared_model and want to handle the container yoursel
2replies
35views
recent by _-LC-_  ·  May 7 at 11:35 am
Hello

I'm trying to compile nana-creator for linux. I downloaded the project and it includes a build/codeblocks_linux folder.

I opened that project and when I gave it to compile I get the following errors:

nana-creator/src/creator.cpp:179:9: error: could not convert ‘nana::filebox::operator()() const()’ from ‘std::vector<std::experimental::filesystem::v1::__cxx11:
3replies
28views
recent by Jbec  ·  May 5 at 5:37 pm
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft