Trying fight aganist CVS clashes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-03-24 17:45:40 +00:00
parent 356cbde599
commit dc25e1d304
10 changed files with 104 additions and 106 deletions

View File

@@ -231,7 +231,6 @@ void wxDialog::Init()
m_returnCode = 0;
m_sizeSet = FALSE;
m_modalShowing = FALSE;
m_isFrame = TRUE;
}
wxDialog::wxDialog( wxWindow *parent,

View File

@@ -394,7 +394,6 @@ void wxFrame::Init()
m_menuBarDetached = FALSE;
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
m_isFrame = FALSE;
}
bool wxFrame::Create( wxWindow *parent,
@@ -408,7 +407,6 @@ bool wxFrame::Create( wxWindow *parent,
wxTopLevelWindows.Append( this );
m_needParent = FALSE;
m_isFrame = TRUE;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))

View File

@@ -50,8 +50,8 @@ extern wxList wxPendingDelete;
static void
gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
GtkNotebookPage *page,
gint WXUNUSED(page_num),
wxMDIParentFrame *parent )
gint WXUNUSED(page_num),
wxMDIParentFrame *parent )
{
if (g_isIdle)
wxapp_install_idle_handler();
@@ -79,10 +79,10 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
{
wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
if (child_frame->m_page == page)
{
{
child = child_frame;
break;
}
break;
}
node = node->Next();
}
@@ -180,29 +180,29 @@ void wxMDIParentFrame::OnInternalIdle()
while (node)
{
wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
wxMenuBar *menu_bar = child_frame->m_menuBar;
wxMenuBar *menu_bar = child_frame->m_menuBar;
if (child_frame->m_menuBar)
{
if (child_frame == active_child_frame)
{
if (menu_bar->Show(TRUE))
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
if (menu_bar->Show(TRUE))
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow( child_frame );
}
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow( child_frame );
}
visible_child_menu = TRUE;
}
else
{
if (menu_bar->Show(FALSE))
{
menu_bar->UnsetInvokingWindow( child_frame );
}
}
{
if (menu_bar->Show(FALSE))
{
menu_bar->UnsetInvokingWindow( child_frame );
}
}
}
node = node->Next();
}
@@ -212,21 +212,21 @@ void wxMDIParentFrame::OnInternalIdle()
(m_frameMenuBar->IsShown() == visible_child_menu))
{
if (visible_child_menu)
{
{
m_frameMenuBar->Show( FALSE );
m_frameMenuBar->UnsetInvokingWindow( this );
}
else
{
m_frameMenuBar->UnsetInvokingWindow( this );
}
else
{
m_frameMenuBar->Show( TRUE );
m_frameMenuBar->SetInvokingWindow( this );
m_frameMenuBar->SetInvokingWindow( this );
m_frameMenuBar->m_width = m_width;
m_frameMenuBar->m_height = wxMENU_HEIGHT;
m_frameMenuBar->m_width = m_width;
m_frameMenuBar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
m_frameMenuBar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
}
m_frameMenuBar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
}
}
}
@@ -309,6 +309,7 @@ wxMDIChildFrame::wxMDIChildFrame()
{
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
m_isFrame = TRUE;
}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
@@ -318,6 +319,7 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
{
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
m_isFrame = TRUE;
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
@@ -464,7 +466,7 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("wxMDIClientWindow") ))
{
wxFAIL_MSG( wxT("wxMDIClientWindow creation failed") );
return FALSE;
return FALSE;
}
m_widget = gtk_notebook_new();
@@ -483,4 +485,4 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
return TRUE;
}
#endif // wxUSE_MDI_ARCHITECTURE
#endif

View File

@@ -222,7 +222,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
if (event.KeyCode() == WXK_RETURN)
{
wxWindow *top_frame = m_parent;
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel()))
top_frame = top_frame->GetParent();
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);

View File

@@ -839,7 +839,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
break;
}
if (ancestor->m_isFrame)
if (ancestor->IsTopLevel())
break;
ancestor = ancestor->GetParent();
}
@@ -2578,7 +2578,7 @@ void wxWindow::OnInternalIdle()
now do our full redraw and switch on expose event handling again. */
bool child_already_resized = FALSE;
if (m_isFrame)
if (IsTopLevel() && !m_isFrame)
child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow );
else
child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget );

View File

