Evernote and Producteev GUI Toolkit - windows

I was looking at Evernote and Producteev for Windows and noticed they used similar GUI toolkits. What tookit(s) are they using? Here's some links., Producteev. (Check the Windows Screenshots) and Evernote.

I am the programmer for the Windows desktop application for Producteev. We didn't use any toolkits for the GUI. All of the UI code was written from scratch based on designs from our in-house artist. We drew a little bit of influence from Evernote (particularly in the toolbar area) to give a familiar look to the application, so that's why there's some similarities.
The application itself is written in C#, and I use GDI+ to make all the drawing calls. There are about a dozen custom-written controls, including buttons (some of which bring down menus), glowing text boxes, list boxes (for tasks). There's also another collection of them to replace for all of the default Windows controls in order to force anti-aliased text rasterizing.

Related

Should I use TMainMenu in Firemonkey to support both Windows and OS-X?

I'm reading the documentation for menus in Firemonkey desktop applications. It explains that there are two completely different menu components, one is to be used for Windows (TMenuBar) and the other is to be used for OS-X (TMainMenu).
Further, it also explains that a TMenuBar does not display on OS-X (nonstandard for OS-X), and that a TMainMenu is placed in the non-client area of the Windows form (nonstandard for Windows)
It's my understanding that Firemonkey is supposed to be one code-base for multiple platforms, but it appears they want me to separate the two. I can understand the menus work differently across both platforms, but it seems like an unnecessary pain to implement two different main menus (and conditionally show/hide them depending on the platform). I have no intention of using the special capabilities of menus specific to either platform. Not to mention the TMenuBar is completely ugly.
Since the TMainMenu also shows on Windows, but yet also claims it's "nonstandard for Windows", can I assume that the TMainMenu is sufficient for both? Or do I really need to implement a separate TMenuBar just for Windows? What are the implications if I don't separate them?
I saw this video, but It's for Delphi XE2, and I can't find such an option in the Delphi XE8 TMenuBar control. And again, the TMenuBar is very ugly and doesn't work like typical menus, like the TMainMenu does. I'm confused why they would advise to use this TMenuBar at all.
The help page linked to is wrong if being 'FireMonkey-native' (so to speak) is not a concern (for what I mean by that, see below). TMainMenu is not 'non-standard' on Windows - it wraps the Windows native menu bar API like the VCL equivalent. TMenuBar, in contrast, is completely custom.
That said, in general the fashion has been to use custom menu bars on Windows since Office 97 did so way back nearly twenty years ago, however the original menu bar API is still fully supported and used by (e.g.) Notepad in Windows 10. Further, writing a decent custom menu so that it fakes a real one properly - as well proving the additional functionalty that led to not using a real one in the first place - takes a fair bit of effort and detailed API knowledge. Unfortunately it might be doubted whether the FMX offering enjoyed this, which isn't to say it won't get better in the future.
One caveat - one reason to use TMenuBar might be if you are using FMX's custom styling options, and want your menu bars to fully participate.

Window Manager Themes and X11

In some WMs it is possible to choose theme which affects how windows are displayed, e.g. how a background of a button is coloured.
If I draw a window using bare Xlib calls, what should I do to conform to these theme-affected settings? I.e. am I supposed to write specific code for every possible WM? How is it resolved in general?
There are several theme types and they sometimes play together, but they should not be confused.
Window manager/border themes describe the decorations of each window, not the content
UI toolkit themes/widget themes describe how buttons, text fields etc. are drawn within a window
Icon themes describe which icons are used, covering application icons as well as file icons, action icons, toolbar icons etc.
Color themes define a palette of colors to be used within the framework of the other themes
Pointer themes define a set of mouse pointer icons
Some desktop environments bundle all these themes in "desktop" themes, or at least provide a frontend to choose all of them. Yet, these themes are independent from the desktop environment and also from each other. It is possible to set them using configuration files.
If you want your application to fit with the user's preferences, first of all you should adhere to the Icon theme. The Pointer theme is taken care of by the X server, as long as you only use stock mouse icons and don't upload your own to the X server.
The second obvious thing would be the Color theme, but unfortunately there is no standard for color themes, both Gtk+ and Qt frameworks provide this functionality in an independent fashion (and desktop theme configurators understand and manipulate both to provide consistency). You could do some magic to find out whether the user prefers Gtk+ colors or Qt colors (e.g., is running Gnome or KDE) and then extract the colors somewhat from there.
The hardest thing however is to provide a look and feel of your UI elements that is true to the UI toolkit theme(s) the user has chosen. First you would again have to decide between Gtk+ and Qt (other toolkits that are themeable exist as well, but are typically not themed by the user, or niche players like Enlightenment). Then you would have to re-implement the same functionality. Interestingly, many themes come with their own theme engine in Gtk+, and it is possible to let the theme engine do the work for you. An approach that was picked-up by several parties already. Examples:
Java Swing supports mimicing Gtk+ applications by implementing the Gtk+ themeing API and letting the Gtk+ theme engines do the work, works with some inconsistencies.
Firefox and other Mozilla Apps using XUL also do this, but there are always annoying differences, starting with the default font size.
Qt itself has a compatibility Gtk+ theme, that basically does the same; this one works pretty well.
My suggestion is to not reinvent the wheel, instead use Qt (or Gtk+ if you prefer) for GUI elements that go beyond basic drawing operations. Note that from my experience, even primitive drawing is typically better done with Qt than with Xlib.
The user gets the look&feel she expects (not only the look), the interface is rich and stable, and you save considerable time writing all this stuff.

