I just started messing around with juce – very nice!
I got a question, though.
I can see that native window decorations are not implemented – that is fine. But, I would like to add a minimize and maximize button to the DialogWindow class (it only appears to implement a close window button).
Any tips on the best way to go about doing this? I searched the forums for an answer and didnt find anything – I hope that this question hasn’t been asked a ba-zillion times =)
Would it be easier for me to define my own window class by subclassing Component?
I just did a search for “minimize” and “maximize” and well, I feel kinda stupid now (there was some discussion of min/max buttons, but at least it wasnt asked a ba-zillion times)
So, feel free to ignore this post, unless anyone feels there is something I should know.
It’s basically ripped straight from DialogWindow (it’s just a ResizableWindow and ButtonListener). The buttons are drawn in MainWindow::updateTitleBarButtons().
It’s totally inflexible. It ignores look and feel. It’s just a hack. But, it’s sorta cool – You can either use it directly or subclass it.
Make MainWindow::updateTitleBarButtons() virtual and you can override it in a subclass to draw your min/max/close buttons however you want.
Here is a visual c++ project with a little demo (the source is MainWindow.cpp and MainWindow.h)