Custom DocumentWindow Title Bar

I want to use a custom title bar for Document Windows. ( A Close button on the left, an extra button on the right, total of 5 buttons… etc.) I don’t want change any JUCE library code. What is the preferred way to do?

I also want to use MultiDocumentPanel and it wraps the document with a Document Window, so subclassing Document Window does not work.

You could use a custom look and feel - check out the LookAndFeel class. It’ll let you do all that sort of thing.

LookAndFeel::positionDocumentWindowButtons is limited to 3 buttons only, I would prefer to have a special TitleBar component to do all the dirty work. Maybe disabling the Title bar and using a custom component would be better. But MultiDocumentPanel wraps all document in a private DocumentWindow class. So I can’t use MultiDocumentPanel with this approach.

If it’s something so specific, then you could always just customise the DocumentWindow class itself - override resized(), etc. and put your own components on the title bar.

And then I would have to use my own version of MultiDocumentPanel, because it will use a standard DocumentWindow not my custom one. maybe this is even better because I need a simple MultiDocumentPanel anyway.

at juce_MultiDocumentPanel.h there is:

class MDIDocumentWindow;
class MDITabbedComponent;

and no reference or definition for them anywhere, are they forgotton there?

Hmm - bit of a typo, but they’re just internal classes, no need to worry about them.