GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 10:51 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Developing UI in GTK with Dynamically refreshing tables
PostPosted: Tue Mar 06, 2012 8:37 am 
Offline

Joined: Tue Mar 06, 2012 7:30 am
Posts: 2
HI,
I am a new bie in GTK but fair knowledge in programming and average in UI programming(Android, java experience).before delving into the GTK and its various bindings , I wanted to know where to begin (tutorials, topics to be studied) to develop the below kind of applications :

1>A UI depicting 4-5 tables showing dynamic values which keep on changing with time (~after very 5 secs)

2>The data can be depicted in the graphical format( a line graph or a bar graph depicting values).There will be a separate Tab for it.The Graph can also show the dynamic values getting changed - Auto refresh kind of display like in stock market applications.

3>Event based Alarm(Audible or Visible) which canbe triggered on the basis of these dynamic values, eg say if one value crosses X or is in between Y and Z the even will trigger the Alarm.

4>The Ability of the UI components to take the value from the System Layer ( like JNI interfaces in Android)

5> Ability to port it on multiple platform running linux - Embedded Boards

PLz assit.!
Keeping my eye on the "Replies" and refreshing evrytime anxiously !!
Thanks and Rgds,
Softy

_________________
"..i got paid for the comments i put for the code...than for the code...."

http://techshek4u.blogspot.com/


Top
 Profile  
 
 Post subject: Re: Developing UI in GTK with Dynamically refreshing tables
PostPosted: Tue Mar 06, 2012 1:40 pm 
Offline
Familiar Face

Joined: Thu Dec 15, 2011 6:23 pm
Posts: 36
Location: Hrvatska
I'm new with linux and GTK ( less than six month ).
Recently I ask myself same qustion as you did - that make me qualified to answer your question.
GTK is good toolbox and can solve all tasks you are planing without any problem.
The big question is which tool you will choose, on which platform, and what specific port of GTK.
Personaly, for me the biggest issue is to learn linux.
Then you must choose from one of language: C / C++ / python. you have java background, maybe it is GTKmm for you ( C++ ).

good luck !
Cheers !


Top
 Profile  
 
 Post subject: Re: Developing UI in GTK with Dynamically refreshing tables
PostPosted: Tue Mar 06, 2012 9:59 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Gtk works quite well in operating cross-platform, it isn't quite as cross-platform as c, but has the potential to be. The cross-platform functionality comes from glib where there are numerous wrappers around functions that implement differently on different platforms (e.g. printf). Hey you can even run it on Windows; at least `run' as much as anything can.
The gtk.org site has links in the documentation page to tutorials, a wide range of which is from zetcode. It is all gtk+2 stuff though it is only rare instances where modifications are needed to convert to gtk+3. One of the tutorials covers tables (layout management).
There's no graphing widget in gtk; however, many have designed their own custom widgets (a tutorial for which is also on the gtk site) including myself (https://github.com/pchilds/GtkPlot/tree/master/PlotLinear -- probably not the best example of easy to understand coding). These can be edited to your needs.
The events you talk about are simple to implement as you are picking up these values from somewhere you just need a conditional test and function call (i.e. this can be done in any programming language)
I'm not familiar with Java so can't really answer your 4th question except to say if you can do it in c (very likely) then the rest is trivial.
Any specific issues you have can be discussed in this forum, though don't bother refreshing too often. People on the forum are distributed around the world (so it could often be 24hrs)


Top
 Profile  
 
 Post subject: Re: Developing UI in GTK with Dynamically refreshing tables
PostPosted: Wed Mar 07, 2012 8:47 am 
Offline

Joined: Tue Mar 06, 2012 7:30 am
Posts: 2
Thanks for your input all.Recently i googled a code and modified it to make the table layout and filled the dummy values in it.
here is the code -> http://techshek4u.blogspot.in/2012/03/gtk-hangout.html
But actually I want to get the values refreshed after particular interval of time in the same table.(Dynamically the rows will be added and it will have the updated values)
Thanks for your inputs , I think I am ready to go , i will update the code once done.Plz keep adding your inputs.

_________________
"..i got paid for the comments i put for the code...than for the code...."

http://techshek4u.blogspot.com/


Top
 Profile  
 
 Post subject: Re: Developing UI in GTK with Dynamically refreshing tables
PostPosted: Wed Mar 07, 2012 9:14 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
Hi,

To help with question 1. The function you want is g_timeout_add() to add a call-back function which will be called after a set time. This is part of the GLib library which GTK+ depends on. See the documentation at - http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add

Within the call-back function you then do the updates to the table and return TRUE if you want the call-back to be called again after the set time or FALSE to stop the call-backs.

I think Paul has answered most of the other things. I too do not know enough about Java to give you an answer about JNI.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group