Creating a GUI

More
04 Aug 2012 22:08 #22821 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
cmorley wrote:

To reference widgets like so (like TOUCHY does):

self.builder.get_widget("hal_gremlin1").show_offsets = True

You DO need the builder as self.builder


Is there a way to see a list of the parameters of hal_gremlin1 without looking in the code?

John

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

More
04 Aug 2012 22:11 #22822 by cmorley
Replied by cmorley on topic Re:Creating a GUI
if it's exposed to glade then they will show in the glade editor ( as long as you start the editor as I said before )
other wise no, you would have to look at the source.
We will need to make a separate advanced gladeVCP manual :)

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

More
04 Aug 2012 22:26 #22823 by cmorley
Replied by cmorley on topic Re:Creating a GUI
if we want to promote building GUIs we should ask one of the MAKE script experts to add --install_screen to MAKE
like we do for installing comps


If you get time make a glade panel that represents a DRO widget - it doesn't have to work.
I will tinker to see if I can make it a gladeVCP widget.

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

More
04 Aug 2012 23:56 - 04 Aug 2012 23:57 #22830 by cmorley
Replied by cmorley on topic Re:Creating a GUI
One other way of piggybacking GUIs is to add the regular GUI in the DISPLAY= section
and loading the other one from hal
in the HAL section of the INI file
add HALCMD = loadusr gaxis

this is how gscreen does it in the sample configs and works well when developing a screen when not everything works yet (you can use the other screen to do whats missing)
Last edit: 04 Aug 2012 23:57 by cmorley.

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

More
05 Aug 2012 18:08 #22853 by cmorley
Replied by cmorley on topic Re:Creating a GUI
Here is some code that I used to have TOUCHY use a local (in the config's folder) glade file if available
or else use the regular one.

You could use this same idea to have your screen load the local one then you could have a different screen on each config just by having a different glade file in it.
Also makes it so you don't have to search all over for the glade file...
just another idea.

d = os.environ
localglade = os.path.join(d,"touchy.glade")
if os.path.exists(localglade):
print "\n**** TOUCHY INFO: Using local glade file from %s ****"% localglade
self.gladefile = localglade
else:
self.gladefile = os.path.join(datadir, "touchy.glade")
print"\n**** TOUCHY INFO: using glade file from: %s ****"% datadir
self.wTree = gtk.glade.XML(self.gladefile)

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

More
05 Aug 2012 18:30 #22855 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Cool, your full of info!

The DRO does it need to go into a top level window?

John

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

More
05 Aug 2012 18:44 #22856 by cmorley
Replied by cmorley on topic Re:Creating a GUI
i would think box or frame would be best.. it you right click a container you can force it to be a top level object.
but I can fix that later anyways.

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

More
05 Aug 2012 18:58 - 05 Aug 2012 18:59 #22857 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Ok this one is in a window but I can redo it into a box.



File Attachment:

File Name: dro3.zip
File Size:1 KB


John
Attachments:
Last edit: 05 Aug 2012 18:59 by BigJohnT.

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

More
05 Aug 2012 18:58 #22858 by cmorley
Replied by cmorley on topic Re:Creating a GUI
oops that environmental variable INI_DIR is not available...I'll find another way to get the config path...

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

More
05 Aug 2012 19:12 #22860 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
A slightly different one...
Attachments:

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

Time to create page: 0.104 seconds
Powered by Kunena Forum