Does rust-tui provide any mouse functionality above Termion? - rust

Rust TUI provides things like tabs and widgets. But they can't be clicked on. Termion supports this. Is there anyway to get click events to work in rust-tui's widgets?
Some other toolkits like blessed.js support this too.
I grepped the source code for "click" and couldn't find any examples of this.

Digging around this is an already-filed enhancement request.
https://github.com/fdehau/tui-rs/issues/166
The Rust-tui widgets do not support click events.

Related

Writing panels/docks with pyQt

I want to write something like a taskbar/dock/panel(like tint2,...) with pyQt5.
I know how to write regular GUI applications with it, but my tiling window manager(herbstluftwm) maximizes my panels and openbox makes them resizable etc.
My question : How can I make pyQt show my application as a panel instead of a window? I haven't found anything about that in the documentation.
Thank you.
Thanks to musicamente's help, i could find that the function setWindowFlags() is what I need. It allows to change the behavior of a window.
A website explaining this function is https://pythonprogramminglanguage.com/pyqt5-window-flags/

Hiding the Hamburger while in shell using template10

Sorry if my query's a bit noobish, a uwp beginner here.
I'm trying to morph the hamburger template from template10 and an existing project of mine. Basically, I'd like to have a certain page with the hamburger menu being invisible, and display my own navigation buttons on the page (an intro page). Upon navigation away to any other page the menu will be visible again.
I tried changing Hamburger's visibility state as an experiment, but it seems to be affecting the content as well. Is what I'm talking about possible with this control and I'm missing something obvious? Or I'd have to manage shell usage in app.xaml and load my intro page without the shell?
Many thanks for the creation of the t10 btw (Jerry, Daren and everyone else), me being confused in this thing doesn't at all diminish my appreciation
There are a few options for you here. IsPaneOpen will only work for you depending on the DisplayMode you choose. But if I were to guess, it's HamburgerMenu,.IsFullScreen that you are really wanting to use here.
You can change the SplitView mode to Inline and set IsPaneOpen to false. That will hide the Pane.

Python: Click by coordinate inside a window

The goal of the program i'm trying to write is a bot that can click and play flash games and press keys inside a window webpage even when I do not have the window selected. My question is very similar to this. What I want to know is how to use win32, selenium, and PIL to take screenshots, analyze the screenshots, and click and press buttons accordingly from the bot. I've looked through the win32api documentation and found little about how to click inside a window in the background.
If someone could give a link to someone who has done this before or just a little nudge in the right direction would be amazing!
pywinauto is even simpler, but it may not recognize Flash controls. The code should just look a bit shorter:
import pywinauto
app = pywinauto.Application().connect(path='process_name.exe')
app.MainDialog.click_input(coords=(953, 656))
To check which controls are visible:
app.MainDialog.print_control_identifiers()
P.S. If you work with Python 3.x, this clone is compatible with Py3.
If your goal is detecting and interacting with images on screen, you might want to take a look at Sikuli. This is exactly what it does. Sikuli automates anything you see on the screen. It uses image recognition to identify and control GUI components. It is especially useful when there is no easy access to a GUI's internal or source code. More info here.

Menu Button that does not dismiss options onclick in JavaFX 2

I am quite new in JavaFX and I have a question about the design. I am creating my main menu in FXML using Scene Builder. I have various menu buttons and each of these have a sub-menu. These sub-menu options will open new windows. Is it possible to declare these submenu choices so they do not dissapear after I click on them? If so, can I declare it in my fxml or I have to do it programatically?
Also, is it possible to detach it from the menu button? I would like to have my menu choices around 1 cm away from the menu button itself.
Thank you
Suggested Alternate Solution
If you want more flexibility in positioning a popup menu after a button click as well as fine control over when the menu shows and hides, try using a Button + a ContextMenu rather than a MenuButton.
The relevant methods are:
contextMenu.show(anchorNode, side, dx, dy)
contextMenu.hide()
There is sample code for triggering a context menu on a button press button in the ContextMenu javadoc.
You might also need to monitor the context menu's showingProperty and in a listener show the menu again if the JavaFX system has decided to try and hide it after some user action and you still want the menu visible.
Answers to additional unrelated comments
OK It sounds logical, yet since Im not really good in JavaFX yet, your Idea is quite challenging.
It's not that hard to implement, but from your subsequent comments it sounds like it's probably not the user interface you want for your users anyway (which makes sense to me because the interface you describe in your question seems a little strange).
I thought If it would be easier to have a static xml that have various menu choices, lets say aligned to the right and then whenever I click one of the choices, a new FXML would be loaded in the middle of the screen holding buttons for a submenu?
That seems logical. Sounds like a JavaFX version of a traditional web page layout with a navigation menu on the side controlling a content pane in the center.
A Java only version of that is: How to have menus in java desktop application. You could adapt that to a FXML based version without too much difficulty.
You might also be interested in Managing Multiple Screens in JavaFX.
Also, any tutorial for beginners would be greatly appreciated. These Oracle ones dont make too much sense for me
If you are beginning JavaFX, I recommend using just the Java API portions of JavaFX until you become familiar with them, and then use FXML only after you are comfortable with the Java API.
Personally, I think the Oracle JavaFX Tutorials are excellent. The difficulty for beginners is that the tutorials are also part reference material, which complicates portions of them (especially the deployment related pieces).
If you prefer a different tutorial style see:
Makery JavaFX tutorial (good for beginners)
zenjava tutorials (more advanced)

How to change the shape of a button in visual c++?

Is there an easy way to change the shape of a button in a form?
There could be other ways, but if you are not using WPF, you can use Images for buttons.
If you are using WPF, there are lots of options you can explore.
This might be a bit old, but may point the way, look at ownerdraw properties and styles and messages. http://msdn.microsoft.com/en-us/library/ms364048(v=vs.80).aspx
As an aside why would you want to change the shape of the button. Bear in mind your users, they more than likely don't like change.
You are referring to Ownerdraw buttons. The following links shall help you.
http://www.codeproject.com/KB/buttons/roundbuttons.aspx
how to create a round/circular button in win32 API using visual c++

Resources