gtk_widget_set_usize( m_widget, m_width, m_height );
}
- m_sizeSet = TRUE;
-
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
gtk_widget_set_usize( m_widget, m_width, m_height );
// This emulates the new wxMSW behaviour
-
+
if (m_frameMenuBar)
{
m_frameMenuBar->m_x = 1;
// yes: set it's size to fill all the frame
int client_x, client_y;
GetClientSize( &client_x, &client_y );
- child->SetSize( 1, 1, client_x-2, client_y);
+ child->SetSize( 1, 1, client_x-2, client_y-2 );
}
}
m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y );
}
}
+
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
}
wxMenuBar *wxFrame::GetMenuBar(void) const
m_frameToolBar = OnCreateToolBar( style, id, name );
GetChildren()->DeleteObject( m_frameToolBar );
+
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
return m_frameToolBar;
}
m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+
return m_frameStatusBar;
}
wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = pthread_self();
- p_threads_list = wxList(wxKEY_INTEGER);
+// p_threads_list = wxList(wxKEY_INTEGER);
wxMainMutex->Lock();
return TRUE;
static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxWindow *win )
{
- printf( "OnKeyPress.\n " );
-
if (!win->HasVMT()) return FALSE;
if (g_blockEventsOnDrag) return FALSE;
+/*
printf( "OnKeyPress from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
+*/
long key_code = 0;
switch (gdk_event->keyval)
event.m_y = 0;
event.SetEventObject( win );
- printf( "process key.\n" );
-
bool ret = win->GetEventHandler()->ProcessEvent( event );
- printf( "no handler.\n" );
-
if (!ret)
{
wxWindow *ancestor = win;
while (ancestor)
{
- printf( "check accel in %s .\n", WXSTRINGCAST ancestor->GetName() );
-
int command = ancestor->GetAcceleratorTable()->GetCommand( event );
if (command != -1)
{
gtk_widget_set_usize( m_widget, m_width, m_height );
}
- m_sizeSet = TRUE;
-
wxSizeEvent event( wxSize(m_width,m_height), GetId() );
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
gtk_widget_set_usize( m_widget, m_width, m_height );
// This emulates the new wxMSW behaviour
-
+
if (m_frameMenuBar)
{
m_frameMenuBar->m_x = 1;
// yes: set it's size to fill all the frame
int client_x, client_y;
GetClientSize( &client_x, &client_y );
- child->SetSize( 1, 1, client_x-2, client_y);
+ child->SetSize( 1, 1, client_x-2, client_y-2 );
}
}
m_frameMenuBar->m_widget, m_frameMenuBar->m_x, m_frameMenuBar->m_y );
}
}
+
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
}
wxMenuBar *wxFrame::GetMenuBar(void) const
m_frameToolBar = OnCreateToolBar( style, id, name );
GetChildren()->DeleteObject( m_frameToolBar );
+
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
return m_frameToolBar;
}
m_frameStatusBar = OnCreateStatusBar( number, style, id, name );
+ if (m_sizeSet) GtkOnSize( m_x, m_y, m_width, m_height );
+
return m_frameStatusBar;
}
wxMainMutex = new wxMutex();
wxThreadGuiInit();
p_mainid = pthread_self();
- p_threads_list = wxList(wxKEY_INTEGER);
+// p_threads_list = wxList(wxKEY_INTEGER);
wxMainMutex->Lock();
return TRUE;
static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxWindow *win )
{
- printf( "OnKeyPress.\n " );
-
if (!win->HasVMT()) return FALSE;
if (g_blockEventsOnDrag) return FALSE;
+/*
printf( "OnKeyPress from " );
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
printf( win->GetClassInfo()->GetClassName() );
printf( ".\n" );
+*/
long key_code = 0;
switch (gdk_event->keyval)
event.m_y = 0;
event.SetEventObject( win );
- printf( "process key.\n" );
-
bool ret = win->GetEventHandler()->ProcessEvent( event );
- printf( "no handler.\n" );
-
if (!ret)
{
wxWindow *ancestor = win;
while (ancestor)
{
- printf( "check accel in %s .\n", WXSTRINGCAST ancestor->GetName() );
-
int command = ancestor->GetAcceleratorTable()->GetCommand( event );
if (command != -1)
{