All topics
530
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
Zeleska posted Nov 28 '19 at 5:16 am
Nana should have its centralized place to contribute to documentation? Yes :d
I have created a html documentation "template" for Nana in GitHub for everyone to contribute to it. You can clone the repository and start adding new pages and changes.
github.com/Zeleska/Nana-doc

Examine nana-button.html to understand how the class "accordion" and the class "panel" work.

The structure is
9replies
59views
recent by ravenspoint  ·  Dec 1 '19 at 2:38 pm
ravenspoint posted Nov 6 '19 at 8:44 pm
From the blog:


The really important part is the API (the design of the global structure, main classes and functions)


So, maybe, there should be some discussion about this?

The first thing that hits me when I look at nana's API design is the large numbers of things that serve almost the same purpose but are not quite identical. This really clutters up the design and makes nana hard
5dc32d3ba276e.png
21replies
157views
recent by ravenspoint  ·  Nov 26 '19 at 8:13 pm
abreulima posted Nov 25 '19 at 4:53 am
I'm new to Nana and not every familiar with C++.

I have an application where I need to open a listbox in a popup, I decided to create a 2nd form.

form table_form(API::make_center(480,350));
listbox lbTest(table_form, rectangle( 10, 10, 460, 180));

tables.append("Table",[&](menu::item_proxy ip)
{

table_form.show();

});
I need to access my listbox through other functions and it
3replies
22views
recent by ravenspoint  ·  Nov 26 '19 at 3:38 pm
The Goal and the goals of nana. : I just added this nana blog. Jinhao added this text some months ago on the wiki, with the intention of getting people helping to improve it. But I afraid it have not a good visibility there.
I hope it will help people understand a few things, and that it will be improved.
(you can just improve the wiki, and I will port it back)

20replies
177views
recent by qPCR4vir  ·  Nov 18 '19 at 3:49 pm
Yeah, the Winter is coming) (or Q- What does it mean), and we need to be prepared.
This will be a post blog I'm thinking about. The reason is that a new major version of the c++ standard is a great opportunity for all of us to improve our programming experience, but it is also a lot of work as library maintainer and tester.
Nana already has experience with this: the c++03 version was maint
5replies
61views
recent by qPCR4vir  ·  Nov 14 '19 at 10:01 am
Hi, I am using gcc-7.3.0 (provided with qt-5.13.1). When i try use nana-1.7.2 then there is a lot of linking problems with filesystem, either when i use nana or std filesystem. All of them are related with filebox and filesystem units.

1 - first approach - default build

cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/d/work/libextern/windows_mingw_x86_gcc_7.3.0/nana-1-7-2 ../nana
then m
19replies
128views
recent by bartek  ·  Nov 7 '19 at 8:18 pm
Avice posted Nov 7 '19 at 8:15 pm
Hello,
I create form on Main function.
And try create event on click with thread pool.

nana::threads::pool pool_{ 1 };

nana::button btnupdate(form, nana::rectangle{ 290, 165, 100, 30 });
btnupdate.caption("Update");

