I want to be able to duplicate a window at the compositor/window manager level.
That is, when the user open a weston-terminal, I want to display it as 2 windows, and be able to apply movement/rotation to those windows.
To emphasize, I don't want to have 2 weston-terminal open, I really need to duplicate the window's content on screen.
Is that possible with weston and where should I look in the code?
I already compiled it and learned to rotate/move windows using weston-shell.c but don't know where to look after.
This isn't possible with the Weston implementation, in the manner you've described. You'd have to hack your own Weston implementation to do this, such that one client can bind to multiple surfaces.
An alternative to consider is to have a surface and subsurface, and have you client render to both the main surface and the subsurface.
Related
In GTK3 there was a property on the Gtk.Window class called window-position. By setting this property to Gtk.WindowPosition.CENTER it was possible to tell the window to render in the center of the screen.
In GTK4 this property has been removed. How to achieve the same behavior in GTK4, i.e. how to make the main window of my application to be rendered in the center of the screen?
I checked the migration guide but I couldn't find the solution.
There is no replacement API, since it can't possibly work cross-platform, so it is broken API by definition. As such, it was removed.
For example: this is impossible to implement when running on top of a Wayland session, since the protocol doesn't allow getting/setting global coordinates. If you still want to have something similar working, you'll have to call the specific platform API (for example, X11) for those platforms that you want to support.
Is there any software that allows designing the icon of a Modelica component, and then copy into Dymola?
It is hard to draw the picture in Dymola.
A short summary of the answers, there is 4 software support this task:
OMEdit;
MoVE;
InkSpace;
PowerPoint;
Yes, there is MoVE, but it seems development is stopped.
For some tasks OMEdit is better. Properties of graphical elements are nicely presented in a single dialog and you can easily edit the points of lines and polygons.
As an alternative you can use svg and png files, which can be nicely drawn with Inkscape.
Another option for creating icons and info-graphics is to make them in standard packages for drawing, save them in a proper format (e.g., .png) and then use them. This is what I do with my library.
One way I have done it is with powerpoint and wrote a macro that auto-names them: https://github.com/ORNL-Modelica/TRANSFORM-Library/blob/master/TRANSFORM/Resources/Images/Icons.pptm
Next to that is another one for info slides.
Another one worth a go is something like Inkscape (https://inkscape.org/) and then you can run a command line terminal to loop through them all and generate png/jpgs.
The following platform-independent method, i.e. works with arbitrary Modelica simulation environments, is particularly useful for sophisticated icons:
Use LibreOffice Draw for drawing an Icon
For each drawing, produce an image file in one of the desired format according to quality requirements
Include the image file within standard annotation for icons
Here is an example from the library GenKinetics:
An Icon draw in *.gif format: Inhibition Icon
A component employing the Icon: Port_I.mo
I am looking at a NetLogo model with lots of widgets. Which of them have code behind them? What global variables are hidden behind them? Which procedures do they call? How do I find out?
Solution (1): Open each widget one at a time, then look at what's back there. Make notes because I have to close this one to open the next one.
Solution (2): View the nlogo file in a text editor, scrolling down past the Code section, and dig out the widget code from all those numbers.
Neither of those solutions are very pleasant or fast.
What I would like is a quick way to see what lurks behind the widgets on the Interface. Is there a tool that will do that?
Yes! (update Jan 2017)
At [modelingcommons.org][1], download nivi.
nivi stands for "NetLogo Interface Variables Information". It is a NetLogo 6.0 file that parses the information about the widgets into a report that you can read on the screen or copy/paste.
It requires version 6.0 of NetLogo, but will use files created by earlier versions of NetLogo as data.
[1] http://modelingcommons.org/browse/one_model/4962
I have made a gui in MATLAB wherein I need the window to be fullscreen directly after I run the application. However, this does not happen so, and instead, a smaller window is generated, and as a result, the TABs that I have designed, look out of shape...
http://i42.tinypic.com/iogjfo.jpg
Suggest options as to what could be done in the code to get it to fullscreen like this:
http://i41.tinypic.com/2ufvpf6.jpg
Mathworks has provided some function for doing this: http://www.mathworks.co.uk/support/solutions/en/data/1-3MY8PN/index.html?solution=1-3MY8PN
You can resize the window to make it the size of the screen (though the window will not be "maximized"), without having to download extra files: http://www.mathworks.co.uk/support/solutions/en/data/1-4TEZ9X/index.html?product=SL&solution=1-4TEZ9X
There are lots of matlab examples online, so searching is highly recommended.
I am trying to create GTK Widget like shows in following Images
Is it possible to create it in GTK+ under C,
I tried using GtkExpander but it is not working out ...
Can any one Help....
Stripping the arrow is quite trivial. Just append the following code to you $HOME/.gtkrc-2.0 (or create it if not found):
style "pradeep" {
GtkExpander::expander-size = 0
GtkExpander::expander-spacing = 0
}
widget "*.GtkExpander" style "pradeep"
This is done by customizing the appearance using resource files. You can get the same result programmatically by changing the GtkExpander style properties.
Furthermore, you can connect your own callback to its "activate" signal and switch the background color of the widget whenever is active or not. And a lot more...
Just remember someone loves to have a consistent user interface.
If what you want is to duplicate the look, then there are two very inefficient solutions to the problem:
Write your own GTK theme engine (see Murrine or Clearlooks).
Replace your entire program by a GtkDrawingArea widget and use Cairo to draw exactly the look you want. You'll be on your own then, though, so you'll have to write all your widget placement algorithms, buttons, expanders, menus, and whatnot, from scratch.
GTK isn't really meant for this sort of thing. The whole point of GTK is that you design your user interface with the standard widgets, and they just work with whatever theme, language, or accessibility technologies your users need to use. If you design your own look and there's no way to change it, then someone with color blindness or poor eyesight won't be able to use it. Or the text will get all misaligned if someone uses your application in another language. Or at the very least, maybe someone just likes a black desktop with white lettering, and your application will stick out and look really ugly on that user's computer. If you really need to make it look exactly that way, then probably GTK isn't the right tool for you.