Sitecore Speak UI what layout and renderings for dialog opened from launchpad, desktop or content editor - sitecore

What layout and renderings should be used to create a dialog/app which can be started from
Launchpad
Content Editor button
Desktop start menu shortcut
As an example; here are images of the User Manager dialog. Note the differences in the appearance of the header bar in each case. I tried to examine this control in Sitecore to see how it was developed, but it is implemented in Sheer UI, not SPEAK UI. Can this be done automatically with a particular layout and combination of renderings, or would I need to detect the context of the application to control whether the launchpad icon is displayed in the top left corner of the dialog?
User Manager - launched from Launchpad
User Manager - launched from Content Editor
User Manager - launched from Desktop Start Menu

I can tell you that the user manager example here is actually Sheer UI rather than SPEAK.
For the dialog header use the "DialogPageStucture", "DashboardPageStrucuture" will give you the "GlobalHeader" placeholder as used below. I'm not sure how you mix and match them as the User Manager is Sheer UI rather than SPEAK.
For the launch pad button and header use "GlobalHeader" and "GlobalLogo" (this is the launch pad button). Add GlobalHeader into the GlobalHeader placeholder. Add GlobalLogo into GlobalHeader.StartButton.

Related

Setting a window menu with set_menubar(), is there an 'activated' signal I can connect to run custom code when a menu is opened from the bar?

Gtk 3.0 application (with C++ and GtkMM). I use set_menubar() to set the menu bar for the main window (loaded from a resource file, i.e. a "*.ui" XML file).
At run time, I want to be able to enable/disable (gray out) menu items in accordance with availability. I know that I can use "add_action()" and "remove_action()" to associate/dissociate the actions, which will have the desired effect. However it is complicated and expensive to add/remove the actions dynamically considering that the only time it matters which actions are available is when the user has opened the menu and is looking at it.
So I was thinking that I should be able to connect to an "activate" signal of the menu bar items to adjust the appearance of their menu each time the user clicks on an item, just before the corresponding menu is displayed to the user. Any idea how I can get to the signal from the Gio::Menu resource? Is this possible in theory but an unfortunate omission in the Glib API? Or is there something I don't understand?

Paste From QT Window to Another Application Input Widget

I am very new to C++ programming and the bulk of my program will be using the QT libraries. However, there is one part where I believe I will need to use Win32.
The scenario I want to code for is as follows:
I will have a QT application running. I want to be able to take some text which has been typed into a TextBox on the QT Window and paste that text into a TextBox in another application e.g. the address bar of Chrome, the address bar of Windows Explorer.
I want to be able to do that as a response to a button click on the QT Window. So, it would all happen in 3 steps. For example:
User types text into QT Window;
User places cursor in address bar of Chrome (Browser);
User clicks button on Window which pastes text into address bar of Chrome.
A nudge in the right direction would be most appreciated.
Edit - Additional Info
The application I’m building is a self-set assignment. I want to build a clipboard manager, similar to this old Delphi application http://www.joejoesoft.com/vcms/97/ . It will run in the system tray, in a minimised state.
The user, will put their focus into a text input in some application
which is running on their Windows machine e.g. Notepad.
Then, they will hit a hot key combination which will open a form (my QT Window.
The application will have been collecting clips as the user presses Ctrl-C (or by right-clicking) and those will be listed in that QT Form (just like the app in the link above).
The user then clicks on the particular item that they want paste and it will be pasted into the original input that they had put the cursor into.
Further Edit - further info
I'll break step 4 into a couple of sub-steps as it is causing confusion:
The user then clicks on the particular item that they want paste
Focus changes from QT Window back to the window of the other Win32 application which originally had focus
Content is pasted into the input control which now has the focus
I pretty much know how I can gather up items when the user copies things. But I have no idea how I will paste from my application to the target application.
Cheers

Creating a Control Panel Applet similar to built in applets

I have created a Control panel applet. The icon is placed in the control panel. When I double click my icon, it just opens a notepad application.
What I have to implement is, when I double click on my icon, it should open the GUI similar to the UI of other the Control panel (Power options of control panel.)
My question is, do I need to create a separate windows forms application? or any other way is there?
Creating address bar similar to explorer is not possible, since MS has not exposed such control.
You can take a look at the following link...
MFC: Address Bar control like Windows Explorer

Adding custom controls to a console window

Is it possible to add custom controls to a console window? You can use GetConsoleWindow() to get the window's handle, and then add your own menu items or consume all its events. I can't find any examples of people adding extra controls though.
I am developing a small, high performance serial terminal app. It is a console application - RichTextBox is too slow and has issues that make it unsuitable for VT100 terminal emulation.
I want to add some little graphics to show the state of the serial control lines (RTS/CTS/DTR/RI etc.) and perhaps a capture on/off toggle button. Ideally I'd like to add them to the window title bar. Bitmaps are all that are required.
After lots of research I found that it isn't easy, or even possible really.
You can add controls to the window with CreateWindow(), but of course only in the client area which is taken up entirely by the console text box. However, you can at least create floating controls that way, which hover over the text to provide status info etc.
You can put controls in the window borders but only with some hacking on XP or a new API that was introduced with Vista. The problem with this API is that it requires you to draw your own program icon and title text, and the console window doesn't seem to cope with it very well.
You can't add your own menu items because the console window doesn't pass the messages.
In the end I used the function keys for everything and gave a status indication by changing the console window icon.

Cocoa-track the menu of/inject options into itunes

Is there a way I can inject menu items into itunes or detect when menu items are pressed. I have an itunes plugin that executes code when iTunes launches, but how can I use that to detect menu item clicks or possibly inject new menu item options? For example adding a new contextual menu item when you right click on a library item, or detecting when the users clicks "Like" from the Ping menu.
Whatever functionality is not provided by an app's scripting bridge would only be accessible by hackery.
iTunes a Carbon app, not Cocoa, so that's more for you to learn about. iTunes even uses a call to ptrace(), passing PT_DENY_ATTACH to prevent you attaching a debugger to snoop around at runtime as well.
In other words, this is by no means an easy thing to do.