btnupdate.events().click([&] {
updater_log->append("\nTrying run", false);
nana::threads::pool_push(pool_, [&]{
upd
0replies
7views
I remember a few months back, after a few exchange of messages, Jinhao agreed to cleanup the NANA classes and method's name and their arguments in version 1.8.

I am wondering if this is still on?

For example:

if a class is called "Sort", it would be nice to have the methods like this:

Sort::sort_list();
Sort::sort_first();
Sort::sort_last();
Sort::sort_enable();
Sort::sort_disabl
5replies
93views
recent by ABD  ·  Nov 7 '19 at 2:21 am
Zeleska posted Nov 3 '19 at 9:27 am
I have a program in where the user "can add music files" by selecting a folder, the contents of the folder are "inserted" in a nana::treebox, and the songs information will be displayed in a nana::listbox.

Each node that represents a music file in the nana::treebox corresponds to an item in the nana::listbox, and a node that does not represent a music file, but the folder in where the music f
2replies
19views
recent by Zeleska  ·  Nov 5 '19 at 1:54 am
Avice posted Nov 1 '19 at 7:51 pm
Hello,
On main() function i create form with widgets. how i can access widget from example function foo()?
I want append text change progress widget value and etc..
If i make form global then i get errors on runtime.

3replies
19views
recent by Avice  ·  Nov 1 '19 at 9:09 pm
Avice posted Oct 31 '19 at 5:47 pm
I cant find what is wrong.
Im using latest nana version, IDE VS2013
Project using v120 toolset.
nana builded with v120 toolset. (compiled successfully, without any errors).
me code:

#include <nana/gui.hpp>
#pragma comment( lib, "nana_v120_Release_x86.lib" )
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{

if (fdwReason == DLL_PROCESS_ATTACH
1replies
14views
recent by Avice  ·  Nov 1 '19 at 5:41 pm
void add_folder(nana::treebox& treebox, nana::treebox::item_proxy proxy, std::filesystem::path path)
{
treebox.auto_draw(false);
for (std::filesystem::directory_iterator dir_iter{ path }; dir_iter != std::filesystem::directory_iterator{}; ++dir_iter) {
treebox.insert(proxy, dir_iter->path().u8string(), dir_iter->path().filename().u8string());
}
treebox.auto_draw(
5db6854b0d1ee.png
4replies
27views
recent by Zeleska  ·  Oct 29 '19 at 6:11 am
I have a property grid that contains properties ( name value pairs ). In the simplest case, a single property is displayed as a label ( for the name ) and a textbox ( for the value, which can be edited by the user ) displayed on a panel. The panels for all the properties are displayed in a panel with scrollbars.

This code:

form fm( 0, nana::size{ 400, 600 } );
fm.caption("PropGrid2 demo
5d9e01c545248.jpg
2replies
17views
recent by ravenspoint  ·  Oct 20 '19 at 9:55 pm
Hi, when using inputbox show functions i'm getting : error LNK2019: unresolved external symbol "private: void __thiscall nana::inputbox::_m_fetch_args

i use VS Code, build with "cppStandard": "c++17"
cl.exe PCOMMautom.cpp /Fe: PCOMMautom.exe /EHsc /Zi /D W32 /MT /I..., /LIBPATH:....

please, help me to fix

Thank you much

2replies
14views
recent by pawiq  ·  Oct 13 '19 at 7:09 pm
Holle posted Sep 18 '18 at 5:48 pm
Hi @ all,
I need help :-(

How can I get the data from a listbox?

Here is a example, what I am searching for:

#include <string.h>
#include <vector>
#include <windows.h>
#include <nana>
#include <nana>
#include <nana>
#include <nana>
#include <nana>

// namespaces
using namespace std;
using namespace nana;

// ------------------
5ba12c4eb6359.jpg
38replies
225views
recent by Error Flynn  ·  Oct 6 '19 at 7:56 pm
ZLS posted Oct 6 '19 at 2:55 pm
I can do this in WIN32 like this, but how can I do this in a common way?

HWND hwd = (HWND)fm.native_handle();
SetWindowLong(hwd, GWL_EXSTYLE, GetWindowLong(hwd, GWL_EXSTYLE)|WS_EX_LAYERED );
SetLayeredWindowAttributes(hwd,0,200,2);

0replies
7views
besh81 posted May 16 '19 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
6replies
58views
recent by ABD  ·  Oct 4 '19 at 1:51 pm
I have tried to fit an image to a button and right now the image is distorted. How to auto fit an image for the nana::button background so that it fills up the button without distorting the image.

The same question goes for auto fitting an icon to a button. In both cased I would like to maintain the aspect ration and fit them in the center of a button.

0replies
9views
ABD posted Sep 28 '19 at 3:20 pm
I tried to use \n to create two lines caption for a button but no success.
So, my question is how to have a two or three or more lines on button caption?

Can Jinhao add a method for the nana::button to accept multiline, like this:

button btn_run(fm, nana::rectangle(50, 320, 90, 45));
btn_run.multi_lines(true);
btn_run.caption("Quit \n this run");
Also, I need to know how to orient text
2replies
39views
recent by ABD  ·  Sep 29 '19 at 3:06 pm
kassane posted Sep 28 '19 at 7:01 pm
Today I converted the documentation to docset for use in zeal. But it was not accepted, according to the repository requirements: Nana Docset.



5d8f9ffa0a0b6.png
0replies
23views
ravenspoint posted Sep 24 '19 at 5:13 pm
What is a nested_form?

I do not understand the documentation

http://nanapro.org/en-us/documentation/page.php?u=/widgets/nested_form

The only code I could find does nothing at all

//class nested_form
nested_form::nested_form(const form& fm, const rectangle& r, const appearance& apr)
: form_base(fm.handle(), true, r, apr)
{
}

6replies
40views
recent by Error Flynn  ·  Sep 28 '19 at 2:15 am
ravenspoint posted Sep 23 '19 at 6:55 pm
I prefer to use open source code that is header only ( boost ) or provides an 'amalgamation' of the source code ( SQLite ) that can be added to the applications source, rather than a library that must be pre-built and linked to by the application build.

The advantage is that the developer does not need to ensure that the application and the library have been built with the exact same options,
8replies
51views
recent by ravenspoint  ·  Sep 27 '19 at 8:45 pm
Jbec posted Mar 27 '19 at 11:11 pm
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:
4replies
51views
recent by kassane  ·  Sep 27 '19 at 6:40 pm
bart9h posted Sep 27 '19 at 5:42 pm
I found an example of using OpenGL with Nana, but it renders on the whole main form. Is it possible to render on a widget instead?

On my application I need two separate OpenGL widgets, apart from a toolbar and other stuff.

I just discovered Nana yesterday, I would very much like to port my FLTK application to it.

0replies
13views
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft