trying to make an application can attach and detach a tab from window by drag and drop like google chrome web browser? - winapi

I'd like to make an application which user can drag and drop tab to make a new window contains
a tab control user holds. What i am looking for is the exact same functionality of Google
Chrome browser for window and Internet explorer 9. Both Applications create a new window if
if user drags and drop a tab out of original window. and vice versa.
How do i do this? Any advice or sample code will be appreciated

It's not a simple task, but if you work through it bit by bit...
Most tab controls will allow you to detect mousedown (and maybe even drag) and when the cursor is moved away from the tab row, you create a new window with a single tab (and maybe a frame depending on what you want).
When they drop, show the rest of the frame as required.
As for moving the content, this depends on your application layout but it can be as simple as changing the container of a control (SetParent()) or the destination of a render.
You can also just drag an "image" of the tab and only create the window when they drop.
Getting any more detail than this is going to be preety much impossible without specifics (and you actually accept an answer).

Related

How to mouse hover using Blue prism on a web page

I am trying to mouse hover a menu option using blue prism. I tried HTML/Win32/AA/Region mode while spying but none of them worked. If I click on that element, I will be navigated to a different page.
Any pointers will help.
Thanks
Not sure if you still need an answer on that as this question is more than month old.
If I understood you correctly, you want to hover mouse pointer over menu and then select one of the options from the drop down list. If so, there might be some options to achieve that without clicking on the menu itself.
If you want to open same link every time you navigate through this website, then you can launch the target URL instead of navigating through the menu.
Some HTML elements doesn't need to be visible to be active, on some websites you can 'click' on menu item without it being presented in form of drop down list. You can try to spy that element and navigate directly to it. If you won't be able to spy it you can search for correct element in application tree (Application Modeller -> Select some element -> click on arrow next to Identify button -> Open Application Navigator). Then you can use Mouse Click on that element via Navigate stage.
I've tried to imitate mouse hover on some website by spying whole browser window with Win32 mode, and then using Drop option in Navigate stage, giving the menu exact coordinates. Seems to be working, you can try this option as well.
You can test how menu reacts on Focus method in Navigate stage, but I wouldn't get my hopes up with this option.
If you share link to the website, then maybe I'll be able to help more.

Is it possible to make a webpage in FireFox take up the full window (no address-bar, etc.)?

I've been trying to use FireFox as a simple window for a webpage that I will not be leaving, so I don't need the address-bar or close buttons, but I would like to keep my task bar visible (i.e. I do not want to simply go full screen). The gists of what I am trying to achieve is a "full window mode". Is there an add on that allows this? Preferably, I'd like an add on that can easily be turned on and off.
To elaborate, I may have the window only be half of the screen, so a full screen mode that leaves the task bar visible would not be sufficient.
You can come close to this with some simple JavaScript, just a bookmarklet, which will open the currently viewed URL in a window with most of the info/action bars hidden:
javascript:void(window.open(location.href,"_blank","outerWidth=1000,outerHeight=650,top=0,left=250,menubar=no,toolbar=no,location=no,personalbar=no,status=no"))
You can get close to maximized with specifying appropriate numbers for outerWidth=1000,outerHeight=650,top=0,left=250 which match your screen size, but you will not get quite what you can do when maximized.
You can then maximize the window. Which gives you:
Window.open requires chrome privileges in order to hide the titlebar and locationbar which means an add-on must do it. You can then use add-ons to get the rest of the way.
Using the Hide Caption Titlebar Plus add-on (with appropriate options selected) will get you to a maximized window of:
And with the addition of the add-on Hide Navigation Bar, maximized and hitting the default F2 to hide the locationbar you get:
Non-maximized:
You also asked that it provide removal of the various action/status/tool bars when not maximized. These add-ons will do so.
Easily turning them on and off:
Hide Navigation Bar only hides the location bar if you hit F2. Hide Caption Titlebar Plus is a restartless add-on and thus can be enabled/disabled at will from about:addons (Ctrl+Shift+A). It can also be set to mostly affect only maximized windows, so may not be something you need to enable/disable on a regular basis.
Personally, if this was something I wanted, I would set up a separate Firefox profile which has these add-ons and the home page as the one I wanted displayed. I would then set up a shortcut that automatically opens that page and shows what I want. You may need to use something like the add-on Session Manager to automatically restore the maximized window, but the default functionality in Firefox may be sufficient. In order to have a shortcut that brings up another Firefox profile automatically, you will need to set the Target to something like:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -no-remote -P "your profile name"
This would allow you to bring up the page you wanted with a single click and not have the configuration disturb your normal use of Firefox. It would also be something that you would not need to mess around with enabling/disabling on a regular basis.
Many ways to do this:
There are, probably, many different combinations of add-ons which will get you to a similar look. There is, perhaps, even a single one which will do so. You should do some research on your own to find a combination that works for you. For the profile I was initially using to test, I did not need the Hide Navigation Bar add-on to hide the locationbar as that functionality was covered in a different add-on. However, if starting with a stock profile these two add-ons will get you to where it sounds like you want to be.
Taskbar is visible:
For all of the above images: If I had taken a shot of my entire desktop, you would see that that the Windows Taskbar is still visible (the Firefox window is just maximized, not full-screen). The above images are not full-screen for privacy reasons. I do not desire to share the windows I have open and my taskbar configuration. If I have the time later, I will re-take the window shots as full-screen shots after a clean re-boot.