How do I duplicate iTunes-style windows on Windows?

Can anyone provide some insight on how to "duplicate" an iTunes style window in Windows? Specifically I am looking for the following features:
1) rounded window
2) top and bottom toolbars
3) rounded text fields
I'm currently attempting a bit of cross-platform development with Real Studio and while I've discovered the mechanism by which to perform the rounded windows in OS X (declare method call to HIWindowSetContentBorderThickness or SetContentBorderThickness), I cannot find in the MSDN how to do similar things in Windows. Obviously Apple accomplished it in actually writing iTunes for Windows. Perhaps they wrote custom controls from the ground up.
SIDENOTE: I found this article from a few years back that briefly discusses it (http://discuss.joelonsoftware.com/default.asp?joel.3.454369.12), but this is pretty much all I could find.
Even if I can't duplicate it exactly, some direction on which Windows libraries might contain the functionality I need to do it "manually" would be nice. Any further assistance would be greatly appreciated.
There's no API for doing Apple-style rounded corners, but there are lower-level APIs for creating windows (both frame windows and controls) of any shape you want.
I don't use RealStudio, but I believe it allows you to access both .NET and native Win32 APIs, so:
If you're using .NET Windows.Forms, read Shaped Windows Forms and Controls in Visual Studio .NET. It's written for VB7, but should be easy to translate to your favorite language.
If you're using the raw Win32 API, there are at least two ways to do this. The simplest, but most limited, is to call the SetWindowRgn API, which sets the shape of your window to anything you can create as an HRGN. But that probably won't cut it for you. You don't want jagged edges; you want smooth curves, with alpha-blended borders, and maybe shadows. (At least that's what Apple does.) The Layered Windows API is the way to do this. It allows arbitrary shapes (even changing on the fly, if you use UpdateLayeredWindow—although you don't need that feature to emulate iTunes), alpha transparency, and complicated hit testing. Since the original article is very out of date, and doesn't cover all of the functionality, also see Layered Windows for the current documentation, which has links to the references.
there is a third party controls that do what you want. It works on Mac & Windows.
http://www.madebyfiga.com/fgsourcelist/
works well.
sb

What sort of GUI controls are used in Windows Resource Monitor?

I am new to GUI programming in Windows.
The Windows Resource Monitor (perfmon.exe /res) has four bars (CPU/Disk/Network/Memory) that have gradient backgrounds, as well as charts on the right for displaying recent CPU/Disk/Network/Memory usage.
I am wondering what kind of controls were used in this application. Are they readily available in C++ or in C#?
They are custom controls that are not available for external use, sorry.
You can use the Spy++ window finder tool (Spy++ is included with DevStudio) to find the window class names (and window boundaries).
http://msdn.microsoft.com/en-us/library/aa266028(v=vs.60).aspx
It shows that the overall window is a DirectUIHWND, the graphs are windows but the bars labelled CPU/Disk/Network, etc are not windows at all, the appear to be drawn directly in the resource monitors client area.
The implementation is not public for these controls, but I'm pretty sure they are incorporated using Windowless Controls.
Those bars remind me of Outlook bars. One old implementation is described in Code Project, and that one also has no windows on its own. Everything is painted inside.
Edit: That Code Project article was C# port. For C++ original go to Code Guru.

XNA and GUI controls (eg. xaml and xna)

Is there a way to get textboxes, labels and other wpf controls in xna that supports margins, etc that flexes for window size?
You might give CeGui a shot.
If your game needs advanced GUI capabilities, CeGui# might just hit the nail on the head for you. Marketese aside, this is a seriously good GUI library with Buttons, ListBoxes, Scrollbars, ProgressBars, Sliders, ComboBoxes and more.
To access the Xna version you'll need to check out the latest copy from the project's SVN and load up CeGui-XNA.sln.
There are other options listed in this thread, but I have no idea how well any of the others work (and it probably isn't a comprehensive list anymore).
The official GUI systems FAQ thread in the XNA Forum:
What GUI systems are there for the XNA framework?
CEGUI# is powerful, but it doesn't support the Xbox 360 (eg. its design doesn't include responding to game pad input) - a major overhaul would be required to refit it to be usable with something else than mouse and keyboard.
Not exactly what you're looking for, but here is an example of getting winforms GUI elements mixed in with XNA 3d content:
http://creators.xna.com/en-US/sample/winforms_series1
Check out SQUID: http://www.ionstar.org/
It's a really clean, fast, and engine independent UI system. I've worked with it extensively and really enjoy using it. The download includes sample code for XNA 3.1, Truevision3D, and SlimDX.
It is possible to embed an XNA game in a WPF form (google: XNA in WPF) if you target only Windows system. You will then have access to all the controls available in XPF for your 2D GUI.
If you also target Xbox 360 or Zune; you must make your own GUI library :(

Resources