@@ -161,6 +161,7 @@ void MultiDocumentPanel::addWindow (Component* component) | |||||
dw->setResizable (true, false); | dw->setResizable (true, false); | ||||
dw->setContentComponent (component, false, true); | dw->setContentComponent (component, false, true); | ||||
dw->setName (component->getName()); | dw->setName (component->getName()); | ||||
dw->setBackgroundColour (component->getComponentPropertyColour (T("mdiDocumentBkg_"), false, backgroundColour)); | |||||
int x = 4; | int x = 4; | ||||
Component* const topComp = getChildComponent (getNumChildComponents() - 1); | Component* const topComp = getChildComponent (getNumChildComponents() - 1); | ||||
@@ -181,6 +182,10 @@ bool MultiDocumentPanel::addDocument (Component* const component, | |||||
const Colour& backgroundColour, | const Colour& backgroundColour, | ||||
const bool deleteWhenRemoved) | const bool deleteWhenRemoved) | ||||
{ | { | ||||
// If you try passing a full DocumentWindow or ResizableWindow in here, you'll end up | |||||
// with a frame-within-a-frame! Just pass in the bare content component. | |||||
jassert (dynamic_cast <ResizableWindow*> (component) == 0); | |||||
if (component == 0 || (maximumNumDocuments > 0 && components.size() >= maximumNumDocuments)) | if (component == 0 || (maximumNumDocuments > 0 && components.size() >= maximumNumDocuments)) | ||||
return false; | return false; | ||||
@@ -132,6 +132,10 @@ public: | |||||
this will fail and return false. (If it does fail, the component passed-in will not be | this will fail and return false. (If it does fail, the component passed-in will not be | ||||
deleted, even if deleteWhenRemoved was set to true). | deleted, even if deleteWhenRemoved was set to true). | ||||
The MultiDocumentPanel will deal with creating a window border to go around your component, | |||||
so just pass in the bare content component here, no need to give it a ResizableWindow | |||||
or DocumentWindow. | |||||
@param component the component to add | @param component the component to add | ||||
@param backgroundColour the background colour to use to fill the component's | @param backgroundColour the background colour to use to fill the component's | ||||
window or tab | window or tab | ||||
@@ -1083,7 +1083,8 @@ void LookAndFeel::drawMenuBarItem (Graphics& g, | |||||
} | } | ||||
//============================================================================== | //============================================================================== | ||||
void LookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor) | |||||
void LookAndFeel::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, | |||||
TextEditor& textEditor) | |||||
{ | { | ||||
g.fillAll (textEditor.findColour (TextEditor::backgroundColourId)); | g.fillAll (textEditor.findColour (TextEditor::backgroundColourId)); | ||||
} | } | ||||