Changing application menubar in Eclipse RCP - layout

I want to change the position of the application menu in an Eclipse RCP application. This is what my UI designer wants it to look like:
Note that you have the menubar on the left and a tab-bar on the right, thus saving a line of vertical space. I want the menu to still be the application menu, and work with all the other Eclipse extensions for controlling it. I just want it in a different place. Can this be done in Eclipse/SWT?

Not by default, certainly not in Eclipse 3.x or even Eclipse 4.2 using the Workbench. RCP applications fill in the main menu bar using their subclass of org.eclipse.ui.application.ActionBarAdvisor, filling in org.eclipse.jface.action.MenuManagers. All of the default extensions in 3.x are also based on interacting with MenuManagers. The SWT Menu used in the menu bar doesn't allow that kind of overlay, AFAIK.
In Eclipse 4 the menus are described in a model, and then a variety of renderers (defaults provided by org.eclipse.e4.ui.workbench.renderers.swt.WorkbenchRendererFactory) are responsible for creating the SWT widgets. In theory it's possible to replace some or most of those renderers (in effect implementing your own menu system using SWT composites or buttons or canveses) but that sounds like a lot of work.

Related

menu with only the icon for small screens with foundation

Is there an easy way to do the toggle responsive menu for small screens with only foundation framework without using special plugin like slicknav etc?
I tried the top-bar and dropdown classes, but it is not rather responsive

Using Xcode Version 6.4 (6E7)

I'm trying to learn how to create apps by following the Standford swift class where the professor uses the constraint icons to position the UI objects on the views. In the course, the storyboard page shows the constraint icons at the bottom of the storyboard page.
I just download and started using Xcode Version 6.4 (6E7) and while creating the UI in a viewController I noticed the constraint buttons at the end of page are missing or not available. is there a way to get access to them thru the Xcode menus.
Where are they now?
The constraints buttons usually do not show up if you don't have auto layout enabled for the storyboard or XIB. The easiest way to check is to open the storyboard in Interface Builder, switch to the File Inspector (ALT+Command+1) and then check the Interface Builder Document section. There should be a checkbox for "Use Auto Layout". Is it checked?

Menu Button that does not dismiss options onclick in JavaFX 2

I am quite new in JavaFX and I have a question about the design. I am creating my main menu in FXML using Scene Builder. I have various menu buttons and each of these have a sub-menu. These sub-menu options will open new windows. Is it possible to declare these submenu choices so they do not dissapear after I click on them? If so, can I declare it in my fxml or I have to do it programatically?
Also, is it possible to detach it from the menu button? I would like to have my menu choices around 1 cm away from the menu button itself.
Thank you
Suggested Alternate Solution
If you want more flexibility in positioning a popup menu after a button click as well as fine control over when the menu shows and hides, try using a Button + a ContextMenu rather than a MenuButton.
The relevant methods are:
contextMenu.show(anchorNode, side, dx, dy)
contextMenu.hide()
There is sample code for triggering a context menu on a button press button in the ContextMenu javadoc.
You might also need to monitor the context menu's showingProperty and in a listener show the menu again if the JavaFX system has decided to try and hide it after some user action and you still want the menu visible.
Answers to additional unrelated comments
OK It sounds logical, yet since Im not really good in JavaFX yet, your Idea is quite challenging.
It's not that hard to implement, but from your subsequent comments it sounds like it's probably not the user interface you want for your users anyway (which makes sense to me because the interface you describe in your question seems a little strange).
I thought If it would be easier to have a static xml that have various menu choices, lets say aligned to the right and then whenever I click one of the choices, a new FXML would be loaded in the middle of the screen holding buttons for a submenu?
That seems logical. Sounds like a JavaFX version of a traditional web page layout with a navigation menu on the side controlling a content pane in the center.
A Java only version of that is: How to have menus in java desktop application. You could adapt that to a FXML based version without too much difficulty.
You might also be interested in Managing Multiple Screens in JavaFX.
Also, any tutorial for beginners would be greatly appreciated. These Oracle ones dont make too much sense for me
If you are beginning JavaFX, I recommend using just the Java API portions of JavaFX until you become familiar with them, and then use FXML only after you are comfortable with the Java API.
Personally, I think the Oracle JavaFX Tutorials are excellent. The difficulty for beginners is that the tutorials are also part reference material, which complicates portions of them (especially the deployment related pieces).
If you prefer a different tutorial style see:
Makery JavaFX tutorial (good for beginners)
zenjava tutorials (more advanced)

QToolBar: Is there a way to add QAction to a QToolBar in QtDesigner?

I've a PyQt4 Installed on Python 2.6. I wish to insert actions or widgets into a toolbar in QtDesigner instead of adding them in code, with addAction or addWidget (as simple as adding actions to a menu in design time).
You can add actions by dragging them to your tool bar from the "Action editor" dock window. You cannot add widgets to the tool bar in Qt Designer, I'm afraid you'll have to do this from your code.
You can create your own widget plugins with new or extended functionalities.
Just follow the definition rules from the documentation .
I use a lot of custom widgets inside the Qt Designer.
Once you have figured out, how it works, it becomes a really power full method for your design work flow inside Qt Designer.

Nautilus file explorer and GtkIconView

In order to learn GTK programming, I am building a simple GTK application that reads files in a directory and displays them as icons. I am trying to build something like the Nautilus icon view file explorer. I know the right pane uses GTK IconView but what does the left pane use to display list of places?
Also I have looked at the Nautilus source code but find it pretty complex for me, can anybody give me a simple example of using GTK IconView in C++?
thanks.
I'm guessing that the left pane uses the following:
Places - gtk.TreeView
Information - Custom layout made up of gtk.Image and gtk.Label widgets
Tree - gtk.TreeView
History - gtk.TreeView
Notes - gtk.TextView
Emblems - gtk.Layout with gtk.Image widgets positioned on it
As for the Nautilus window, I've heard that when showing in Icon View and Compact View modes, it uses a custom surface as the gtk.IconView was not deemed good enough. The List View mode most likely uses a gtk.TreeView.

Resources