@@ -231,7 +231,6 @@ void wxDialog::Init()
m_returnCode = 0;
m_sizeSet = FALSE;
m_modalShowing = FALSE;
m_isFrame = TRUE;
}
wxDialog::wxDialog( wxWindow *parent,

View File

@@ -394,7 +394,6 @@ void wxFrame::Init()
m_menuBarDetached = FALSE;
m_toolBarDetached = FALSE;
m_insertInClientArea = TRUE;
m_isFrame = FALSE;
}
bool wxFrame::Create( wxWindow *parent,
@@ -408,7 +407,6 @@ bool wxFrame::Create( wxWindow *parent,
wxTopLevelWindows.Append( this );
m_needParent = FALSE;
m_isFrame = TRUE;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))

View File

@@ -50,8 +50,8 @@ extern wxList wxPendingDelete;
static void
gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
GtkNotebookPage *page,
gint WXUNUSED(page_num),
wxMDIParentFrame *parent )
gint WXUNUSED(page_num),
wxMDIParentFrame *parent )
{
if (g_isIdle)
wxapp_install_idle_handler();
@@ -79,10 +79,10 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
{
wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
if (child_frame->m_page == page)
{
{
child = child_frame;
break;
}
break;
}
node = node->Next();
}
@@ -180,29 +180,29 @@ void wxMDIParentFrame::OnInternalIdle()
while (node)
{
wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
wxMenuBar *menu_bar = child_frame->m_menuBar;
wxMenuBar *menu_bar = child_frame->m_menuBar;
if (child_frame->m_menuBar)
{
if (child_frame == active_child_frame)
{
if (menu_bar->Show(TRUE))
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
if (menu_bar->Show(TRUE))
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow( child_frame );
}
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow( child_frame );
}
visible_child_menu = TRUE;
}
else
{
if (menu_bar->Show(FALSE))
{
menu_bar->UnsetInvokingWindow( child_frame );
}
}
{
if (menu_bar->Show(FALSE))
{
menu_bar->UnsetInvokingWindow( child_frame );
}
}
}
node = node->Next();
}
@@ -212,21 +212,21 @@ void wxMDIParentFrame::OnInternalIdle()
(m_frameMenuBar->IsShown() == visible_child_menu))
{
if (visible_child_menu)
{
{
m_frameMenuBar->Show( FALSE );
m_frameMenuBar->UnsetInvokingWindow( this );
}
else
{
m_frameMenuBar->UnsetInvokingWindow( this );
}
else
{
m_frameMenuBar->Show( TRUE );
m_frameMenuBar->SetInvokingWindow( this );
m_frameMenuBar->SetInvokingWindow( this );
m_frameMenuBar->m_width = m_width;
m_frameMenuBar->m_height = wxMENU_HEIGHT;
m_frameMenuBar->m_width = m_width;
m_frameMenuBar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
m_frameMenuBar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
}
m_frameMenuBar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
}
}
}
@@ -309,6 +309,7 @@ wxMDIChildFrame::wxMDIChildFrame()
{
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
m_isFrame = TRUE;
}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
@@ -318,6 +319,7 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
{
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
m_isFrame = TRUE;
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
@@ -464,7 +466,7 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("wxMDIClientWindow") ))
{
wxFAIL_MSG( wxT("wxMDIClientWindow creation failed") );
return FALSE;
return FALSE;
}
m_widget = gtk_notebook_new();
@@ -483,4 +485,4 @@ bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
return TRUE;
}
#endif // wxUSE_MDI_ARCHITECTURE
#endif

View File

@@ -222,7 +222,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
if (event.KeyCode() == WXK_RETURN)
{
wxWindow *top_frame = m_parent;
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
while (top_frame->GetParent() && !(top_frame->GetParent()->IsTopLevel()))
top_frame = top_frame->GetParent();
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);

View File

@@ -839,7 +839,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
break;
}
if (ancestor->m_isFrame)
if (ancestor->IsTopLevel())
break;
ancestor = ancestor->GetParent();
}
@@ -2578,7 +2578,7 @@ void wxWindow::OnInternalIdle()
now do our full redraw and switch on expose event handling again. */
bool child_already_resized = FALSE;
if (m_isFrame)
if (IsTopLevel() && !m_isFrame)
child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_wxwindow->parent), m_wxwindow );
else
child_already_resized = gtk_pizza_child_resized( GTK_PIZZA(m_widget->parent), m_widget );