#include "gtk/gtkdnd.h"
#include "gtk/gtkselection.h"
+//-----------------------------------------------------------------------------
+// idle system
+//-----------------------------------------------------------------------------
+
+extern void wxapp_install_idle_handler();
+extern bool g_isIdle;
+
//----------------------------------------------------------------------------
// global data
//----------------------------------------------------------------------------
guint WXUNUSED(time),
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* inform the wxDropTarget about the current GdkDragContext.
this is only valid for the duration of this call */
drop_target->SetDragContext( context );
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "if the coordinates not in a drop zone,
return FALSE, otherwise call gtk_drag_status() and
return TRUE" */
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "if the drop is not in a drop zone,
return FALSE, otherwise, if you aren't accepting
the drop, call gtk_drag_finish() with success == FALSE
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "call gtk_drag_finish() with
success == TRUE" */
guint WXUNUSED(time),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "Provide data!\n" );
// char *name = gdk_atom_name( selection_data->target );
GdkDragContext *WXUNUSED(context),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "Delete the data!\n" );
drop_source->m_retValue = wxDragMove;
GdkDragContext *WXUNUSED(context),
wxDropSource *WXUNUSED(drop_source) )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "drag_begin.\n" );
}
GdkDragContext *WXUNUSED(context),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "drag_end.\n" );
drop_source->m_waiting = FALSE;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameToolBar->m_widget, xx, yy );
-// m_frameToolBar->m_widget->requisition.width = ww;
-// m_frameToolBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameToolBar->m_widget, ww, hh );
client_area_y_offset += hh;
int client_w = m_width - 2*m_miniEdge;
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
-// m_wxwindow->requisition.width = client_w;
-// m_wxwindow->requisition.height = client_h;
gtk_widget_set_usize( m_wxwindow, client_w, client_h );
-
+ GtkAllocation alloc;
+ alloc.x = client_x; alloc.y = client_y; alloc.width = client_w; alloc.height = client_h;
+ gtk_widget_size_allocate( m_wxwindow, &alloc );
}
else
{
m_pages.DeleteObject( nb_page );
+ /* adjust the notebook page numbers so that
+ m_id reflects the current position, Daniel Paull */
+ int count = 0;
+ wxNode *node = m_pages.First();
+ wxNotebookPage *pagePtr = (wxNotebookPage *) NULL;
+ while (node)
+ {
+ pagePtr = (wxNotebookPage*)node->Data();
+ pagePtr->m_id = count++;
+ node = node->Next();
+ }
+
return TRUE;
}
#include "gtk/gtkdnd.h"
#include "gtk/gtkselection.h"
+//-----------------------------------------------------------------------------
+// idle system
+//-----------------------------------------------------------------------------
+
+extern void wxapp_install_idle_handler();
+extern bool g_isIdle;
+
//----------------------------------------------------------------------------
// global data
//----------------------------------------------------------------------------
guint WXUNUSED(time),
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* inform the wxDropTarget about the current GdkDragContext.
this is only valid for the duration of this call */
drop_target->SetDragContext( context );
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "if the coordinates not in a drop zone,
return FALSE, otherwise call gtk_drag_status() and
return TRUE" */
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "if the drop is not in a drop zone,
return FALSE, otherwise, if you aren't accepting
the drop, call gtk_drag_finish() with success == FALSE
guint time,
wxDropTarget *drop_target )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
/* Owen Taylor: "call gtk_drag_finish() with
success == TRUE" */
guint WXUNUSED(time),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "Provide data!\n" );
// char *name = gdk_atom_name( selection_data->target );
GdkDragContext *WXUNUSED(context),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "Delete the data!\n" );
drop_source->m_retValue = wxDragMove;
GdkDragContext *WXUNUSED(context),
wxDropSource *WXUNUSED(drop_source) )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "drag_begin.\n" );
}
GdkDragContext *WXUNUSED(context),
wxDropSource *drop_source )
{
+ if (g_isIdle) wxapp_install_idle_handler();
+
// printf( "drag_end.\n" );
drop_source->m_waiting = FALSE;
gtk_myfixed_move( GTK_MYFIXED(m_mainWidget), m_frameToolBar->m_widget, xx, yy );
-// m_frameToolBar->m_widget->requisition.width = ww;
-// m_frameToolBar->m_widget->requisition.height = hh;
gtk_widget_set_usize( m_frameToolBar->m_widget, ww, hh );
client_area_y_offset += hh;
int client_w = m_width - 2*m_miniEdge;
int client_h = m_height - client_area_y_offset- 2*m_miniEdge - m_miniTitle;
-// m_wxwindow->requisition.width = client_w;
-// m_wxwindow->requisition.height = client_h;
gtk_widget_set_usize( m_wxwindow, client_w, client_h );
-
+ GtkAllocation alloc;
+ alloc.x = client_x; alloc.y = client_y; alloc.width = client_w; alloc.height = client_h;
+ gtk_widget_size_allocate( m_wxwindow, &alloc );
}
else
{
m_pages.DeleteObject( nb_page );
+ /* adjust the notebook page numbers so that
+ m_id reflects the current position, Daniel Paull */
+ int count = 0;
+ wxNode *node = m_pages.First();
+ wxNotebookPage *pagePtr = (wxNotebookPage *) NULL;
+ while (node)
+ {
+ pagePtr = (wxNotebookPage*)node->Data();
+ pagePtr->m_id = count++;
+ node = node->Next();
+ }
+
return TRUE;
}