Is there a gui designer for wxwidgets on linux with Eclipse?

I want to create a graphical application using C ++ and wxWidgets. The problem is that I cannot find the Form Designer IDE to use. I hope if eclipse has something like a QT constructor.

any decisions

+6
source share
7 answers

wxFormBuilder is pretty good. It is stable and supports most standard widgets.

+5
source

While I'm not sure about integration with Eclipse, you can run wxGlade to design the interfaces, and then export the code.

+2
source

wxsmith plugin for Code :: Blocks worth checking out. That would mean switching the IDE, but C :: B is cross-platform like Eclipse.

+2
source

IMOs using such form designer tools should be avoided. They are like crutches for people who don’t know what they are doing. The disadvantage is that they generate a huge amount of code that the user does not understand. They are great for quickly creating a quick prototype of a toy app. However, one day one of your applications may turn into a successful product that needs to be supported. Guess what? Tools are limited and inefficient and cannot be used to support the graphical interface of any real complexity or complexity. So, all this irreplaceable code created by the tool must be rewritten by someone who used this tool, and therefore did not learn how to write GUI code!

This process happened to me a couple of times, back in the days when GUIs first became popular. Then I found out that there is no way to learn how to encode the graphical interface, and the only way to do this is to roll up the sleeves and write the code.

I understand why form builder tools are so popular. Many GUI interfaces present a major coding problem: code codes are required that determine the position of the upper left and lower right pixels of each last control β€” all of which must be changed whenever something moves. (MFC and .NET spring).

Here wxWidgets is large. If you learn to use sizers , you will no longer need to specify a pixel position. So, this is my answer to the original question: avoid all of these tools for building forms of dubious quality and dubious integration with Eclipse, but instead learn to use sizers so that you can code your graphical interfaces directly in the Eclipse editor window.

As a simple example, here is the code for the form.

wxPanel * panel = new wxPanel(this,-1,wxPoint(-1,-1),wxSize(1000,1000)); wxSizerFlags szrflags(0); szrflags.Border(wxALL,5); wxBoxSizer * szrCRUDForm = new wxBoxSizer(wxVERTICAL ); wxFlexGridSizer * szr = new wxFlexGridSizer(2,1,1); wxStaticText * field1text = new wxStaticText(panel,-1,"Entry Field #1"); wxTextCtrl * field1ctrl = new wxTextCtrl(panel,-1," "); wxStaticText * field2text = new wxStaticText(panel,-1,"Second Entry Field"); wxTextCtrl * field2ctrl = new wxTextCtrl(panel,-1," "); wxStaticText * field3text = new wxStaticText(panel,-1, "A very big entry field\n" "with a lot of description\n" "Spread over several long lines of text"); wxTextCtrl * field3ctrl = new wxTextCtrl(panel,-1,"",wxPoint(-1,-1), wxSize(600,-1)); wxStaticText * field4text = new wxStaticText(panel,-1,"Yet another Field"); wxTextCtrl * field4ctrl = new wxTextCtrl(panel,-1," "); szr->Add( field1text,szrflags ); szr->Add( field1ctrl,szrflags ); szr->Add( field2text,szrflags ); szr->Add( field2ctrl,szrflags ); szr->Add( field3text,szrflags ); szr->Add( field3ctrl,szrflags ); szr->Add( field4text,szrflags ); szr->Add( field4ctrl,szrflags ); wxBoxSizer * szrButtons = new wxBoxSizer( wxHORIZONTAL ); szrButtons->Add( new wxButton(panel,-1,L"CREATE"),szrflags); szrButtons->Add( new wxButton(panel,-1,L"READ"),szrflags); szrButtons->Add( new wxButton(panel,-1,L"UPDATE"),szrflags); szrButtons->Add( new wxButton(panel,-1,L"DELETE"),szrflags); szrCRUDForm->Add( szr ); szrCRUDForm->Add( szrButtons ); SetSizer(szrCRUDForm); Produces the following GUI, without requiring any pushing or pulling 

Produces the following graphical interface

enter image description here

Here is the sizer tutorial http://zetcode.com/tutorials/wxwidgetstutorial/layoutmanagement/

+1
source

As indicated in the ravenspoint index, it is best to copy your forms. This works well with eclipse (for those interested). run wx-config --cppflags and paste directories/headers into the eclipse project settings then run wx-configure --libs and paste -L and -L into the eclipse project settings and you're ready to go.

Make sure you also set the flags shown by wx-config.

+1
source

Philasmicos has a free wxWidgets GUI Designer for Windows and Linux.

You can find here

I do not know why this is only on a German site.

0
source

If you are looking for an IDE with a visual form editor, this is Code :: Blocks . He integrated the wxSmith plugin. Work as always. I don't know if there is any plugin for Eclipse, but Eclipse + wxFormBuilder is one of the best options for me.

0
source

Source: https://habr.com/ru/post/888323/


All Articles