Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context Menu (aka ClickDownMenu) Draft #394

Open
libfud opened this issue Apr 21, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@libfud
Copy link

commented Apr 21, 2015

There should be something like a Contextual trait, where right clicking on a widget which implements it reveals a context menu. I think this shares some overlap with a drop down menu.

@mitchmindtree

This comment has been minimized.

Copy link
Member

commented Jul 11, 2015

I think this might even be best as its own Widget. A user could provide either a specific clickable area, or the ID of a widget that can be clicked to activate it. Usage could be something like:

RightClickMenu::new(some_menu)
    .click_area(position, dimensions) // A user could either use this
    .click_widget(SOME_WIDGET_ID) // or this.
    .react(...)
    .set(MY_CLICK_MENU, ui);

@mitchmindtree mitchmindtree added this to the 1.0.0 milestone Jul 11, 2015

@mitchmindtree mitchmindtree changed the title Context Menu Draft Context Menu (aka RightClickMenu) Draft Jul 11, 2015

@mitchmindtree

This comment has been minimized.

Copy link
Member

commented Jul 11, 2015

It would be cool if a user could specify which mouse button activates the menu. Perhaps ClickDownMenu is a better name.

@mitchmindtree mitchmindtree changed the title Context Menu (aka RightClickMenu) Draft Context Menu (aka ClickDownMenu) Draft Jul 11, 2015

@mitchmindtree

This comment has been minimized.

Copy link
Member

commented Jul 11, 2015

There should be a single Menu type/trait which can be shared between this and the Menu/ToolBar #417 and perhaps even the DropDownList (could be changed to DropDownMenu).

@flying-sheep

This comment has been minimized.

Copy link

commented Aug 27, 2015

in existing UI frameworks, both are rendered by creating a floating titlebarless window which is able to extend outside of the main window.

@agraven

This comment has been minimized.

Copy link

commented Jun 13, 2019

GTK3 applications using client side decoration actually draw the vast majority of popup menus in the actual application window instead of in a floating one. Electron applications do this as well (but that's because they simply can't make floating windows, I think).

@flying-sheep

This comment has been minimized.

Copy link

commented Jun 18, 2019

Interesting! Do they detect if the menu would fit into the window boundaries and only create a floating window if it doesn’t?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.