Giter Club home page Giter Club logo

Comments (6)

besh81 avatar besh81 commented on June 13, 2024

The idea is to have an additional set of options for each property (with each property I mean each class of property but could also be extended to each single property in the grid).
When clicking on the box a context menu appear. The default menu has only the reset entry (the menu of the color property has also the inherited entry).
Every single property has a default value that can be set.
The color of the box is empty if the property value is equal to the property default value. Is dark grey when the value is different from the default one.
The reset entry in the context menu needs to reset the value to the default one.

from nana-extra.

JamesBremner avatar JamesBremner commented on June 13, 2024

Some nice features! They should be documented somewhere!

What is it called?

How does one add to the items to the context menu?

Is there an option to hide the boxes if they are not used?

from nana-extra.

JamesBremner avatar JamesBremner commented on June 13, 2024

Why not simply use a pop-up menu when user right clicks on the property? Most users are accustomed to that behaviour. It would be more economical with screen space.

( Motivation: my application is very complex with lots of graphs. It is used in operating theaters where space is at a premium ( so no huge monitors ) and the doctors prefer the graphs to be as large as possible so they can be read without moving away from the patient. The result is that the menus and any other widgets need to be as small as possible so as not to get in the way of the graphs. This all means that I am always looking for places where I can save a pixel or two! )

from nana-extra.

besh81 avatar besh81 commented on June 13, 2024

I understand and could be a nice feature choose between the box and the right click.
I'll add to the todo list but don't expect this feature soon.
Thanks
Ciao

from nana-extra.

JamesBremner avatar JamesBremner commented on June 13, 2024

Some unanswered questions from two days ago:

Documentation?

Name?

How to add items to the context menu?

Option to hide?

from nana-extra.

besh81 avatar besh81 commented on June 13, 2024

Hi,

sorry for the delay but in these days I'm very busy and the time for the hobbies is close to zero.

The name of the box is "interaction box". Inside the code is referred as ibox_
Unfortunately there's no docs and right now no way to hide it (hope to be able to work on this soon 7/10 days).

To add a new entry to the contect menu that popup clicking on the ibox check the implementation of pg_color class

void pg_color::create(window wd)
{
	// ibox context menu
	menu_.append_splitter();
	// 2. Inherited
	menu_.append("Inherited", [this](const nana::menu::item_proxy& ip)
	{
		pg_color::value(nana::to_string(color_, ip.checked()));
		printf(ip.checked() ? "[X]\n" : "[ ]\n");
		emit_event();
	});
	menu_.enabled(2, show_inherited_);
	menu_.check_style(2, nana::menu::checks::highlight);

	...
}

Ciao

from nana-extra.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.