LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-22-2010, 02:42 AM   #16
rogx
LQ Newbie
 
Registered: Jan 2005
Location: Roma, Italy
Distribution: slackware, slamd64
Posts: 23

Rep: Reputation: 15
try FLTK


try FLTK www.fltk.org
(I prefer the stable release: v1.1.10)

it's really cross-platform, and, also if it's C++,
You can create/edit Your GUI whith Fluid in few clicks
and make Your routines with simple plain C.
(But use g++ to compile).
A very little knowledge of C++ is needed to do more
complex GUI editing.

bye,
Giovanni Rosso
 
Old 06-22-2010, 07:35 AM   #17
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
If you're going to go with C++, I recommend you try Qt Creator.

It has a great graphical widget layout editor.
 
Old 06-22-2010, 07:50 AM   #18
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
http://lmgtfy.com/?q=C+UI+toolkit
 
Old 06-25-2010, 05:05 PM   #19
ryan858
Member
 
Registered: Feb 2009
Distribution: Slackware 12.2
Posts: 37

Rep: Reputation: 16
I don't see the problem with using a C++ library or whatever to make the gui... C++ is backwards compat. with C. C++ includes C. You can compile a C only source with g++, but not c++ with gcc... So C is compat. with C++ stuff, just not vice-versa, but that's not and issue here. It would be if you were trying to use C libs and stuff with C++... wouldn't work. But I don't see any problem with the other way 'round.

Even if, for some odd unforeseen reason, it doesn't work, then I (personally) don't think it's that difficult to convert C to C++. But there again, that's usually not necessary, since basically anything that works with C++ will work with C.

Basically, C++ IS C. It's an expanded version of C, with all of C fully intact.

Last edited by ryan858; 06-25-2010 at 05:08 PM.
 
0 members found this post helpful.
Old 06-25-2010, 05:34 PM   #20
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by ryan858 View Post
I don't see the problem with using a C++ library or whatever to make the gui... C++ is backwards compat. with C. C++ includes C. You can compile a C only source with g++, but not c++ with gcc... So C is compat. with C++ stuff, just not vice-versa, but that's not and issue here. It would be if you were trying to use C libs and stuff with C++... wouldn't work. But I don't see any problem with the other way 'round.

Even if, for some odd unforeseen reason, it doesn't work, then I (personally) don't think it's that difficult to convert C to C++. But there again, that's usually not necessary, since basically anything that works with C++ will work with C.

Basically, C++ IS C. It's an expanded version of C, with all of C fully intact.
Interesting take on the matter. So a GUI that is written in and requires C++ to use it can be used to create applications written only in C? Sounds a bit miraculous to me. Are there no parts of the GUI API that are defined in terms of C++ constructs? It would be very good news to me, if it is true.

--- rod.
 
Old 06-25-2010, 10:46 PM   #21
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Indeed, it's easy to mix C and C++. You can easily make a C wrapper around the C++ library you use. C and C++ mix very well.
 
Old 06-26-2010, 03:27 AM   #22
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by theNbomr View Post
Interesting take on the matter. So a GUI that is written in and requires C++ to use it can be used to create applications written only in C? Sounds a bit miraculous to me. Are there no parts of the GUI API that are defined in terms of C++ constructs? It would be very good news to me, if it is true.

--- rod.
You might also be interested in http://llvm.org/docs/FAQ.html#translatecxx .
 
Old 06-26-2010, 12:06 PM   #23
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by Sergei Steshenko View Post
You might also be interested in http://llvm.org/docs/FAQ.html#translatecxx .
How would that be useful in this case? The original intention was to code in C, not C++.
Unless you're proposing to translate the entire Qt lib into C-ish code....
--- rod.
 
Old 06-26-2010, 12:50 PM   #24
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by theNbomr View Post
...
Unless you're proposing to translate the entire Qt lib into C-ish code....
--- rod.
I think it's a possibility. It's an especially interesting possibility if one wants to create, say, Qt bindings to a scripting language which much better supports "C" binding than C++ bindings.
 
Old 06-27-2010, 01:37 PM   #25
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by theNbomr View Post
I think if you use Glade to generate the skeleton of your application GUI, you can drop to a C-only environment at the point when you're happy with the basic arrangement. As I understand it, the basic premise of GTK vs Windows is not very different in principle. Everything is a callback, and a response to a certain type of signal. I've never done any Windows GUI programming, but I believe the same concept is true there. In fact, I think the same is true for most GUI building toolkits.
I have done a bit of GTK coding, and after the initial learning curve, I found it fairly straightforward. You just need to have a decent reference on hand, to get the syntax right, and to see what options are possible. For GTK, I think the definitive reference is the online one at the GTK website. I also used a book which had a little more detail, but that was a few years ago, and I don't know what's been published more recently that is up-to-date and complete.

--- rod.
This is all essentially accurate.
 
Old 06-27-2010, 01:49 PM   #26
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by theNbomr View Post
Interesting take on the matter. So a GUI that is written in and requires C++ to use it can be used to create applications written only in C? Sounds a bit miraculous to me. Are there no parts of the GUI API that are defined in terms of C++ constructs? It would be very good news to me, if it is true.

--- rod.
Yup.

You do ordinarily need to write a C-callable stub function to pick up the C++ interface in the library you want to use, but after you do that, you are good to go.

I frequently go the other way, writing C++ callable C functions to pick up gtk C interfaces rather than use the gtk C++ libs (since pretty much all systems have the gtk libs, but the gtkmm libs are not as commonly found)

Also, for OP, Glade is a tool that does give you a capability that is strongly reminiscent of what Visual Studio gives, but Glade is far less intrusive than VS because VS imposes certain architectural requirements on you (and overwrites your code if you don't adhere to the requirements) that lead to somewhat bloated code. Glade, on the other hand, generates an XML file that is parsed at runtime by a parser that is built into the gtk libraries. This imposes no architectural constraints on your code, other than the requirement to invoke the builder when you invoke gtk. You also can rearrange your interface with no need to recompile - except, of course, in the case of changed functionality.

Personally I like Glade and recommend it. It isn't hard at all to use.

For a long time, I didn't use QT because of their licensing. However, they have recently changed that and I am looking a bit at QT now.
 
Old 06-27-2010, 04:02 PM   #27
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by jiml8 View Post
For a long time, I didn't use QT because of their licensing. However, they have recently changed that and I am looking a bit at QT now.
Qt Designer is awesome!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a web-based interface for user configuration program? hong2010 Linux - Software 8 04-09-2010 01:59 AM
New language user interface for any Linux distro, where do I start? hector3rd Linux - General 1 07-30-2009 01:48 PM
OpenOffice 3.0.1 "user interface language" error abti Linux - Software 3 06-01-2009 08:25 AM
Good linux chinese language language program? darsunt Linux - Software 1 04-10-2009 01:06 PM
SOLVED: OOo v3.0 FATAL ERROR: Unable to determine user interface language stress_junkie Linux - Software 0 02-13-2009 09:47 AM


All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration