HERE map disable map draggable, javaScript - events

I need to let user to disable map dragging. I have
behaviour.disable(H.mapevents.Behavior.DRAGGABLE)
but this parameter H.mapevents.Behavior.DRAGGABLE is probably wrong and disables all map behaviors. But how to find how this parameter should look like? Maybe someone knows where it is in documentation (I can't find it). Or maybe this is somewhere in behaviour or map object, but where?
So my question is, how to find it and how it should looks like.

Related

How to read content of WM_PAINT message?

My goal is to screen-scrape a portion of a program which constantly updates with new text. I have tried OCR with Tesseract but I believe it would be much more efficient to somehow intercept the text if possible. I have attempted using the GetWindowText() function, but it only returns the window title. Using Window Detective I have determined that whenever the window updates in the way I wish to capture, a WM_PAINT message is reliably sent to the window.
I have looked a bit into Windows API Hooks, but it seems that most of these techniques involving DLL injection are intended at sending new messages, not accessing the content of already sent messages.
How should I approach this problem?
When you say 'screen-scrape', is that what you really mean? Reading your post, it sounds like you actually want to get at the text in the child window or control in question - as text, and not just as a bitmap. To do that, you will need to:
Determine which child window or control actually contains the text you want to get at. It sounds like you may have already done that but if not, the tool of choice is generally Spy++. (Please note: the version of Spy that you use must match the 'bitness' of your application.)
Then, firstly, try to figure out whether the text in that window can be retrieved somehow. If it's a standard Windows control (specifically EDIT or RICHEDIT) then there are documented ways to do that, see MSDN.
If that doesn't pan out, you might have some success hooking calls to ExtTextOut(), although that's not a pleasant proposition and I think you might struggle to achieve it. That said, I believe the accepted way (in some sense of the word 'accepted') is here.
With reference to point 3, even if you achieve it, how would you know whether any particular call to ExtTextOut() was drawing to the window you're interested in? Answer, most likely, HWND WindowFromDC().
I hope that helps a little. Please don't come back at me with a bunch of detailed questions about how this might apply to your particular use-case. I'm not really interested in that, these are just intended as a few signposts.

What is the equivalent of python's "window.get_property("visible") in GTK+ (C)?

In order to show some window upon a clicking a button in the main window, i have to use "on_delete_event" signal to show or hide the appropriate windows. I know the pygtk "window.get_property("visible")". I searched the documentation there is no such thing as gtk.get
_property all i found was "gtk.mnemonics.get_visible or something like this.
I'm pretty sure somebody has used show and hide stuff in GTK+(C)
The functions you want are g_object_get() and g_object_set(). These apply to all GObjects, not just GtkWidget.
In the case of GtkWidget's "visible" property there is also a gtk_widget_get_visible() function (and a gtk_widget_is_viisble() function that also checks all parents of a GtkWidget) and an equivalent gtk_widget_set_visible().
Remember that GtkWindow is derived from GtkWidget; the former will use the latter's methods and properties where appropriate.

keyboard functions in mathematica

I am trying to find out what keyboard functionalities Mathematica has. Would appreciate anyone to give some help. Specifically, I want to:
1) How to implement something like "press any key to continue..." behavior
2) How to accept user input?
Many thanks.
First, you'll want to look at Input and ChoiceDialog for something simple.
If you want to build your own interface, you can use the dynamic interactivity components with CreateDialog to construct a custom notebook dialog window to accept and return whatever kind of input you'd like.
You might find the Introduction to Control Objects and Generalized Input tutorials useful as well.

Which widgets to use for a messenger

I'm currently learning to program Ruby with GUI. And has chosen wxruby. But has never used wxwidgets before. So my question is, which widgets do I use for the users list, the message list (scrolling) and the input area ?
Want to be able to choose font, color and use icons etc in the input area and the message list. And hoping to be able to have the userimage, nickname, status and smileys in the userlist also.
So anyone knows which to use?
For the input area and the message display, you'll probably want to use a wxRichTextCtrl, which will let you set fonts, colors, styles, etc. The main difference between the two is that the message display should be read-only. To change the style on the input area, you'll probably have wxButtons bound to functions to modify the style.
The userlist will probably be best off as a wxTreeCtrl, because you'll probably want to be able to have groups that you can expand. On the other hand, it might be a lot simpler to use a wxSimpleHtmlListBox because you will be able to use HTML to describe what you want to show, rather than having to worry about the finer details of another control.
For future reference, you might want to look at the Classes by Category page to help you figure out which controls you need, when you have an idea of what you're looking for.

How can I trace what happens during XAML loading?

I would like to find a way to see what happens while my XAML is being loaded. What classes are being instantiated, and in what order? Which properties are being set, to what values, and in what order? Which methods are being called (e.g. BeginInit, EndInit, etc.), in what order, and with what parameters? That sort of thing.
(If anyone's curious as to why, it's because the XAML loader is doing something magic that I can't duplicate in code, and I'm trying to figure out what it is.)
My first idea: Configure VS to debug into the .NET source code, and single-step through the XAML-loading code to see what happens. Unfortunately, source stepping has been busted for months, and there's no sign of that changing.
My second idea: Make my own classes that descend from WPF classes, override OnPropertyChanged, and do a Debug.WriteLine. Unfortunately, one of the classes I want to know about (BitmapImage) is sealed, so I can't descend from it.
Anyone have other ideas on how I could get some visibility into what the XAML loader is doing? Are there any tools (profiler, maybe?) that could give me a call graph? Is there a way to turn on some kind of logging in the XAML loader? Thoughts / suggestions?
Edit: The article Steve linked to does have the answer, though their sample code makes every event get displayed twice. For reference, here's how to make this work in code (no app.config changes required). Add these lines before the InitializeComponent() call (or type both lines into the Immediate window in the debugger):
PresentationTraceSources.Refresh();
PresentationTraceSources.MarkupSource.Switch.Level = SourceLevels.All;
This will cause detailed output to show up in VS's Output window, including the properties that get set magically behind the scenes.
You can trace a lot of the binding and loading with system.diagnostics. I've found a number of problems using this namespace. Its unwieldy like everything else in WPF, but it works. You can see what's getting set and where.

Resources