Sencha MessageBox vs Notification usage preference - extjs

Sencha Touch has 2 classes Ext.device.Notification and Ext.Msg to display messages.
As per documentation of Ext.device.Notification Notifications are used to show native dialog boxes. The Simulator implementation will use Ext.MessageBox for show and a simply animation when you call vibrate. In otherwords, while testing in simulator/chrome emulation, Notifications behaves like MessageBox. But on actual device, it launches native device notification.
So I was wondering why would we not always use Ext.device.Notification to show Notifications ? Is there a need to use Ext.Msg? Are there any performance issues of using Notification over Msg?

Haven't used Ext.device.Notification so far but it seems that you can not style this type of message as you could style Ext.Msg. So it should be easier to include Ext.Msg into your app theme and have a consistent look.
On the other hand (as you already mentioned) you can vibrate the device using Ext.device.Notification. This is not possible using Ext.Msg though.
That being said these two classes are not completely interchangeable.

Related

What code is required to enable client-side decoration in Gnome 3 with X without using GTK?

Returning user here. I have a requirement to migrate a system of OpenMotif 2.3 apps currently running under RHEL5, Gnome Desktop 2.x, to Gnome 3 under RHEL7. The problem is that the apps require modifying the window menu, adding items on a per-window basis and accelerators. Currently we are required by our customer not to migrate to GTK or any other widget set. Customer security requirements require using gnome-shell, gdm, et al, so xfce or anything that uses an external process for screen locking is unusable.
I've looked at the mess that is gnome-shell, and while I've found the JavaScript that assembles the window menu, it requires access to the window property holding the customized menu. I see no way to have JavaScript call back into C code to do this. (If all else fails, I could use xprop to dump the property and go from there.)
I'm thinking client-side decoration, with all of its horrors of having to manage windows yourself, might be the solution here. I can't seem to get CSD to kick in, though, without using GTK. I've tried applying the _GTK_FRAME_EXTENTS property, but gnome-shell ignores it. I've tried _NET_FRAME_EXTENTS with equal lack of success. The Extended Window Manager Hints documents say nothing about this. Google, of course, is ripe with comments about using GtkHeaderBar and discussion of avoiding CSD, neither of which apply here. Wayland-based items are equally unworkable.
I am quite familiar with modifying & extending the Motif widget set, having done that for a good chunk of my career here. I need to know how to tell the Window Manager to lay off without making the window override-redirect.

Custom WinForm with MessageBox Icon and Sound

I want to create a modal dialog that has more controls than what a standard .NET MessageBox offers you. I've created my own Windows Form that will be called with ShowDialog() to give the modal behavior. However, I'd like to utilize the graphics that come with MessageBox via MesageBoxIcon. Is this possible? Is it also possible to replicate playing the error/warning windows sounds associated with the message box icons (as they are set in the user's windows settings)?
See System.Drawing.SystemIcons class to display the system icons the MessageBox class uses, such as Question, Information and Warning.
e.Graphics.DrawImage(SystemIcons.Question.ToBitmap(), new Point(0, 0));
For the sounds, see the System.Media.SystemSounds class to play the associated sounds.
System.Media.SystemSounds.Asterisk.Play();
MessageBox is provided by the OS I'm afraid. You can extend it, but it requires a lot of work (see this CodeProject article for a tutorial). Your best bet is probably to start again with a control inheriting from Form as you suggest.
To access the icons, it's as simple as using the System.Drawing.SystemIcons class (documentation for that is here.)

Design Time Extension Properties In Winforms

I have built out a couple of keyboards for a touch aware app we are building in work. Since we use a controller that is aware of when the app is in touch screen mode I thought it would be nice if, in design mode, we could associate a control with a keyboard type and have the controller look after the calling of the keyboard.
One of the things I do not want to do is to sub class each type of control just to add this property as I feel it is a very heavy for small gain. I had thought of using the tag property but it is not available in all controls due to use.
I was wondering if there is a way of attaching a property to a control on design time for the purpose of adding this meta data. So to recap I would like to be able to give each control a value that would be read by the controller to decide what keyboard to show.
Yes, the designer supports this. Good examples of existing components that do this are ErrorProvider and HelpProvider. Note how they add properties to existing control types.
You'll want to implement your own component, it needs to implement the IExtenderProvider interface. The MSDN Library article for it has a good example that should help you getting it right.

Popup Outside the Bounds of the Silverlight Control

I'm simply wondering if it is possible to open one or more non-modal popups or dialogs, which are NOT limited to be displayed and moved within the bounds of the parent Silverlight control. Doesn't seem to be possible, even for out-of-browser installs. I hope I'm wrong :)
While the previous answers are true, strictly speaking it is possible in browser mode to have a real popup. At the moment it can only be done indirectly and with a lot more work than a normal Silverlight popup Window.
Basically you popup a new Silverlight app (or second instance of the current app) in a browser popup window (not a Silverlight popup). Silverlight can create the popup window via calls to Javascript.
The 2 Silverlight instances usually need to communicate data, but there are several solutions to that problem too. Javascript can also talk to Silverlight objects (love that feature) and pass information back or you could simply pass data one-way via URL parameters.
No this is not possible, Silverlight strictly renders to a single window (or if in Windowless mode the specific rectangle provided to it by its host).
As Anthony said this is not possible. I've heard from some of the people involved with Silverlight development that this is an often-requested feature and will most likely be added in an upcoming version. But I'm guessing it would only be available in "out of browser" mode.

Drawing directly to the screen via GTK or GDK

I am working on a demo application for a library me and two colleagues are writing to allow GNOME applications that run audio events though libCanberra to allow users to select visual events to replace them. This is an accessibility-minded effort to help both visually and aurally impaired users gain the benefits of audio alerts and such.
For our first demo we're simply trying to make the entire screen flash with a color when a button is pressed in our simple GTK sample app. I've been looking at the GTK documentation and all drawing that I've seen has had to do with drawing directly to a window or other widget. I want to control the entire screen's hue. Would this be a GDK thing? Am I completely off base?
Any links/help will be much appreciated! Thanks.
PS: This is being written in C, though functions should be the same between languages with proper bindings, I assume.
You cannot. Your application has access only to its own window, and does not (and should not) know anything about other windows, or the screen. The "screen" is managed by whatever back-end GTK uses (X? Win32? DirectFB?).
That said, you could try to create a "full-screen" window that covers the entire screen area. That is the way full-screen apps are implemented in most windowing systems.
GTK doesn't have such option AFAIK, you probably want to use the backend: Xlib (or Xcb) for that.

Resources