Fixed optical bug in wxListCtrl,
Added dnd.wxr to install script, Fixed two problems in wxGLCanvas. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# This file was automatically generated by tmake at 16:44, 1999/11/05
|
# This file was automatically generated by tmake at 15:47, 1999/11/11
|
||||||
# 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!
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -1651,6 +1651,7 @@ MSW_GUIOBJS = \
|
|||||||
filedlg.o \
|
filedlg.o \
|
||||||
font.o \
|
font.o \
|
||||||
fontdlg.o \
|
fontdlg.o \
|
||||||
|
fontenum.o \
|
||||||
fontutil.o \
|
fontutil.o \
|
||||||
frame.o \
|
frame.o \
|
||||||
gauge95.o \
|
gauge95.o \
|
||||||
@@ -1739,6 +1740,7 @@ MSW_GUIDEPS = \
|
|||||||
filedlg.d \
|
filedlg.d \
|
||||||
font.d \
|
font.d \
|
||||||
fontdlg.d \
|
fontdlg.d \
|
||||||
|
fontenum.d \
|
||||||
fontutil.d \
|
fontutil.d \
|
||||||
frame.d \
|
frame.d \
|
||||||
gauge95.d \
|
gauge95.d \
|
||||||
@@ -2325,6 +2327,7 @@ SAMPLES_DIST:
|
|||||||
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
|
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
|
||||||
mkdir $(DISTDIR)/samples/dnd
|
mkdir $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/Makefile.in $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/Makefile.in $(DISTDIR)/samples/dnd
|
||||||
|
cp $(SAMPDIR)/dnd/*.wxr $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.cpp $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.cpp $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.xpm $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.xpm $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd
|
||||||
|
@@ -818,6 +818,7 @@ SAMPLES_DIST:
|
|||||||
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
|
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
|
||||||
mkdir $(DISTDIR)/samples/dnd
|
mkdir $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/Makefile.in $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/Makefile.in $(DISTDIR)/samples/dnd
|
||||||
|
cp $(SAMPDIR)/dnd/*.wxr $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.cpp $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.cpp $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.xpm $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.xpm $(DISTDIR)/samples/dnd
|
||||||
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd
|
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd
|
||||||
|
@@ -804,6 +804,7 @@ void DnDFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
void DnDFrame::OnUpdateUIPasteText(wxUpdateUIEvent& event)
|
void DnDFrame::OnUpdateUIPasteText(wxUpdateUIEvent& event)
|
||||||
{
|
{
|
||||||
event.Enable( wxTheClipboard->IsSupported(wxDF_TEXT) );
|
event.Enable( wxTheClipboard->IsSupported(wxDF_TEXT) );
|
||||||
|
// event.Enable( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DnDFrame::OnUpdateUIPasteBitmap(wxUpdateUIEvent& event)
|
void DnDFrame::OnUpdateUIPasteBitmap(wxUpdateUIEvent& event)
|
||||||
|
@@ -872,7 +872,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
|
|||||||
m_minX = 0;
|
m_minX = 0;
|
||||||
bool hit_border = FALSE;
|
bool hit_border = FALSE;
|
||||||
int xpos = 0;
|
int xpos = 0;
|
||||||
for (int j = 0; j < m_owner->GetColumnCount(); j++)
|
for (int j = 0; j < m_owner->GetColumnCount()-1; j++)
|
||||||
{
|
{
|
||||||
xpos += m_owner->GetColumnWidth( j );
|
xpos += m_owner->GetColumnWidth( j );
|
||||||
m_column = j;
|
m_column = j;
|
||||||
|
@@ -50,11 +50,14 @@ IMPLEMENT_CLASS(wxGLContext,wxObject)
|
|||||||
wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette& WXUNUSED(palette) )
|
wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette& WXUNUSED(palette) )
|
||||||
{
|
{
|
||||||
m_window = win;
|
m_window = win;
|
||||||
m_widget = ((wxGLCanvas*)win)->m_glWidget;
|
m_widget = win->m_wxwindow;
|
||||||
|
|
||||||
wxCHECK_RET( g_vi, "invalid visual for OpenGl" );
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), g_vi, None, GL_TRUE );
|
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
||||||
|
|
||||||
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
||||||
}
|
}
|
||||||
@@ -66,15 +69,17 @@ wxGLContext::wxGLContext(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
m_window = win;
|
m_window = win;
|
||||||
m_widget = ((wxGLCanvas*)win)->m_glWidget;
|
m_widget = win->m_wxwindow;
|
||||||
|
|
||||||
wxCHECK_RET( g_vi, "invalid visual for OpenGl" );
|
wxGLCanvas *gc = (wxGLCanvas*) win;
|
||||||
|
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
|
||||||
|
|
||||||
|
wxCHECK_RET( vi, "invalid visual for OpenGl" );
|
||||||
|
|
||||||
if( other != 0 )
|
if( other != 0 )
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), g_vi, other->m_glContext,
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, other->m_glContext, GL_TRUE );
|
||||||
GL_TRUE );
|
|
||||||
else
|
else
|
||||||
m_glContext = glXCreateContext( GDK_DISPLAY(), g_vi, None, GL_TRUE );
|
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, None, GL_TRUE );
|
||||||
|
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
||||||
}
|
}
|
||||||
@@ -146,9 +151,6 @@ gtk_glwindow_realized_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
|||||||
{
|
{
|
||||||
win->m_glContext = new wxGLContext( TRUE, win, wxNullPalette, win->m_sharedContext );
|
win->m_glContext = new wxGLContext( TRUE, win, wxNullPalette, win->m_sharedContext );
|
||||||
|
|
||||||
XFree( g_vi );
|
|
||||||
g_vi = (XVisualInfo*) NULL;
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,6 +245,7 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
const wxPalette& palette)
|
const wxPalette& palette)
|
||||||
{
|
{
|
||||||
m_sharedContext = (wxGLContext*)shared; // const_cast
|
m_sharedContext = (wxGLContext*)shared; // const_cast
|
||||||
|
m_glContext = (wxGLContext*) NULL;
|
||||||
|
|
||||||
m_exposed = FALSE;
|
m_exposed = FALSE;
|
||||||
m_noExpose = TRUE;
|
m_noExpose = TRUE;
|
||||||
@@ -290,12 +293,14 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
|
|
||||||
Display *dpy = GDK_DISPLAY();
|
Display *dpy = GDK_DISPLAY();
|
||||||
|
|
||||||
g_vi = glXChooseVisual( dpy, DefaultScreen(dpy), attribList );
|
XVisualInfo *vi = glXChooseVisual( dpy, DefaultScreen(dpy), attribList );
|
||||||
|
|
||||||
wxCHECK_MSG( g_vi, FALSE, "required visual couldn't be found" );
|
m_vi = vi; // safe for later use
|
||||||
|
|
||||||
GdkVisual *visual = gdkx_visual_get( g_vi->visualid );
|
wxCHECK_MSG( m_vi, FALSE, "required visual couldn't be found" );
|
||||||
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(g_vi->visualid), TRUE );
|
|
||||||
|
GdkVisual *visual = gdkx_visual_get( vi->visualid );
|
||||||
|
GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(vi->visualid), TRUE );
|
||||||
|
|
||||||
gtk_widget_push_colormap( colormap );
|
gtk_widget_push_colormap( colormap );
|
||||||
gtk_widget_push_visual( visual );
|
gtk_widget_push_visual( visual );
|
||||||
@@ -326,6 +331,11 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
|||||||
|
|
||||||
wxGLCanvas::~wxGLCanvas()
|
wxGLCanvas::~wxGLCanvas()
|
||||||
{
|
{
|
||||||
|
XVisualInfo *vi = (XVisualInfo *) m_vi;
|
||||||
|
|
||||||
|
if (vi)
|
||||||
|
XFree( vi );
|
||||||
|
|
||||||
if (m_glContext) delete m_glContext;
|
if (m_glContext) delete m_glContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -132,6 +132,7 @@ public:
|
|||||||
|
|
||||||
wxGLContext *m_glContext,
|
wxGLContext *m_glContext,
|
||||||
*m_sharedContext;
|
*m_sharedContext;
|
||||||
|
void *m_vi;
|
||||||
GtkWidget *m_glWidget;
|
GtkWidget *m_glWidget;
|
||||||
bool m_exposed;
|
bool m_exposed;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user