kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Full-screen: BOY compatibility problems #446

Open claudio-rosati opened 6 years ago

claudio-rosati commented 6 years ago

Hello Kay,

here some compatibility problems an integrator has using Display Builder.

She: Is the library for functions used in scripts documented anywhere? E.g. how to put screen to full screen (we used the command "GUIUtil.fullScreen()" for BOY screens)

Me: I don’t know if putting full screen an OPI is possible via script. Anyway the documentation is available from the help.

She: We use this on the HMI touch panel PC, we have made a button to enable the operator to switch to and from full screen.

Me: if your Display Builder OPI has a proper Display width and height, you can use

org.csstudio.display.builder.runtime.script.ScriptUtil.openDisplay(
  Widget widget,
  java.lang.String file,
  java.lang.String target,
  java.util.Map<java.lang.String,java.lang.String> macros
)

with target set to “STANDALONE”. In this case the OPI will not have toolbar and status bar, but only the simple platform window’s titlebar, with the content sized to Display's width and height and the initial position to Display's x and y (after that, moving & resizing the window will be remembered).

She: Regarding standalone window, unfortunately this won't work for us since we need the full screen resolution of our monitor. The reason is that our GUI screens will be running on a dedicated touch panel PC and they have been designed for full screen resolution since they contain a lot of information. The idea is to have a button to got to and out of full screen since it's a touch screen interface, hence the need for the command.

Me: The only full screen command available is (by default) F11. If it doesn’t work is because in some platforms is defined differently. So open the Preferences dialog, select the General ➜ Keys category, search for “full” and check what is assigned to Toggle Full Screen. If nothing, then assign your command. I want to stress that this “full screen” mode removes only the Eclipse window decoration (window title and borders), not the toolbar, nor the status bar and the tabs bar.

She: I understand the role of F11, but the thing is that we have a touch screen and therefore no keyboard will be available once the touch panel PC is installed at ESS. Therefore we need a way to attach the toggle to and from fullscreen to a button that we put on the cs-studio screen, which is what we did when developing screens in BOY (cs-studio version 4.3.2).

I exchanged a few e-mails with your IT expert and we tried a few things regarding the on-screen keyboard, the status is as follows:

  • on-screen keyboard works for applications such as the terminal, firefox, and even for settings in cs-studio, e.g. setting the zoom level,
  • it works for BOY Text Input widget,
  • it does not work for the "Text Entry" widget, nor for setting widget properties in display builder.
kasemir commented 6 years ago

Well, not sure what to do about this.

As for full-screen, in phoebus we have decent full-screen support: When a display is detached, toolbar disabled, Window/Always show tabs disabled, a display in full screen uses the native full-screen mode, filling the screen 100% without any window decoration. That was never possible with BOY/RCP, you always have the 'tab' and window border.

I can obviously not duplicate or investigate the on-screen keyboard issue since I don't have your hardware. The underlying problem might be the hosting of JFX inside SWT.

claudio-rosati commented 6 years ago

I'll ask for a simple example to test in BOY first (she says it works in BOY) and then in Display Builder.

claudio-rosati commented 6 years ago

The integrator is starting CS-Studio using css --launcher.openFile <path>/init.opi, where init.opi is just an empty OPI file that has the following python script attached to it:

from org.csstudio.opibuilder.scriptUtil import ScriptUtil
from org.csstudio.opibuilder.scriptUtil import GUIUtil

GUIUtil.fullScreen()
ScriptUtil.openOPI(widget,"../Overview/overviewCompressor.opi",1,None)

So, can we provide something similar to fullScreen() (that is currently calling an eclipse action)?