A dialog editor with code generator for Juce

Hi all,

I’ve made a dialog editor with code generation for JUCE’s components.
You can find it here :
http://crashreport.free.fr/PinkLemon.zip

Currently, it works very well, you’ll just have to set the path to juce.h in the created .cpp file. It supports almost all different widgets

It has nothing to fear compared to Visual Studio dialog editor.

It is based on Juce 1.10, without my modifications for SkinnedComponents and Shapes, so it should compile out of the box with any Juce version from 1.7 to 1.10.

It you add more widgets, please post your modification so I could integrate them in the code.

I HIGHLY ADVISE YOU TO READ THE README FILE IN THE ARCHIVE. (I won’t answer question that are already answered in the file).

Some tricks : hold down the Ctrl key to see and snap object to the grid.
When modifying the specific options thanks to the popup menu, you can see the changes by saving and reloading the dialog.

Sincerly,
Cyril

Hmm… You beat me to it :wink:.

It seems to work well, although personally, I’d like the option of altering more of the components’ properties (e.g. component colour, whether the TextEditor’s multi-line or not, etc.).

I think with the juce header issue, you could probably avoid it by just putting #include <juce.h>” there, and telling users to put the header’s path in their Project Settings.

  • Niall.

Nice one.

Looks good to me, I’ll try it properly next time I’ve got a dialog to do.

Hi all.

I’ve just posted a new version to the same URL. This times, every supported components are implemented (except OpenGL, Quicktime and TabbedComponent which requires to much modifications to the code).

The next step will be alignment, and specific properties (shouldn’t be too hard)
Maybe I’ll add a .xml export/import too to avoid loosing edition.

Enjoy.

Regards,
Cyril

very nice - i plan on trying it out this weekend.

I’ve saved a new version to the above link.

This version includes grid alignment (thanks to the Ctrl key),
colour selection, XML saving and loading of the dialog box, output to
c++ code, all widgets (except OpenGL and Quicktime), and last but not
least, a splash screen.

It is now possible to save and reload the currently edited dialog to/from a xml file. This means that you can design you current dialog with the editor, and you’ll be able to modify them afterward.

You can now snap a component position and/or size to the grid by holding the CTRL/command key down while dragging. You can select the dialog default background color, and I’ve fixed a small but annoying bug with redrawing.

I think this will be the last (if not, it will be the before last) version as I’ve everything I’ve thought of, except per-component property edition.

When I run it all I see is a small window that says dashboard. I can change the color and the grid size but that’s it. Is there supposed to be another window?

I am running on Windows XP Pro

Nevermind I see it now. Was under another window :slight_smile:

I’ve finally posted the last version.

This version correct a bug with component resizing, add support for specific component options (save and load to see your changes).

Feel free to try.

i’d very much like to take this apart a bit and change the way it works.

i always work on my layouts as components, rather than just making a dialogwindow specifically using the children. i would like to be able to arrange a component layout in this program, and then present me with several texteditor fields with generated code i can copy/paste into my source. i’d like it to give me code to define the component class, and also autogenerated ‘resize()’ overload, which i can edit, and the actionListenerCallback()/changeListenerCallback() overloads prepared for me to add response code.

then you can jump to the program to design the component layout/content you need for the window/section, and generate the code to paste into your source where it would be used. That would be my preferred way of working, so i shall probably do this in the near future when i’ve finished my current project. i hope you won’t mind? you’ve done a great job already so far.

I don’t fully understand what you are trying to do, but feel free to do so, you’ve got source code.

I’ll be interested to see your additions too.
Currently the code generation is done in Window.cpp (Window::saveTo method). It is very easy to follow what is written, so you should be able to cut and paste the required code.

I haven’t worked on this since 3 months, so there are stuff missing now.
Cyril