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:
Robert Roebling
1999-11-11 15:41:43 +00:00
parent 7790267175
commit 4b59bea3dd
6 changed files with 35 additions and 19 deletions

View File

@@ -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!
#
@@ -1651,6 +1651,7 @@ MSW_GUIOBJS = \
filedlg.o \
font.o \
fontdlg.o \
fontenum.o \
fontutil.o \
frame.o \
gauge95.o \
@@ -1739,6 +1740,7 @@ MSW_GUIDEPS = \
filedlg.d \
font.d \
fontdlg.d \
fontenum.d \
fontutil.d \
frame.d \
gauge95.d \
@@ -2325,6 +2327,7 @@ SAMPLES_DIST:
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
mkdir $(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/*.xpm $(DISTDIR)/samples/dnd
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd

View File

@@ -818,6 +818,7 @@ SAMPLES_DIST:
cp $(SAMPDIR)/dialogs/*.txt $(DISTDIR)/samples/dialogs
mkdir $(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/*.xpm $(DISTDIR)/samples/dnd
cp $(SAMPDIR)/dnd/*.txt $(DISTDIR)/samples/dnd

View File

@@ -804,6 +804,7 @@ void DnDFrame::OnPaint(wxPaintEvent& WXUNUSED(event))
void DnDFrame::OnUpdateUIPasteText(wxUpdateUIEvent& event)
{
event.Enable( wxTheClipboard->IsSupported(wxDF_TEXT) );
// event.Enable( TRUE );
}
void DnDFrame::OnUpdateUIPasteBitmap(wxUpdateUIEvent& event)

View File

@@ -872,7 +872,7 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
m_minX = 0;
bool hit_border = FALSE;
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 );
m_column = j;

View File

@@ -50,11 +50,14 @@ IMPLEMENT_CLASS(wxGLContext,wxObject)
wxGLContext::wxGLContext( bool WXUNUSED(isRGB), wxWindow *win, const wxPalette& WXUNUSED(palette) )
{
m_window = win;
m_widget = ((wxGLCanvas*)win)->m_glWidget;
wxCHECK_RET( g_vi, "invalid visual for OpenGl" );
m_widget = win->m_wxwindow;
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" );
}
@@ -66,15 +69,17 @@ wxGLContext::wxGLContext(
)
{
m_window = win;
m_widget = ((wxGLCanvas*)win)->m_glWidget;
wxCHECK_RET( g_vi, "invalid visual for OpenGl" );
m_widget = win->m_wxwindow;
wxGLCanvas *gc = (wxGLCanvas*) win;
XVisualInfo *vi = (XVisualInfo *) gc->m_vi;
wxCHECK_RET( vi, "invalid visual for OpenGl" );
if( other != 0 )
m_glContext = glXCreateContext( GDK_DISPLAY(), g_vi, other->m_glContext,
GL_TRUE );
m_glContext = glXCreateContext( GDK_DISPLAY(), vi, other->m_glContext, GL_TRUE );
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" );
}
@@ -146,9 +151,6 @@ gtk_glwindow_realized_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
{
win->m_glContext = new wxGLContext( TRUE, win, wxNullPalette, win->m_sharedContext );
XFree( g_vi );
g_vi = (XVisualInfo*) NULL;
return FALSE;
}
@@ -243,6 +245,7 @@ bool wxGLCanvas::Create( wxWindow *parent,
const wxPalette& palette)
{
m_sharedContext = (wxGLContext*)shared; // const_cast
m_glContext = (wxGLContext*) NULL;
m_exposed = FALSE;
m_noExpose = TRUE;
@@ -290,12 +293,14 @@ bool wxGLCanvas::Create( wxWindow *parent,
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
wxCHECK_MSG( m_vi, FALSE, "required visual couldn't be found" );
GdkVisual *visual = gdkx_visual_get( g_vi->visualid );
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_visual( visual );
@@ -326,6 +331,11 @@ bool wxGLCanvas::Create( wxWindow *parent,
wxGLCanvas::~wxGLCanvas()
{
XVisualInfo *vi = (XVisualInfo *) m_vi;
if (vi)
XFree( vi );
if (m_glContext) delete m_glContext;
}

View File

@@ -132,6 +132,7 @@ public:
wxGLContext *m_glContext,
*m_sharedContext;
void *m_vi;
GtkWidget *m_glWidget;
bool m_exposed;