Is there a way to make the displayed tab in Firefox "follow" the opened Inspector window(s)?

When I am debugging frontend work, I frequently have multiple Inspector windows open at the same time, each inspecting a different page. As I change Inspector windows, I would like the displayed tab or window to follow me. In other words, I would like the browser to always automatically change to the page I am inspecting; I do not want to change Inspector windows, then go to the browser and find the corresponding tab or window myself.
Is this possible in Firefox? Is it possible in any browser?
(I realize I could dock the Inspector to each tab or window. I do not want to do that because I use the multiple Inspector windows side-by-side for comparison.)
While I am not aware of any way to switch to the target browser tab when selecting a given inspector window, you can certainly do it the other way around:
Say you have 3 tabs opened, and you have opened devtools for each them, in window-mode (undocked). Now, whenever you select any of these 3 tabs, if you just hit F12 (or ctrl+shift+I/cmd+alt+I), then the corresponding devtools window will be brought to the front.
That's an easy way to keep track of which devtools window is linked to which browser tab.
Now, doing this the other way around would require a new feature to be implemented. This can't really be automatic (or at least hidden behind a config of some sorts) because it could be considered frustrating to some users, having their current tab being switched away from each time they click in a devtools window.
I have filed this bug to get it done: https://bugzilla.mozilla.org/show_bug.cgi?id=1163646

Is there a way to make changes to the titlebar with GTK2?

I have a desktop application written in Ruby that is using GTK2. It's just a small test application to play with GTK2, but I'm having problems achieving what I want to do. Is there any way using GTK2 to get at the titlebar (apart from setting the title), specifically to either add a button to it (beside the min/max/etc, B in the below diagram) or to add an option to the menu that pops up when you click the icon on the titlebar (A in the below diagram)?
I'm thinking there might not be because GTK is meant to work with many many different window managers, but I just wondered if there was. As a side question, what event does clicking the 'cross' button fire? At the moment if the user clicks that the window disappears but the program doesn't end - I need to capture that event and quit the program.
Thanks for any help, including hitting me over the head and telling me how silly I am.
Note that this is possible in GTK 3.10 and up, by using gtk_window_set_titlebar(). It replaces the window manager's title bar with a custom one. GtkHeaderBar is a good custom title bar class to use.
You can't, however, make it look just like the window manager would, because you won't know which window manager the user is running.
No, the title bar is owned by the window manager and you will typically not have direct access to it.
When the user tries to close the window by clicking the window manager's button, the window will receive the delete event.

How can I display a hidden view in Interface Builder which is on a unattached monitor?

I am using Interface Builder to work on NIBs and one of the NIBs must have a view on my external monitor which is not attached because I cannot see it on my MacBook. I have had this problem with editing iPad NIBs which I work on with my larger external monitor.
For some reason Interface Builder is not detecting that there is now just one screen and not pulling this view onto this monitor. There has to be a way to get this back into the visible space so that I can work on it. I have tried double clicking on the view icon in the organizer which normally brings the view forward but it is not coming into view.
What can I do? Is this really a bug that has been around this whole time?
I was seeing this problem as well -- the easiest way to fix it is:
In Interface Builder, double-click on the view object. This would ordinarily bring up the window and give it focus, but in this case it's invisible.
Hit Cmd-W to "close" the invisible window
Double-click the view object again; the window should now re-open onscreen.
Yes - it messes up this way when a XIB is created on a computer with multiple monitors but then later edited on different computer with just one.
To my knowledge the only way to fix is to to open the XIB with a text, or ideally XML, editor and search for negative values in various positioning strings. I've searched for {{-and then changed any negative values found to 0. For example, you'll run across {{-237,172}} When you find the open brace, open brace, minus sign pattern then change the negative value to a zero. i.e. {{-237,172}} becomes {{0,172}}.
When you re-open the XIB in IB you'll then be able to see your views.
To be safe make a copy of the XIB before hand editing.
Try using Exposé to see if the window shows up there. Ordinarily you can use Window > Arrange in Front to rearrange your windows, but it seems the non-document windows in IB don't obey ordinary Cocoa window handling so this command has no effect on them.
I wasn't able to reproduce it myself (when I disconnected my 2nd monitor, the window on it moved to my main monitor), but it may have something to do with the arrangement of your screens. If this turns out to be an IB bug you can reproduce, please file it (bugreport.apple.com).
Not sure if this will work, but open the window from your xib (double-click it) in Interface builder, then go to the "Window Size" section of the inspector. 2 Places might help in there, first the "Initial Position" shows a representation of the window and you might be able to just drag it back to the proper place. Second is "Content Frame". There are "X and Y" settings so try changing them to 0 and see if that does it.
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>WhatEverYouNamedIT</string>
<string>UIResponder</string>
<string>{{237, 644}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object
I opened the .xib file with Dashcode and changed the {{237, 644} to {{0, 172} saved and opened with IB and the view "canvas" windows was back on my laptop screen everything else opened up on my external monitor.
THANKS!!!

Resources