Python Gtk NGCGUI

More
24 Nov 2012 23:19 #26902 by BigJohnT
Python Gtk NGCGUI was created by BigJohnT
Anyone had any thoughts on a Python Gtk replacement for NGCGUI that one could embed in a custom gui?

Just some random thoughts...
Perhaps two different Glade screens one for touch screens and one for mouse users. Possibly sharing the same code base. The touch screen version should have a popup keypad for each entry box.

A base widget that would load the subroutines at run time listed in the ini file.

Have the option of having a preamble and postamble files.

Be able to concatenate the subs together to form a whole file.

Probably missing a lot at this point but thinking out loud. I'm almost comfortable enough with Python and Gtk to pull this off

John

Please Log in or Create an account to join the conversation.

More
25 Nov 2012 01:49 #26903 by cncbasher
Replied by cncbasher on topic Python Gtk NGCGUI
i'd just love one John , but no idea of the best plan , so perhaps a glade popup widget is needed .

Please Log in or Create an account to join the conversation.

More
25 Nov 2012 02:22 - 25 Nov 2012 02:24 #26905 by BigJohnT
Replied by BigJohnT on topic Python Gtk NGCGUI
Just reading the create a custom GladeVCP widget on the wiki and I'm stuck at:

The first problem is that by building it with the GLADE editor we had to add it to a top window.
A top window can not be put into anything else so we must re-parent the custom widget.


I don't have a clue what re-parent means...

I'm guessing the key to this is to be able to "send" the file to LinuxCNC and the rest would be somewhat straightforward.

John
Last edit: 25 Nov 2012 02:24 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
25 Nov 2012 02:34 #26907 by cncbasher
Replied by cncbasher on topic Python Gtk NGCGUI
gtk.Widget.reparent(new_parent)

The reparent() method moves a widget from one gtk.Container to another

Please Log in or Create an account to join the conversation.

More
25 Nov 2012 02:38 #26908 by BigJohnT
Replied by BigJohnT on topic Python Gtk NGCGUI
I see it now in the calculator example Chris has:

window.reparent(self)

John

Please Log in or Create an account to join the conversation.

More
26 Nov 2012 20:15 - 26 Nov 2012 20:18 #26955 by BigJohnT
Replied by BigJohnT on topic Python Gtk NGCGUI
Ok I have a well behaved keyboard that I did in Glade. The plus/minus key toggles the sign, the BS key is a backspace key, the clear does what you think it should and the save does nothing at this point.



Now to try and figure out how to add it to a gui and send the result of the keyboard back to the entry widget. Any and all hints are appreciated.

John
Attachments:
Last edit: 26 Nov 2012 20:18 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 03:49 #26964 by cmorley
Replied by cmorley on topic Python Gtk NGCGUI
Put it in a dialog box.

have the entry boxes signal 'enter-notify-event' call a callback function that show this dialog.
The callback function automatically is sent the widget object (the entry widget) as the first argument.
When the keyboard function is done have it fill this entry widget with the data.

You may wish to use a different signal as the one I quoted will fire when ever the cursor goes over over the widget.
You may wish it to be over and click or have different behaviour depending if you have a touch screen or not.

Chris M

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 05:50 #26966 by BigJohnT
Replied by BigJohnT on topic Python Gtk NGCGUI
Ok, just like showing a Help About dialog I assume. I was under the impression you could make separate screens but I'm guessing that is only to include in Glade.

John

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 07:30 #26967 by cmorley
Replied by cmorley on topic Python Gtk NGCGUI
You could leave it as a separate window if you like.
a dialog is just convenient sometimes.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 07:40 #26968 by BigJohnT
Replied by BigJohnT on topic Python Gtk NGCGUI
I was trying to reparent it but was not getting anywhere that way... using builder to load both glade files and then reparent was the original plan LOL.

John

Please Log in or Create an account to join the conversation.

Time to create page: 0.301 seconds
Powered by Kunena Forum