How to swap two wxWindows in two different notebooks? - wxwidgets

Our app is build on wxWidgets and designed to work on two displays. Each display has one wxAuiNotebook which in turn have one wxGLCanvas that we're rendering to.
I'd like a hotkey to be able to switch the two wxGLCanvas windows, so the user experience is that the canvas that was on Monitor #2 is now rendering to #1 and vise versa. (There are a bunch of toolbars and widgets surrounding the canvases, but I don't want them to switch displays.)
wxGLCanvas is a subclass of wxWindow, so I'm guessing it can happen at the level. What functions calls should I be looking at to accomplish this?
Sorry about the vagueness of my question. It aligns with my level of understanding of wxWidgets.

You could indeed use Reparent(), but for two wxGLCanvases it would make much more sense to simply use pointers to them in your code and just flip them when you want to switch them because it's just their contents that matters and not the windows themselves.

Related

One custom toolbar for multiple layouts in FileMaker Pro

I have a complex Filemaker database with multiple tables and layouts. What I would like to do is to add a toolbar to each layout. This, of course in view of maintainability of my database solution.
Of course, I could create a nice row of buttons (for example in the header of the layout) and copy past this to each separate layout. However, this is not really a great solution from a maintenance pont of view (if you want to change something you need to do so multiple times).
So... is there another way?
I am looking for something similar to e.g., include in php:
<?php
include 'header.php';
?>
Is there such a thing?
Not really. It could be achieved, mostly, with a bit of extra work. There is nothing out of the box, although you might find some samples on the web.
The closest thing in FileMaker is button bar with styles. Even this will not auto-update by default across different layouts.
You can use a webviewer based on a global field.
Another solution for older versionsis to use a portal with records creating buttons and a script which will do staff depending in which row button is clicked.
I am using a Navigation Window which may be recalled by either a push button which should be on each layout (you have not to change it because it only recall the Navigation Window) and/or a Script (I use to put it at the first place, as CMD-1).
Of course, you need to manage that the Navigation Window has to be closed before the navigation and execution of the Script managed by your Toolbar while, at the other side, you may add every other navigation need ;-)
Best wishes
Carmine Iaciofano - Area

PivotItemHeader in two rows?

I'm currently building an app where I use a PivotControl as the standard navigation. I managed to style the headers now but after some thought I realised that I should probably make the whole app sizeable for different screens. Not every screen (especially in IoT scenarios) will be a full HD screen :D
Thats the current control:
My problem now is that when I make the screen and the PivotItem smaller it just cuts off the end of the pivots like you can see at the right of the picture.
What I would rather have is that when the PivotItem gets smaller I want the Headers to stack.
Like in this quickly googled example:
But I don't know how I should make that possible...
Does anybody have an idea?
What are you trying to build?
Could the content be organized in other way?
Pivots or similar controls (tabs, segmented controls etc) work best with few items that are important to the user and deserve the central stage.
The screenshot you added violates several UI best practices and I suggest you find an alternative to structure your UI that is user friendly.

How to add scrolling option on component parameter GUI?

I'm using Dymola but I expect OpenModelica might very well be the same (or at least similar).
For a given component model sometimes it makes more sense to have lots of parameters shown on one "tab" of the parameter GUI. This can lead to an excessively long GUI which, for many reasons including for psychological reasons in relation to how humans process information, is not a appropriate solution.
To solve this I would like to add a vertical scroll bar on the parameter GUI. I believe I saw it once though I cannot recall exactly where.
For illustrative purposes look to the right side of your web browser window. That gray bar that goes up and down is the scrollbar :). I know, obvious but you never know.
I assume I need to put some command in an annotation somewhere though where and what command I am not sure. For example, I found some reference to a verticalScrollBarPolicy but alas, I can not find any documentation on this.
Anyone know how to do this?
EDIT #1:
Dymola (and Adrian indicated OpenModelica as well) will automatically create the scroll bar when the GUI gets larger than the screen. Unfortunately (at least in Dymola) there is little margin so if you GUI is a fraction smaller than the window the "OK" button will be covered by the ribbon on the bottom of the screen and the GUI will be needed to made slightly larger to make the scroll bar appear automatically. This is a reason why a manual option for a scrollbar would come in handy.
I think additional "tabs" might help?
As far as I know in OpenModelica we have a scroll bar for that dialog windows if the window would expand out of the screen.
As of this posting my understanding based on feedback on this forum, my own experience, and from additional discussions with others there is no current manual control of the GUI (i.e., size, scrollbars, etc.).
Your best bet if you come across issues (e.g., you have a super small 2nd monitor) is to use lots of tabs and keep descriptions very short (which is probably appropriate for most applications anyways).
This is a Dymola and OpenModelica issue not a modelica issue as it is not contained in the modelica specification (as I understand it).
If this changes and I find out about it I'll remove or update this post.

How to change a ComboBox to display items in a Loader?

I would like to have a ComboBox that handles large amounts of content by loading them asynchronously inside a Loader, so I can display a little BusyIndicator over the drop-down.
Is it maybe possible to achieve this through a style? I want to avoid having to recreate a ComboBox from scratch.
No. It may be possible in the future, though:
This one is a bit tricky to get right, and is still work in progress. It is not difficult to style the popup background, the same way it's currently doable for MenuStyle. What remains, as you pointed out, is to make that API public.
What we can't promise, is to be able to style the popup window shape. If QtQuick was backing store based, then most platforms support shaping the window. But QtQuick is OpenGL based, and desktop platforms support this in different ways. On mobile and embedded platforms, we can't use a separate window, so we need to build an abstraction that would use Item-based popups.
I'd suggest voting for and watching QTBUG-39476 if you're interested in this feature and don't want to write your own ComboBox.

Surface Table Project with Web Browsers

I'm working on a project that will use a Surface table to show web browsers that can be manipulated via the multitouch behaviors. I'd like to be able to show a browser at full screen and then resize, move, etc.
I'd also like to be able to launch a new, separate browser windows that can also be manipulated through multitouch.
Any suggestions on controls to look into for this?
Thanks!
This is a non-trivial task. As far as I know, many have tried and put months of effort into it but none of been very successful. Don't even bother trying to get something to work well based on WPF's built in WebBrowser control. Best bet is to start with the SurfaceScatterView control and trying to put a 'Chromium' control inside of it (http://wpfchromium.codeplex.com/). It appears that even this isn't straightforward though: http://wpfchromium.codeplex.com/discussions/244117