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

MenuBar/ToolBar #417

Open
Woolworths opened this issue May 4, 2015 · 9 comments
Open

MenuBar/ToolBar #417

Woolworths opened this issue May 4, 2015 · 9 comments
Labels
Milestone

Comments

@Woolworths
Copy link

Both are pretty essential widgets and used in a lot of applications.

MenuBar is a list of menus that have childs in them (e.g. File -> New File).
When you click a parent/top level menu button, a list of child items should pop up from below the button.

ToolBar is a widget where you can add your own widgets to them. Think of the bar in you web browser; back button, forwards button, refresh button and text box.

@gaudecker
Copy link
Contributor

Menu bars are basically just nested dropdowns and buttons in a layout. Toolbars are just containers for other widgets.

Of course they usually have more features, like separators and key bindings in menu bars, and drag 'n drop, grouping, etc. in tool bars. The basic components for implementing these widgets already exist.

@Woolworths
Copy link
Author

both are essential and we need to ensure that they are accessible to all people

@mitchmindtree
Copy link
Contributor

Yes I agree it'd be nice to have these abstracted into their own widget types, thanks for the issue :)

@viperscape
Copy link

I was working on a container for a graph library using conrod, this may spark some ideas for you. I'm hopefully going to generalize this container in some way, so I can use it for both nodes and a tool pane.

PistonDevelopers/mush@de1e99e

I agree that a container object should probably exist in conrod, so child widgets can track along with position, visibility, and sizing. It'd be nice to specify these sub widgets's position and sizes in percentages then, to scale with the container.

@mitchmindtree
Copy link
Contributor

@viperscape definitely, the plan is to implement a Floating variant of the Canvas type (you can see it commented out in canvas/mod.rs). The Canvas type is pretty much the same as the Container that you describe - you can place any widget upon it and it will track it's position (see the canvas placement methods here and an example here). Currently, only the Split variant of the Canvas type is available (splits a window into sections) however I should have the Floating variant done within the next day or two 👍

@viperscape
Copy link

👍 that's great news

@ghost
Copy link

ghost commented Apr 23, 2018

What is the state of this widget ?
I really need them but don't have enough experience with conrod to implement a (fully) functioning version.

@bigs
Copy link

bigs commented Mar 20, 2019

i'd be willing to pick this up in my spare time the next few weeks! @mitchmindtree any updates re: floating canvas? i'd start there.

@mitchmindtree
Copy link
Contributor

@bigs since this issue was originally posted a ListSelect widget has been added that goes a long way towards this. To make a menu that drops down with submenus, you could use a stack of these ListSelects - one for each level of depth. To ensure that the lists "float" above surrounding widgets, be sure to call .floating(true) when building the ListSelect widgets. You can see a demo of how ListSelect works in the backends/conrod_glium/examples/list_select.rs example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants