smartgwt drawing - gwt

I am new to GWT and working on a project involving RPC and MySQL. I want to dynamically draw a network diagram which includes ovals and lines with arrows. I am considering using SmartGWT DrawOval and DrawLinePath.
1) Does it make sense to use SmartGWT for only drawing shapes and using GWT for other things like layouts/widgets/RPC/etc?
2)I know that it is recommended to not mix GWT and SmartGWT, so I want to know if I can safely use drawing widgets with other GWT components.
3) Is there better alternative than SmartGWT for drawing?
Thanks.

Nope, your approach is not a good one because of the answer to your second one.
No, it is not safe, as it is not recommended. Better only use SmartGWT components for your UI elements. But I suspect that you are a bit confused here. Only UI elements are not to be mixed. All the other facilities of GWT (i.e. RPC mechanisms), can, and actually will be required to, be part of your solution.
I see the following options:
Use SmartGWT UI elements for all your layers/widgets and of course use the drawing shapes you have identified to create your solution.
Use GWT elements and use other drawing libraries to achieve your goals. Such can be: gwt-connectors, raphaelgwt, lib-gwt-svg, depending whether connectors or simple lines are enough for your specifications.
Use SmartGWT UI elements and embed one of the above libraries to cover cases that the provided elements can't support. This can be tricky as the success of such marriage is not always guaranteed, but it can't be dismissed either. I had success, with such an approach, by using the lib-gwt-svg.

Related

Fluent Design Menus in Hololens

I'm currently designing a Hololens application and I'm pretty new to everything. The menu right now seems a little "old-school" for my taste. I'd like to create a user-friendly menu that could be pinned in place or move around as the user wishes.
I've been checking out fluent designs and found the DesignLab toolkit (https://unitylist.com/p/19/MR-Design-Labs-Unity) but its from 2017. Is there anything new I could use to make my menus?
You can use the ButtonHolographic from the HoloToolkit Example. These are flat designed uwp buttons. Take a look at the example scenes from the holotoolkit-example.
Check out the PressableButton.prefab in MRTK. This aligns pretty exactly with the system style and fluent design. There's documentation here:
https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/README_Button.html
It's relatively easy to use the same materials and shaders to create a background panel for text or other things that aren't buttons.
Keep an eye out for how the shader reacts when MRTK's simulated hand approaches it. There's a lot of cool reactive fluent elements there.

How to embed an SDL_Surface into GTK+

I am writing a game using SDL, but would like to use GTK+ for controls. I therefore need to embed an SDL_Surface into GTK+. How should I do this?
Edit
The game would be a tile-based transport simulator (like OpenTTD), but instead of using SDL to display the game UI (screenshot), I would use GTK+.
(I find OpenTTD's SDL-based GUI quite clumsy because it doesn't integrate with the OS and therefore doesn't support things like copy-paste, control with the arrow and tab keys, etc.)
Not knowing much about what you're currently trying to do I suspect that SDL and GTK+ may be overlapping quite a bit, so I'm not sure how useful would it be to use both at the same time.
When writing a game the purpose of any toolkit is usually to simply talk to the windowing system and to manage inputs as all the drawing is done using GL.
If you also plan to use GTK+ for controls I'd recommend to just use GTK+ and not mix the two.
With GTK+ the best way to use GL is to use the GtkGLArea widget which gives you a canvas where to draw using standard GL calls.
If instead you don't plan to use GL but you just want to draw in software, the right widget for that purpose would be GtkDrawingArea.
By joining the #gnome-games IRC channel on the irc.gnome.org server you may find people more knownledgeable that can guide you better than me. :)

SmartGWT skinning

Some SmartGWT components are composed by a lot of small images. This is the case of IButton for example that gets rendered using images.
I want to adapt the original SmartGWT CSS to fit my needs, that are basically color changes.
This answer is not quite accurate..
If you have staff with experience with image-based skinning and appropriate tools (eg Adobe Fireworks), start from whatever skin you like.
If you don't, and you need to change the colors but don't care about niceties like rounded corners in older IE (which are impossible without images), start from Simplicity, or start from the CSS3 rendering mode provided for the 3 most popular skins (from 3.1 on):
http://blog.isomorphic.com/css3-mode/
The latter approach (CSS3 mode) is more visually rich than Simplicity.
It seems, that the best way of skinning an SmartGWT application is starting from the Simplicity theme.
Isomorphic team suggest starting from this theme, as it uses less images that the others themes.
As far as I've read, everything should be done by hand (editing images, and CSS).

PyQt: Drag'n'Drop based Scrabble UI

I've written a simple Scrabble game with a simple Bot and Human part which can interact using consolebased I/O. Although there is already a Qt based overview of the current situation in the game: A simple custom QWidget which simply paints everything. No interaction or anything fancy yet.
(source: b52 at reaktor42.de)
My problem is that I would like to remove the consolebased interaction and switch to a new Drag'n'Drop based approach, but I'm not that familiar with PyQt and GUI development in general.
Therefor my question is, what would be a good way to go? Creating custom Layouts for Board and Rack and custom Letter Widget which would be dragable?
Thanks in advance
Oli
That looks pretty good! If you need to actually move things around on the screen using the mouse, I think the Graphics View Framework would be a better way to go than widgets.

gwt rounded panel (standards based widget akin to DecoratorPanel)

I'm trying to write an app that uses rounded corners for framing the app. I've found a package on google code that has a RoundedLinePanel and it seems to work... kind of.
I'm wondering a few things. Is this what people are using for creating divs with round corners in GWT? The release notes say it hasn't changed in almost a year.
Also, I can't seem to set a fixed height of this div (setHeight sets it on the wrapper div, not the inner one). so it's not useful to me as I have a fixed height app.
Finally, if anyone can suggest a better mechanism for creating rounded corner divs in GWT I'm all ears.
There is a beautiful way to rounded corners using CSS 3 (which thus doesn't work in IE<=8 , but will in IE9 developer preview). Take a look at http://css3please.com/ to see the styles involved. It's fairly simple using a border-radius (or -moz-border-radius or -webkit-border-radius property). In GWT just add a Style Class Name you want to the elements you want to have a rounded border and you are go. Of course supporting rounded corners in legacy browsers is harder, but do you need to do it?
For legacy browsers it is quite harder, depending on the actual context. It always involves images for the borders. You have to create images that mask the border of the box. What works is the trick described in this answer. To use this in GWT you can use either uibinder, htmlelement or you create your own widget. A broader explanation of the technique can also be found here.
The solution most commonly found, the decoratorPanel, is deprecated in the current version of GWT (if you use it with GWT 2.1.1, for example, you'll wind up with a mess of incompatilbility between the GWT-required doctype, the decoratorPanel, and IE, especially IE8).
The required GWT 2.1.1 doctype (!doctype html) also disables the popular rounded-corners.htc for IE8.
You can use the CSS3 series of rounded corner properties to add classes, but they will not work in IE versions prior to 9.
JQuery and other javascript rounded corners have a high probability of conflicting with the native GWT js, so we abandoned those as a possible solution, though I personally did no testing for these.
We wound up having to use rounded corner images in order to be truly cross-browser compliant and create a consistent look.