A few more things are back to work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,6 +80,8 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
|||||||
: wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER | wxTAB_TRAVERSAL )
|
: wxScrolledWindow( parent, id, pos, size, wxSUNKEN_BORDER | wxTAB_TRAVERSAL )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
SetBackgroundColour( *wxWHITE );
|
||||||
|
|
||||||
(void) new wxButton( this, -1, "wxButton", wxPoint(10,10) );
|
(void) new wxButton( this, -1, "wxButton", wxPoint(10,10) );
|
||||||
|
|
||||||
(void) new wxTextCtrl( this, -1, "wxTextCtrl", wxPoint(10,50) );
|
(void) new wxTextCtrl( this, -1, "wxTextCtrl", wxPoint(10,50) );
|
||||||
|
@@ -2371,6 +2371,8 @@ void wxListCtrl::SetSingleStyle( long style, bool add )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxListCtrl::SetWindowStyleFlag( long flag )
|
void wxListCtrl::SetWindowStyleFlag( long flag )
|
||||||
|
{
|
||||||
|
if (m_mainWin)
|
||||||
{
|
{
|
||||||
m_mainWin->DeleteEverything();
|
m_mainWin->DeleteEverything();
|
||||||
|
|
||||||
@@ -2384,14 +2386,13 @@ void wxListCtrl::SetWindowStyleFlag( long flag )
|
|||||||
{
|
{
|
||||||
if (!HasFlag(wxLC_REPORT))
|
if (!HasFlag(wxLC_REPORT))
|
||||||
{
|
{
|
||||||
// m_mainWin->SetSize( 0, 24, width, height-24 );
|
|
||||||
if (!m_headerWin)
|
if (!m_headerWin)
|
||||||
{
|
{
|
||||||
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
|
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin,
|
||||||
|
wxPoint(0,0), wxSize(width,23), wxTAB_TRAVERSAL );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// m_headerWin->SetSize( 0, 0, width, 23 );
|
|
||||||
m_headerWin->Show( TRUE );
|
m_headerWin->Show( TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2400,10 +2401,10 @@ void wxListCtrl::SetWindowStyleFlag( long flag )
|
|||||||
{
|
{
|
||||||
if (HasFlag(wxLC_REPORT))
|
if (HasFlag(wxLC_REPORT))
|
||||||
{
|
{
|
||||||
// m_mainWin->SetSize( 0, 0, width, height );
|
|
||||||
m_headerWin->Show( FALSE );
|
m_headerWin->Show( FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxWindow::SetWindowStyleFlag( flag );
|
wxWindow::SetWindowStyleFlag( flag );
|
||||||
}
|
}
|
||||||
|
@@ -38,14 +38,8 @@ extern wxList wxPendingDelete;
|
|||||||
|
|
||||||
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
|
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
/*
|
|
||||||
printf( "OnDelete from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
win->Close();
|
win->Close();
|
||||||
|
|
||||||
@@ -58,20 +52,16 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED
|
|||||||
|
|
||||||
static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxDialog *win )
|
static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
/*
|
|
||||||
printf( "OnDialogResize from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
||||||
{
|
{
|
||||||
win->InternalSetSize( alloc->width, alloc->height );
|
win->m_width = alloc->width;
|
||||||
|
win->m_height = alloc->height;
|
||||||
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,11 +71,13 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation
|
|||||||
|
|
||||||
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
|
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return FALSE;
|
if (!win->m_hasVMT) return FALSE;
|
||||||
|
|
||||||
win->InternalSetPosition(event->x, event->y);
|
win->m_x = event->x;
|
||||||
|
win->m_y = event->y;
|
||||||
|
|
||||||
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
||||||
mevent.SetEventObject( win );
|
mevent.SetEventObject( win );
|
||||||
|
@@ -62,20 +62,16 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
|||||||
|
|
||||||
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
/*
|
|
||||||
printf( "OnFrameResize from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
||||||
{
|
{
|
||||||
win->InternalSetSize( alloc->width, alloc->height );
|
win->m_width = alloc->width;
|
||||||
|
win->m_height = alloc->height;
|
||||||
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,14 +81,8 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
|||||||
|
|
||||||
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
/*
|
|
||||||
printf( "OnDelete from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
win->Close();
|
win->Close();
|
||||||
|
|
||||||
@@ -105,8 +95,6 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
|||||||
|
|
||||||
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_menuBarDetached = FALSE;
|
win->m_menuBarDetached = FALSE;
|
||||||
@@ -119,8 +107,6 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
|||||||
|
|
||||||
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_menuBarDetached = TRUE;
|
win->m_menuBarDetached = TRUE;
|
||||||
@@ -133,11 +119,10 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
|||||||
|
|
||||||
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_toolBarDetached = FALSE;
|
win->m_toolBarDetached = FALSE;
|
||||||
|
|
||||||
win->UpdateSize();
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,11 +146,13 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
|
|||||||
|
|
||||||
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
|
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return FALSE;
|
if (!win->m_hasVMT) return FALSE;
|
||||||
|
|
||||||
win->InternalSetPosition(event->x, event->y);
|
win->m_x = event->x;
|
||||||
|
win->m_y = event->y;
|
||||||
|
|
||||||
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
||||||
mevent.SetEventObject( win );
|
mevent.SetEventObject( win );
|
||||||
@@ -184,7 +171,8 @@ static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventC
|
|||||||
static gint
|
static gint
|
||||||
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||||
recognized by other WM as well. not tested. */
|
recognized by other WM as well. not tested. */
|
||||||
@@ -668,8 +656,10 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = wxMENU_HEIGHT;
|
int hh = wxMENU_HEIGHT;
|
||||||
if (m_menuBarDetached) hh = wxPLACE_HOLDER;
|
if (m_menuBarDetached) hh = wxPLACE_HOLDER;
|
||||||
m_frameMenuBar->InternalSetPosition(xx, yy);
|
m_frameMenuBar->m_x = xx;
|
||||||
m_frameMenuBar->InternalSetSize(ww, hh);
|
m_frameMenuBar->m_y = yy;
|
||||||
|
m_frameMenuBar->m_width = ww;
|
||||||
|
m_frameMenuBar->m_height = hh;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
m_frameMenuBar->m_widget,
|
m_frameMenuBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
@@ -689,14 +679,11 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
}
|
}
|
||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = m_frameToolBar->m_height;
|
int hh = m_frameToolBar->m_height;
|
||||||
// VZ: according to earlier comments in this file, the tbar height
|
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||||
// shouldn't be changed, so I comment out the next line
|
m_frameToolBar->m_x = xx;
|
||||||
// (09.05.99)
|
m_frameToolBar->m_y = yy;
|
||||||
//if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
/* m_frameToolBar->m_height = hh; don't change the toolbar's height */
|
||||||
|
m_frameToolBar->m_width = ww;
|
||||||
m_frameToolBar->InternalSetPosition(xx, yy);
|
|
||||||
m_frameToolBar->InternalSetSize(ww, hh);
|
|
||||||
|
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
m_frameToolBar->m_widget,
|
m_frameToolBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
@@ -723,8 +710,10 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = wxSTATUS_HEIGHT;
|
int hh = wxSTATUS_HEIGHT;
|
||||||
m_frameStatusBar->InternalSetPosition(xx, yy);
|
m_frameStatusBar->m_x = xx;
|
||||||
m_frameStatusBar->InternalSetSize(ww, hh);
|
m_frameStatusBar->m_y = yy;
|
||||||
|
m_frameStatusBar->m_width = ww;
|
||||||
|
m_frameStatusBar->m_height = hh;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||||
m_frameStatusBar->m_widget,
|
m_frameStatusBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
|
@@ -92,8 +92,10 @@ void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
|
|||||||
if (!menu_bar) return;
|
if (!menu_bar) return;
|
||||||
if (!menu_bar->m_widget) return;
|
if (!menu_bar->m_widget) return;
|
||||||
|
|
||||||
menu_bar->InternalSetPosition(0, 0);
|
menu_bar->m_x = 0;
|
||||||
menu_bar->InternalSetSize(m_width, wxMENU_HEIGHT);
|
menu_bar->m_y = 0;
|
||||||
|
menu_bar->m_width = m_width;
|
||||||
|
menu_bar->m_height = wxMENU_HEIGHT;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
menu_bar->m_widget,
|
menu_bar->m_widget,
|
||||||
0, 0, m_width, wxMENU_HEIGHT );
|
0, 0, m_width, wxMENU_HEIGHT );
|
||||||
|
@@ -209,7 +209,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
gdk_window_get_origin( widget->window, &org_x, &org_y );
|
gdk_window_get_origin( widget->window, &org_x, &org_y );
|
||||||
x += org_x - win->m_diffX;
|
x += org_x - win->m_diffX;
|
||||||
y += org_y - win->m_diffY;
|
y += org_y - win->m_diffY;
|
||||||
win->InternalSetPosition(x, y);
|
win->m_x = x;
|
||||||
|
win->m_y = y;
|
||||||
gtk_widget_set_uposition( win->m_widget, x, y );
|
gtk_widget_set_uposition( win->m_widget, x, y );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -2332,8 +2332,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||||
|
|
||||||
if (!colour.Ok()) return FALSE;
|
if (!wxWindowBase::SetBackgroundColour(colour)) return FALSE;
|
||||||
if (m_backgroundColour == colour) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
@@ -2367,8 +2366,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||||
|
|
||||||
if (!colour.Ok()) return FALSE;
|
if (!wxWindowBase::SetForegroundColour(colour)) return FALSE;
|
||||||
if (m_backgroundColour == colour) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
@@ -2516,8 +2514,7 @@ bool wxWindow::SetFont( const wxFont &font )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T( "invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T( "invalid window") );
|
||||||
|
|
||||||
if (!font.Ok()) return FALSE;
|
if (!wxWindowBase::SetFont(font)) return FALSE;
|
||||||
if (m_font == font) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
|
@@ -38,14 +38,8 @@ extern wxList wxPendingDelete;
|
|||||||
|
|
||||||
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
|
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
/*
|
|
||||||
printf( "OnDelete from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
win->Close();
|
win->Close();
|
||||||
|
|
||||||
@@ -58,20 +52,16 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED
|
|||||||
|
|
||||||
static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxDialog *win )
|
static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
/*
|
|
||||||
printf( "OnDialogResize from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
||||||
{
|
{
|
||||||
win->InternalSetSize( alloc->width, alloc->height );
|
win->m_width = alloc->width;
|
||||||
|
win->m_height = alloc->height;
|
||||||
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,11 +71,13 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation
|
|||||||
|
|
||||||
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
|
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return FALSE;
|
if (!win->m_hasVMT) return FALSE;
|
||||||
|
|
||||||
win->InternalSetPosition(event->x, event->y);
|
win->m_x = event->x;
|
||||||
|
win->m_y = event->y;
|
||||||
|
|
||||||
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
||||||
mevent.SetEventObject( win );
|
mevent.SetEventObject( win );
|
||||||
|
@@ -62,20 +62,16 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
|
|||||||
|
|
||||||
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
/*
|
|
||||||
printf( "OnFrameResize from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
|
||||||
{
|
{
|
||||||
win->InternalSetSize( alloc->width, alloc->height );
|
win->m_width = alloc->width;
|
||||||
|
win->m_height = alloc->height;
|
||||||
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,14 +81,8 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
|||||||
|
|
||||||
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
/*
|
|
||||||
printf( "OnDelete from " );
|
|
||||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
|
||||||
printf( win->GetClassInfo()->GetClassName() );
|
|
||||||
printf( ".\n" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
win->Close();
|
win->Close();
|
||||||
|
|
||||||
@@ -105,8 +95,6 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
|||||||
|
|
||||||
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_menuBarDetached = FALSE;
|
win->m_menuBarDetached = FALSE;
|
||||||
@@ -119,8 +107,6 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
|||||||
|
|
||||||
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_menuBarDetached = TRUE;
|
win->m_menuBarDetached = TRUE;
|
||||||
@@ -133,11 +119,10 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
|||||||
|
|
||||||
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
|
||||||
|
|
||||||
if (!win->m_hasVMT) return;
|
if (!win->m_hasVMT) return;
|
||||||
|
|
||||||
win->m_toolBarDetached = FALSE;
|
win->m_toolBarDetached = FALSE;
|
||||||
|
|
||||||
win->UpdateSize();
|
win->UpdateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,11 +146,13 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
|
|||||||
|
|
||||||
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
|
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
if (!win->m_hasVMT) return FALSE;
|
if (!win->m_hasVMT) return FALSE;
|
||||||
|
|
||||||
win->InternalSetPosition(event->x, event->y);
|
win->m_x = event->x;
|
||||||
|
win->m_y = event->y;
|
||||||
|
|
||||||
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
|
||||||
mevent.SetEventObject( win );
|
mevent.SetEventObject( win );
|
||||||
@@ -184,7 +171,8 @@ static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventC
|
|||||||
static gint
|
static gint
|
||||||
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle) wxapp_install_idle_handler();
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
/* all this is for Motif Window Manager "hints" and is supposed to be
|
||||||
recognized by other WM as well. not tested. */
|
recognized by other WM as well. not tested. */
|
||||||
@@ -668,8 +656,10 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = wxMENU_HEIGHT;
|
int hh = wxMENU_HEIGHT;
|
||||||
if (m_menuBarDetached) hh = wxPLACE_HOLDER;
|
if (m_menuBarDetached) hh = wxPLACE_HOLDER;
|
||||||
m_frameMenuBar->InternalSetPosition(xx, yy);
|
m_frameMenuBar->m_x = xx;
|
||||||
m_frameMenuBar->InternalSetSize(ww, hh);
|
m_frameMenuBar->m_y = yy;
|
||||||
|
m_frameMenuBar->m_width = ww;
|
||||||
|
m_frameMenuBar->m_height = hh;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
m_frameMenuBar->m_widget,
|
m_frameMenuBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
@@ -689,14 +679,11 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
}
|
}
|
||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = m_frameToolBar->m_height;
|
int hh = m_frameToolBar->m_height;
|
||||||
// VZ: according to earlier comments in this file, the tbar height
|
if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
||||||
// shouldn't be changed, so I comment out the next line
|
m_frameToolBar->m_x = xx;
|
||||||
// (09.05.99)
|
m_frameToolBar->m_y = yy;
|
||||||
//if (m_toolBarDetached) hh = wxPLACE_HOLDER;
|
/* m_frameToolBar->m_height = hh; don't change the toolbar's height */
|
||||||
|
m_frameToolBar->m_width = ww;
|
||||||
m_frameToolBar->InternalSetPosition(xx, yy);
|
|
||||||
m_frameToolBar->InternalSetSize(ww, hh);
|
|
||||||
|
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
m_frameToolBar->m_widget,
|
m_frameToolBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
@@ -723,8 +710,10 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
|
|||||||
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
|
||||||
int ww = m_width - 2*m_miniEdge;
|
int ww = m_width - 2*m_miniEdge;
|
||||||
int hh = wxSTATUS_HEIGHT;
|
int hh = wxSTATUS_HEIGHT;
|
||||||
m_frameStatusBar->InternalSetPosition(xx, yy);
|
m_frameStatusBar->m_x = xx;
|
||||||
m_frameStatusBar->InternalSetSize(ww, hh);
|
m_frameStatusBar->m_y = yy;
|
||||||
|
m_frameStatusBar->m_width = ww;
|
||||||
|
m_frameStatusBar->m_height = hh;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_wxwindow),
|
||||||
m_frameStatusBar->m_widget,
|
m_frameStatusBar->m_widget,
|
||||||
xx, yy, ww, hh );
|
xx, yy, ww, hh );
|
||||||
|
@@ -92,8 +92,10 @@ void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
|
|||||||
if (!menu_bar) return;
|
if (!menu_bar) return;
|
||||||
if (!menu_bar->m_widget) return;
|
if (!menu_bar->m_widget) return;
|
||||||
|
|
||||||
menu_bar->InternalSetPosition(0, 0);
|
menu_bar->m_x = 0;
|
||||||
menu_bar->InternalSetSize(m_width, wxMENU_HEIGHT);
|
menu_bar->m_y = 0;
|
||||||
|
menu_bar->m_width = m_width;
|
||||||
|
menu_bar->m_height = wxMENU_HEIGHT;
|
||||||
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
gtk_myfixed_set_size( GTK_MYFIXED(m_mainWidget),
|
||||||
menu_bar->m_widget,
|
menu_bar->m_widget,
|
||||||
0, 0, m_width, wxMENU_HEIGHT );
|
0, 0, m_width, wxMENU_HEIGHT );
|
||||||
|
@@ -209,7 +209,8 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
|||||||
gdk_window_get_origin( widget->window, &org_x, &org_y );
|
gdk_window_get_origin( widget->window, &org_x, &org_y );
|
||||||
x += org_x - win->m_diffX;
|
x += org_x - win->m_diffX;
|
||||||
y += org_y - win->m_diffY;
|
y += org_y - win->m_diffY;
|
||||||
win->InternalSetPosition(x, y);
|
win->m_x = x;
|
||||||
|
win->m_y = y;
|
||||||
gtk_widget_set_uposition( win->m_widget, x, y );
|
gtk_widget_set_uposition( win->m_widget, x, y );
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -2332,8 +2332,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||||
|
|
||||||
if (!colour.Ok()) return FALSE;
|
if (!wxWindowBase::SetBackgroundColour(colour)) return FALSE;
|
||||||
if (m_backgroundColour == colour) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
@@ -2367,8 +2366,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T("invalid window") );
|
||||||
|
|
||||||
if (!colour.Ok()) return FALSE;
|
if (!wxWindowBase::SetForegroundColour(colour)) return FALSE;
|
||||||
if (m_backgroundColour == colour) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
@@ -2516,8 +2514,7 @@ bool wxWindow::SetFont( const wxFont &font )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, FALSE, _T( "invalid window") );
|
wxCHECK_MSG( m_widget != NULL, FALSE, _T( "invalid window") );
|
||||||
|
|
||||||
if (!font.Ok()) return FALSE;
|
if (!wxWindowBase::SetFont(font)) return FALSE;
|
||||||
if (m_font == font) return FALSE;
|
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
if (!connect_widget->window) return TRUE;
|
if (!connect_widget->window) return TRUE;
|
||||||
|
Reference in New Issue
Block a user