Various wxMotif changes including size optimisation and debugging operator fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-25 21:42:56 +00:00
parent 7be4c5946c
commit 7fe7d506b1
31 changed files with 549 additions and 103 deletions

View File

@@ -550,7 +550,10 @@ void wxMDIChildFrame::SetIcon(const wxIcon& icon)
void wxMDIChildFrame::SetTitle(const wxString& title)
{
m_title = title;
// TODO: set parent frame title
wxMDIClientWindow* clientWindow = GetMDIParentFrame()->GetClientWindow();
int pageNo = clientWindow->FindPagePosition(this);
if (pageNo > -1)
clientWindow->SetPageText(pageNo, title);
}
// MDI operations
@@ -623,7 +626,19 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
// m_windowParent = parent;
// m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE);
return wxNotebook::Create(parent, wxID_NOTEBOOK_CLIENT_AREA, wxPoint(0, 0), wxSize(100, 100), 0);
bool success = wxNotebook::Create(parent, wxID_NOTEBOOK_CLIENT_AREA, wxPoint(0, 0), wxSize(100, 100), 0);
if (success)
{
wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL);
wxFont selFont(10, wxSWISS, wxNORMAL, wxBOLD);
GetTabView()->SetTabFont(font);
GetTabView()->SetSelectedTabFont(selFont);
GetTabView()->SetTabSize(120, 18);
GetTabView()->SetTabSelectionHeight(20);
return TRUE;
}
else
return FALSE;
}
void wxMDIClientWindow::SetSize(int x, int y, int width, int height, int sizeFlags)
@@ -670,9 +685,11 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
oldChild->GetEventHandler()->ProcessEvent(event);
}
}
wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
if (activeChild)
if (event.GetSelection() != -1)
{
wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
if (activeChild)
{
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, activeChild->GetId());
event.SetEventObject( activeChild );
activeChild->GetEventHandler()->ProcessEvent(event);
@@ -682,6 +699,7 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
activeChild->GetMDIParentFrame()->SetActiveChild(activeChild);
activeChild->GetMDIParentFrame()->SetChildMenuBar(activeChild);
}
}
}
event.Skip();
}