Added wxUSE_SPINCTRL,
Added various HAVE_XIM patches. Added forty's headers to list of installed files. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# This file was automatically generated by tmake at 16:17, 1999/12/04
|
# This file was automatically generated by tmake at 12:32, 1999/12/07
|
||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -2437,6 +2437,7 @@ SAMPLES_DIST:
|
|||||||
mkdir $(DISTDIR)/samples/forty
|
mkdir $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/Makefile.in $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/Makefile.in $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/makefile.unx $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/makefile.unx $(DISTDIR)/samples/forty
|
||||||
|
cp $(SAMPDIR)/forty/*.h $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.cpp $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.cpp $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.xpm $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.xpm $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.xbm $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.xbm $(DISTDIR)/samples/forty
|
||||||
|
@@ -914,6 +914,7 @@ SAMPLES_DIST:
|
|||||||
mkdir $(DISTDIR)/samples/forty
|
mkdir $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/Makefile.in $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/Makefile.in $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/makefile.unx $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/makefile.unx $(DISTDIR)/samples/forty
|
||||||
|
cp $(SAMPDIR)/forty/*.h $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.cpp $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.cpp $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.xpm $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.xpm $(DISTDIR)/samples/forty
|
||||||
cp $(SAMPDIR)/forty/*.xbm $(DISTDIR)/samples/forty
|
cp $(SAMPDIR)/forty/*.xbm $(DISTDIR)/samples/forty
|
||||||
|
@@ -1790,6 +1790,10 @@ typedef struct _GdkWindow GdkPixmap;
|
|||||||
typedef struct _GdkCursor GdkCursor;
|
typedef struct _GdkCursor GdkCursor;
|
||||||
typedef struct _GdkRegion GdkRegion;
|
typedef struct _GdkRegion GdkRegion;
|
||||||
typedef struct _GdkDragContext GdkDragContext;
|
typedef struct _GdkDragContext GdkDragContext;
|
||||||
|
#ifdef HAVE_XIM
|
||||||
|
typedef struct _GdkIC GdkIC;
|
||||||
|
typedef struct _GdkICAttr GdkICAttr;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Stand-ins for GTK types */
|
/* Stand-ins for GTK types */
|
||||||
typedef struct _GtkWidget GtkWidget;
|
typedef struct _GtkWidget GtkWidget;
|
||||||
|
@@ -167,6 +167,12 @@ public:
|
|||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
GtkWidget *m_wxwindow;
|
GtkWidget *m_wxwindow;
|
||||||
|
|
||||||
|
#if HAVE_XIM
|
||||||
|
/* XIM support for wxWindows */
|
||||||
|
GdkIC *m_ic;
|
||||||
|
GdkICAttr *m_icattr;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* scrolling stuff */
|
/* scrolling stuff */
|
||||||
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
||||||
float m_oldHorizontalPos;
|
float m_oldHorizontalPos;
|
||||||
|
@@ -167,6 +167,12 @@ public:
|
|||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
GtkWidget *m_wxwindow;
|
GtkWidget *m_wxwindow;
|
||||||
|
|
||||||
|
#if HAVE_XIM
|
||||||
|
/* XIM support for wxWindows */
|
||||||
|
GdkIC *m_ic;
|
||||||
|
GdkICAttr *m_icattr;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* scrolling stuff */
|
/* scrolling stuff */
|
||||||
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
GtkAdjustment *m_hAdjust,*m_vAdjust;
|
||||||
float m_oldHorizontalPos;
|
float m_oldHorizontalPos;
|
||||||
|
@@ -278,6 +278,10 @@
|
|||||||
* Use this control
|
* Use this control
|
||||||
*/
|
*/
|
||||||
#define wxUSE_SPINBTN 0
|
#define wxUSE_SPINBTN 0
|
||||||
|
/*
|
||||||
|
* Use this control
|
||||||
|
*/
|
||||||
|
#define wxUSE_SPINCTRL 0
|
||||||
/*
|
/*
|
||||||
* Use this control
|
* Use this control
|
||||||
*/
|
*/
|
||||||
|
@@ -1621,7 +1621,7 @@ wxWindow *wxWindowBase::FindFocus()
|
|||||||
been realized, so we do this directly after realization */
|
been realized, so we do this directly after realization */
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
gtk_window_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
|
gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
@@ -1642,6 +1642,98 @@ gtk_window_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// "realize" from m_wxwindow
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* Initialize XIM support */
|
||||||
|
|
||||||
|
static gint
|
||||||
|
gtk_wxwindow_realized_callback( GtkWidget *widget, wxWindow *win )
|
||||||
|
{
|
||||||
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
|
#ifdef USE_XIM
|
||||||
|
if (win->m_ic) return FALSE;
|
||||||
|
if (!widget) return FALSE;
|
||||||
|
if (!gdk_im_ready()) return FALSE;
|
||||||
|
|
||||||
|
win->m_icattr = gdk_ic_attr_new();
|
||||||
|
if (!win->m_icattr) return FALSE;
|
||||||
|
|
||||||
|
gint width, height;
|
||||||
|
GdkEventMask mask;
|
||||||
|
GdkColormap *colormap;
|
||||||
|
GdkICAttr *attr = win->m_icattr;
|
||||||
|
GdkICAttributesType attrmask = GDK_IC_ALL_REQ;
|
||||||
|
GdkIMStyle style;
|
||||||
|
GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE |
|
||||||
|
GDK_IM_PREEDIT_NOTHING |
|
||||||
|
GDK_IM_PREEDIT_POSITION |
|
||||||
|
GDK_IM_STATUS_NONE |
|
||||||
|
GDK_IM_STATUS_NOTHING;
|
||||||
|
|
||||||
|
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET)
|
||||||
|
supported_style &= ~GDK_IM_PREEDIT_POSITION;
|
||||||
|
|
||||||
|
attr->style = style = gdk_im_decide_style (supported_style);
|
||||||
|
attr->client_window = widget->window;
|
||||||
|
|
||||||
|
if ((colormap = gtk_widget_get_colormap (widget)) !=
|
||||||
|
gtk_widget_get_default_colormap ())
|
||||||
|
{
|
||||||
|
attrmask |= GDK_IC_PREEDIT_COLORMAP;
|
||||||
|
attr->preedit_colormap = colormap;
|
||||||
|
}
|
||||||
|
|
||||||
|
attrmask |= GDK_IC_PREEDIT_FOREGROUND;
|
||||||
|
attrmask |= GDK_IC_PREEDIT_BACKGROUND;
|
||||||
|
attr->preedit_foreground = widget->style->fg[GTK_STATE_NORMAL];
|
||||||
|
attr->preedit_background = widget->style->base[GTK_STATE_NORMAL];
|
||||||
|
|
||||||
|
switch (style & GDK_IM_PREEDIT_MASK)
|
||||||
|
{
|
||||||
|
case GDK_IM_PREEDIT_POSITION:
|
||||||
|
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET)
|
||||||
|
{
|
||||||
|
g_warning ("over-the-spot style requires fontset");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdk_window_get_size (widget->window, &width, &height);
|
||||||
|
|
||||||
|
attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
|
||||||
|
attr->spot_location.x = 0;
|
||||||
|
attr->spot_location.y = height;
|
||||||
|
attr->preedit_area.x = 0;
|
||||||
|
attr->preedit_area.y = 0;
|
||||||
|
attr->preedit_area.width = width;
|
||||||
|
attr->preedit_area.height = height;
|
||||||
|
attr->preedit_fontset = widget->style->font;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
win->m_ic = gdk_ic_new (attr, attrmask);
|
||||||
|
|
||||||
|
if (win->m_ic == NULL)
|
||||||
|
g_warning ("Can't create input context.");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mask = gdk_window_get_events (widget->window);
|
||||||
|
mask |= gdk_ic_get_events (win->m_ic);
|
||||||
|
gdk_window_set_events (widget->window, mask);
|
||||||
|
|
||||||
|
if (GTK_WIDGET_HAS_FOCUS(widget))
|
||||||
|
gdk_im_begin (win->m_ic, widget->window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// InsertChild for wxWindow.
|
// InsertChild for wxWindow.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -1726,6 +1818,11 @@ void wxWindow::Init()
|
|||||||
m_acceptsFocus = FALSE;
|
m_acceptsFocus = FALSE;
|
||||||
|
|
||||||
m_cursor = *wxSTANDARD_CURSOR;
|
m_cursor = *wxSTANDARD_CURSOR;
|
||||||
|
|
||||||
|
#ifdef HAVE_XIM
|
||||||
|
m_ic = (GdkIC*) NULL;
|
||||||
|
m_icattr = (GdkICAttr*) NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow::wxWindow()
|
wxWindow::wxWindow()
|
||||||
@@ -1901,6 +1998,13 @@ wxWindow::~wxWindow()
|
|||||||
if (m_parent)
|
if (m_parent)
|
||||||
m_parent->RemoveChild( this );
|
m_parent->RemoveChild( this );
|
||||||
|
|
||||||
|
#ifdef HAVE_XIM
|
||||||
|
if (m_ic)
|
||||||
|
gdk_ic_destroy (m_ic);
|
||||||
|
if (m_icattr)
|
||||||
|
gdk_ic_attr_destroy (m_icattr);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle)
|
||||||
{
|
{
|
||||||
gtk_style_unref( m_widgetStyle );
|
gtk_style_unref( m_widgetStyle );
|
||||||
@@ -1978,15 +2082,42 @@ void wxWindow::PostCreation()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_wxwindow && m_needParent)
|
||||||
|
{
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// For dialogs and frames, we are interested mainly in
|
||||||
|
// m_widget's focus.
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_widget), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_widget), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
|
|
||||||
ConnectWidget( connect_widget );
|
ConnectWidget( connect_widget );
|
||||||
|
|
||||||
/* we cannot set colours, fonts and cursors before the widget has
|
/* We cannot set colours, fonts and cursors before the widget has
|
||||||
been realized, so we do this directly after realization */
|
been realized, so we do this directly after realization */
|
||||||
gtk_signal_connect( GTK_OBJECT(connect_widget), "realize",
|
gtk_signal_connect( GTK_OBJECT(connect_widget), "realize",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_realized_callback), (gpointer) this );
|
GTK_SIGNAL_FUNC(gtk_window_realized_callback), (gpointer) this );
|
||||||
|
|
||||||
|
/* Initialize XIM support. */
|
||||||
|
if (m_wxwindow)
|
||||||
|
{
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "realize",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_wxwindow_realized_callback), (gpointer) this );
|
||||||
|
}
|
||||||
|
|
||||||
m_hasVMT = TRUE;
|
m_hasVMT = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2007,12 +2138,6 @@ void wxWindow::ConnectWidget( GtkWidget *widget )
|
|||||||
gtk_signal_connect( GTK_OBJECT(widget), "motion_notify_event",
|
gtk_signal_connect( GTK_OBJECT(widget), "motion_notify_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "focus_in_event",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "focus_out_event",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "enter_notify_event",
|
gtk_signal_connect( GTK_OBJECT(widget), "enter_notify_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this );
|
||||||
|
|
||||||
|
@@ -1621,7 +1621,7 @@ wxWindow *wxWindowBase::FindFocus()
|
|||||||
been realized, so we do this directly after realization */
|
been realized, so we do this directly after realization */
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
gtk_window_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
|
gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win )
|
||||||
{
|
{
|
||||||
if (g_isIdle)
|
if (g_isIdle)
|
||||||
wxapp_install_idle_handler();
|
wxapp_install_idle_handler();
|
||||||
@@ -1642,6 +1642,98 @@ gtk_window_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// "realize" from m_wxwindow
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* Initialize XIM support */
|
||||||
|
|
||||||
|
static gint
|
||||||
|
gtk_wxwindow_realized_callback( GtkWidget *widget, wxWindow *win )
|
||||||
|
{
|
||||||
|
if (g_isIdle)
|
||||||
|
wxapp_install_idle_handler();
|
||||||
|
|
||||||
|
#ifdef USE_XIM
|
||||||
|
if (win->m_ic) return FALSE;
|
||||||
|
if (!widget) return FALSE;
|
||||||
|
if (!gdk_im_ready()) return FALSE;
|
||||||
|
|
||||||
|
win->m_icattr = gdk_ic_attr_new();
|
||||||
|
if (!win->m_icattr) return FALSE;
|
||||||
|
|
||||||
|
gint width, height;
|
||||||
|
GdkEventMask mask;
|
||||||
|
GdkColormap *colormap;
|
||||||
|
GdkICAttr *attr = win->m_icattr;
|
||||||
|
GdkICAttributesType attrmask = GDK_IC_ALL_REQ;
|
||||||
|
GdkIMStyle style;
|
||||||
|
GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE |
|
||||||
|
GDK_IM_PREEDIT_NOTHING |
|
||||||
|
GDK_IM_PREEDIT_POSITION |
|
||||||
|
GDK_IM_STATUS_NONE |
|
||||||
|
GDK_IM_STATUS_NOTHING;
|
||||||
|
|
||||||
|
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET)
|
||||||
|
supported_style &= ~GDK_IM_PREEDIT_POSITION;
|
||||||
|
|
||||||
|
attr->style = style = gdk_im_decide_style (supported_style);
|
||||||
|
attr->client_window = widget->window;
|
||||||
|
|
||||||
|
if ((colormap = gtk_widget_get_colormap (widget)) !=
|
||||||
|
gtk_widget_get_default_colormap ())
|
||||||
|
{
|
||||||
|
attrmask |= GDK_IC_PREEDIT_COLORMAP;
|
||||||
|
attr->preedit_colormap = colormap;
|
||||||
|
}
|
||||||
|
|
||||||
|
attrmask |= GDK_IC_PREEDIT_FOREGROUND;
|
||||||
|
attrmask |= GDK_IC_PREEDIT_BACKGROUND;
|
||||||
|
attr->preedit_foreground = widget->style->fg[GTK_STATE_NORMAL];
|
||||||
|
attr->preedit_background = widget->style->base[GTK_STATE_NORMAL];
|
||||||
|
|
||||||
|
switch (style & GDK_IM_PREEDIT_MASK)
|
||||||
|
{
|
||||||
|
case GDK_IM_PREEDIT_POSITION:
|
||||||
|
if (widget->style && widget->style->font->type != GDK_FONT_FONTSET)
|
||||||
|
{
|
||||||
|
g_warning ("over-the-spot style requires fontset");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
gdk_window_get_size (widget->window, &width, &height);
|
||||||
|
|
||||||
|
attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
|
||||||
|
attr->spot_location.x = 0;
|
||||||
|
attr->spot_location.y = height;
|
||||||
|
attr->preedit_area.x = 0;
|
||||||
|
attr->preedit_area.y = 0;
|
||||||
|
attr->preedit_area.width = width;
|
||||||
|
attr->preedit_area.height = height;
|
||||||
|
attr->preedit_fontset = widget->style->font;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
win->m_ic = gdk_ic_new (attr, attrmask);
|
||||||
|
|
||||||
|
if (win->m_ic == NULL)
|
||||||
|
g_warning ("Can't create input context.");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mask = gdk_window_get_events (widget->window);
|
||||||
|
mask |= gdk_ic_get_events (win->m_ic);
|
||||||
|
gdk_window_set_events (widget->window, mask);
|
||||||
|
|
||||||
|
if (GTK_WIDGET_HAS_FOCUS(widget))
|
||||||
|
gdk_im_begin (win->m_ic, widget->window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// InsertChild for wxWindow.
|
// InsertChild for wxWindow.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -1726,6 +1818,11 @@ void wxWindow::Init()
|
|||||||
m_acceptsFocus = FALSE;
|
m_acceptsFocus = FALSE;
|
||||||
|
|
||||||
m_cursor = *wxSTANDARD_CURSOR;
|
m_cursor = *wxSTANDARD_CURSOR;
|
||||||
|
|
||||||
|
#ifdef HAVE_XIM
|
||||||
|
m_ic = (GdkIC*) NULL;
|
||||||
|
m_icattr = (GdkICAttr*) NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow::wxWindow()
|
wxWindow::wxWindow()
|
||||||
@@ -1901,6 +1998,13 @@ wxWindow::~wxWindow()
|
|||||||
if (m_parent)
|
if (m_parent)
|
||||||
m_parent->RemoveChild( this );
|
m_parent->RemoveChild( this );
|
||||||
|
|
||||||
|
#ifdef HAVE_XIM
|
||||||
|
if (m_ic)
|
||||||
|
gdk_ic_destroy (m_ic);
|
||||||
|
if (m_icattr)
|
||||||
|
gdk_ic_attr_destroy (m_icattr);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_widgetStyle)
|
if (m_widgetStyle)
|
||||||
{
|
{
|
||||||
gtk_style_unref( m_widgetStyle );
|
gtk_style_unref( m_widgetStyle );
|
||||||
@@ -1978,15 +2082,42 @@ void wxWindow::PostCreation()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_wxwindow && m_needParent)
|
||||||
|
{
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// For dialogs and frames, we are interested mainly in
|
||||||
|
// m_widget's focus.
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_widget), "focus_in_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
||||||
|
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_widget), "focus_out_event",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *connect_widget = GetConnectWidget();
|
GtkWidget *connect_widget = GetConnectWidget();
|
||||||
|
|
||||||
ConnectWidget( connect_widget );
|
ConnectWidget( connect_widget );
|
||||||
|
|
||||||
/* we cannot set colours, fonts and cursors before the widget has
|
/* We cannot set colours, fonts and cursors before the widget has
|
||||||
been realized, so we do this directly after realization */
|
been realized, so we do this directly after realization */
|
||||||
gtk_signal_connect( GTK_OBJECT(connect_widget), "realize",
|
gtk_signal_connect( GTK_OBJECT(connect_widget), "realize",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_realized_callback), (gpointer) this );
|
GTK_SIGNAL_FUNC(gtk_window_realized_callback), (gpointer) this );
|
||||||
|
|
||||||
|
/* Initialize XIM support. */
|
||||||
|
if (m_wxwindow)
|
||||||
|
{
|
||||||
|
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "realize",
|
||||||
|
GTK_SIGNAL_FUNC(gtk_wxwindow_realized_callback), (gpointer) this );
|
||||||
|
}
|
||||||
|
|
||||||
m_hasVMT = TRUE;
|
m_hasVMT = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2007,12 +2138,6 @@ void wxWindow::ConnectWidget( GtkWidget *widget )
|
|||||||
gtk_signal_connect( GTK_OBJECT(widget), "motion_notify_event",
|
gtk_signal_connect( GTK_OBJECT(widget), "motion_notify_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_motion_notify_callback), (gpointer)this );
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "focus_in_event",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "focus_out_event",
|
|
||||||
GTK_SIGNAL_FUNC(gtk_window_focus_out_callback), (gpointer)this );
|
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(widget), "enter_notify_event",
|
gtk_signal_connect( GTK_OBJECT(widget), "enter_notify_event",
|
||||||
GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this );
|
GTK_SIGNAL_FUNC(gtk_window_enter_callback), (gpointer)this );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user