Favorite Means of GUI Implementation


#1

Hey there,

 

Curious as to what your favorite means of GUI implementation are, personally? Do you prefer using the introjucer, writing out the gui objects into the code directly, or are there other gui libraries you may like to incorporate? 

Feedback would be useful and helpful. smiley

 

Cheers,
B


#2

Personally, I haven't used the GUI builder for years.. Nothing I write seems to be that simple, so I do them all by hand.


#3

Using the layout editor in the Introjucer is OK for simple non-resizable GUIs. For more complex things it lacks any way of defining a layout. A resizable GUI requires some rather cumbersome tweaking of the modes and anchors for the component position and size. And I don't think there are any plans for further development of the layout editor.

Coding the layout manually can be done in a quite natural way. getLocalBounds() and all the methods in juce::Rectangle are your friend.

So except for maybe small dialog boxes I'd go for just writing the code.

--
Roeland


#4

The layout editor is great for making a quick interface. I've also used it in more complex scenarios where I'm working with a designer. They can do some of the layout without needing to know how to code. I can then tweak it in various ways.

My favourite trick was to find a way of optionally adding drop-shadows to some, but not all, child components. I endedup appending "[shadow]" to the front of component names. Then in the constructor it:

  • Adds a child component that fills the bounds of the parent, and has the drop shadow effect added.
  • Iterates through all of the children and finds ones that start with the substring "[shadow]"
  • Removes these children from the parent and adds them to th component with the drop shadow.

Of course, searching for "[shadow]" across many components could be optimised but its fast enough for my use-case.


#5

Cool! 

Great responses so far. I've also been writing the gui into the code directly without using the introjucer.

As well, I look forward to the release of the Projucer which sounds like it's going to be great for DSP and UI-tweaking. 

 

Cheers,
B


#6

Οκ !
I see that even Jules does not use Introjucer when he is going to create a complex GUI.
Personally, I feel uncomfortable when I create a GUI and, at the same time, I can’t actually see its physical appearance.
Actually, I am still a newbie in JUCE.  So, if someone would like to share some useful and practical tips, it will be a great help, such as:
- A way of creating the graphic without using Introjucer. I mean probably he can describe the sequence of actions or his working method, if he wishes.
- Some useful tips like "avoid this" or "use that".
- Maybe some arguments for guys like me, who still feel uncomfortable without Introjucer.

Thanks in advance

George


#7

If you're building something simple enough to use the Introjucer, then there's no reason not to use it, or even to start with it to get a Component class and then carry on by hand to make it do more complex stuff.


#8

I'm a newbie in C++ and Juce, less then two weeks... so don't have a clue what I'm talking about, but my approach is custom components, created programtically and paramaterised via XML.


#9

@Jules :

Of course I am using Introjucer for any simple GUI implementation. Actually, I have built some complex GUIs with it and I have made some fine prototypes.
Now I am ready to start implementing my first large and complex GUI (especially for a digital audio console). I well understand that a GUI such this, needs a lot of hand-made work.
So, if anyone kindly wants to share any experience about it, it would be very very useful.

@MartinRobinson:  Dear Martin, 

This is not an advice but certainly is an encouragement. I think it's time for a new book entitled "JUCE : How to...".

Additionally,  Juce forum can provide a rich catalog with various themes which are very useful for JUCE-newbies.

I bought the first book “Starting with JUCE” immediately when it published. It is an excellent book, at least for me. 

Thank you for your attention