Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting wxWidgets C++ need a gentle nudge

Tags:

c++

c#

wxwidgets

So I've been learning C# for like a year now (I'm 20 years old) and I'm getting pretty confident with it. I've also been meddling with C++ every now and again. For example just recently I've been following the Nehe OpenGL tutorials for C++ and I find it a fun way of learning.

I want to start looking at creating cross platform GUI software after I stumbled across this library called FLTK (fluid something rather). After finally and painfully getting it to work I found it refreshing to know that there are solutions for GUI creation in C++, however I think FLTK looked pretty old.

So I googled around for some newer GUI frameworks and decided to start playing with wxWidgets (decided against Qt because of licensing). I downloaded it, compiled it, and looked to see if there were any IDE plug-ins for RAD development, as you can imagine going from drag and drop a component onto a form in C# I was hoping for something similar.

I learned that code::blocks has something of the sort so I tried that out. It was alright but the thing that turned me off was the horrible code completion; it would only show members and methods in the current object and nothing for the #included header files. I understand that code completion/IntelliSense isn't easy for C++ but Visual Studio 2008 handles it pretty good. I did find some other RAD tools like wxFormBuilder but it costs money, not something I want to do for simply learning.

So my TLDR question is if anyone has had experience with wxWidgets? Do you just develop in whatever IDE you're comfortable with and just code the GUI? Meaning no visual helpers? Perhaps you could give me a nudge in what direction I should be going :)

Thanks, this is also my first post on this site albeit I have read many threads before that have helped me solve copious problems. Cheers!

like image 666
Daniel Avatar asked Jan 21 '10 00:01

Daniel


2 Answers

My suggestion is to learn how to do GUI layout with wxWidgets in code, then when you get good at it learn how to use the GUI tools.

Doing this kind of work manually for a while gives you the understanding about what you need ("Ok, I need a wxSizer, vertical, to put these two horizontal wxSizers into, where I put my a wxStaticText and a wxTextCtl for each line ...")... where as I think if you started out with the GUI tools you'd just tend to get annoyed because (last time I looked) none of them were Drag And Drop editors like you get with .NET.

like image 133
RyanWilcox Avatar answered Sep 22 '22 11:09

RyanWilcox


Definitely give Code::Blocks another try. It is a WONDERFUL environment to work with wxWidgets in. It comes with a form designer and templates for wxWidgets projects, so I can't imagine working without it.

Also, for a good beginner's introduction to wxWidgets, try this page. It helped me alot when I started with it.

like image 22
Nathan Osman Avatar answered Sep 20 '22 11:09

Nathan Osman