As next post to my previous one, called "Getting tired of GUI programming" I noticed my idea was not as new as it seemed ..
XUL is a language used for simple windows in browsers, but can also be a stand alone viewer. This XML could be used very good for generating C++ code for wxWidgets as it also supports sizers etc.
http://www.xulplanet.com/tutorials/xultu/window.html
It would be great if this would become the way to describe the GUI. It is lots easier then XRC, more flexible and widely supported. As XRC converts runtime, XUL could be used to define the GUI and generate C++ code for it
It is just a thought, but it would be a nice addition
- Jorgen
wxXUL perhaps?
wxXUL perhaps?
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- Earned a small fee
- Posts: 17
- Joined: Thu Jul 14, 2005 5:51 am
- Contact:
Well my goal would not be superseding a RAD editor. Everywhere on the web you will find what I was talking about. People are getting tired of the code that needs to be made to make an app work. I was going to extend the XML idea by something like this;
As you see the added value can be in pre-generated code for VERY common tasks. The settings part should (in theory) generate the code to save the window pos, and more defined GUI elements when needed.
More common solutions can be added like this. I started out with wxCRP to get rid of common solutions and to auto generate them, but in my eyes it was still to cumbersome to maintain the templates and generate the code. When this is possible and for example an about dialog can be added instantaneausly like;
And in the window definition where you want to show the about dialog you can do:
You can clearly see the power of having this. It would definately add value to code programming by eliminating the need to write the standard stuff for very trivial parts of the GUI.
- Jorgen
Code: Select all
<dialog name="MainWindow">
<settings type="registry">
<autosave windowpos="true">
<splitter type="pos" name="m_splitter" />
<list type="index" name="m_items" />
</autosave>
</settings>
</dialog>
More common solutions can be added like this. I started out with wxCRP to get rid of common solutions and to auto generate them, but in my eyes it was still to cumbersome to maintain the templates and generate the code. When this is possible and for example an about dialog can be added instantaneausly like;
Code: Select all
<dialog type="about">
<text>Thanks to ... and ... for providing the lib for this</text>
</dialog>
Code: Select all
<dialog>
<menulist name="File">
<menuitem name="About" showmodal="about">
</menulist>
</dialog>
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- Earned a small fee
- Posts: 17
- Joined: Thu Jul 14, 2005 5:51 am
- Contact:
The editor can be used to add the XML and a parser will interpret the code, generate the C++ code for it. When the backend is generic, there is even no need to have it wxWidgets / C++ specific. Even Python code or Pascal DFM + pas code can be generated.
With the use of comment tags, generated code could be easily replaced.
This is all in concept and in my head. But right now it seems like the missing link I needed for a long time. If you know wxCRP, it did about that by asking some questions, and generating conditional code for it. The problem was that old code was overwritten and no proper code insertion mechanism was there. With XML and code generation tags, templates can be improved / added (e.g. others can make "components" that implement other common stuff) and re-generated when needed.
Regards,
- Jorgen
With the use of comment tags, generated code could be easily replaced.
This is all in concept and in my head. But right now it seems like the missing link I needed for a long time. If you know wxCRP, it did about that by asking some questions, and generating conditional code for it. The problem was that old code was overwritten and no proper code insertion mechanism was there. With XML and code generation tags, templates can be improved / added (e.g. others can make "components" that implement other common stuff) and re-generated when needed.
Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- Earned a small fee
- Posts: 17
- Joined: Thu Jul 14, 2005 5:51 am
- Contact:
Well anyway, if you're thinking of making such idea a reality, Ill be glad to see it someday. I wish I could tell you "I can help!", but I just started my wx journey some days ago (although Ive been following its progress since before the "wxwindows" times, and recommending it everywhere the question "what GUI toolkit should I use?" pops up. Ironically is, I recommended it but I never tried it before )
Cheers
Cheers
Thanks
Well I am thinking of ways how to implement it. One thing that springs to mind is creating a skeleton codebase in a repository. This code base has "internal" tags which map back to the code generation from XML. I will re-use techiques I used in wxCRP, and based upon the XML description generate the C++ code. It will take a while before I start this, but I think I finally found my final form of how I wanted to implement the next version of wxCRP
- Jorgen
Well I am thinking of ways how to implement it. One thing that springs to mind is creating a skeleton codebase in a repository. This code base has "internal" tags which map back to the code generation from XML. I will re-use techiques I used in wxCRP, and based upon the XML description generate the C++ code. It will take a while before I start this, but I think I finally found my final form of how I wanted to implement the next version of wxCRP
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb