Added support for frames without borders (such as for
splash screen) with wxSIMPLE_BORDER Fixed tooltip bug -> recompile everything Added validators to wxListCtrl Fixed Create/Realize bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -531,13 +531,18 @@ class wxListCtrl: public wxControl
|
||||
public:
|
||||
|
||||
wxListCtrl(void);
|
||||
wxListCtrl( wxWindow *parent, wxWindowID id,
|
||||
wxListCtrl( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = "listctrl" );
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" )
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
~wxListCtrl(void);
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
bool Create( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||
long style = 0, const wxString &name = "listctrl" );
|
||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = "listctrl" );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
bool GetColumn( int col, wxListItem& item );
|
||||
bool SetColumn( int col, wxListItem& item );
|
||||
|
@@ -280,6 +280,7 @@ public:
|
||||
bool m_hasVMT;
|
||||
bool m_sizeSet;
|
||||
bool m_resizing;
|
||||
GdkGC *m_scrollGC;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -280,6 +280,7 @@ public:
|
||||
bool m_hasVMT;
|
||||
bool m_sizeSet;
|
||||
bool m_resizing;
|
||||
GdkGC *m_scrollGC;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -2111,21 +2111,14 @@ wxListCtrl::wxListCtrl(void)
|
||||
m_imageListState = (wxImageList *) NULL;
|
||||
}
|
||||
|
||||
wxListCtrl::wxListCtrl( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos, const wxSize &size,
|
||||
long style, const wxString &name )
|
||||
|
||||
{
|
||||
Create( parent, id, pos, size, style, name );
|
||||
}
|
||||
|
||||
wxListCtrl::~wxListCtrl(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos, const wxSize &size,
|
||||
long style, const wxString &name )
|
||||
long style, const wxValidator &validator,
|
||||
const wxString &name )
|
||||
{
|
||||
m_imageListNormal = (wxImageList *) NULL;
|
||||
m_imageListSmall = (wxImageList *) NULL;
|
||||
@@ -2140,6 +2133,8 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
bool ret = wxControl::Create( parent, id, pos, size, s, name );
|
||||
|
||||
SetValidator( validator );
|
||||
|
||||
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, s );
|
||||
|
||||
if (GetWindowStyleFlag() & wxLC_REPORT)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: accel.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id:
|
||||
// Id: $id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: app.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $id$
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -135,7 +135,10 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
|
||||
m_title = title;
|
||||
|
||||
m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
||||
|
||||
m_widget = gtk_window_new( win_type );
|
||||
if ((size.x != -1) && (size.y != -1))
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
if ((pos.x != -1) && (pos.y != -1))
|
||||
|
@@ -31,13 +31,9 @@ wxMenuBar::wxMenuBar()
|
||||
|
||||
m_menus.DeleteContents( TRUE );
|
||||
|
||||
m_widget = gtk_handle_box_new();
|
||||
|
||||
m_menubar = gtk_menu_bar_new();
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_menubar );
|
||||
|
||||
gtk_widget_show( m_menubar );
|
||||
m_widget = GTK_WIDGET(m_menubar);
|
||||
|
||||
PostCreation();
|
||||
|
||||
|
@@ -2,9 +2,7 @@
|
||||
// Name: tbargtk.cpp
|
||||
// Purpose: GTK toolbar
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -113,16 +111,13 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_tools.DeleteContents( TRUE );
|
||||
|
||||
m_widget = gtk_handle_box_new();
|
||||
|
||||
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL,
|
||||
GTK_TOOLBAR_ICONS ) );
|
||||
|
||||
m_widget = GTK_WIDGET(m_toolbar);
|
||||
|
||||
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
|
||||
|
||||
gtk_widget_show( GTK_WIDGET(m_toolbar) );
|
||||
|
||||
PostCreation();
|
||||
|
||||
Show( TRUE );
|
||||
@@ -209,12 +204,6 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
|
||||
(gpointer)tool
|
||||
);
|
||||
|
||||
// VZ: we don't want GDK_NO_EXPOSE events because for some reason our
|
||||
// toolbar buttons get them (it doesn't happen in a standalone GTK+ program
|
||||
// for unknown reasons) and it prevents tooltips from appearing.
|
||||
gtk_widget_set_events( GTK_WIDGET(item),
|
||||
gtk_widget_get_events( GTK_WIDGET(item) ) &
|
||||
~GDK_EXPOSURE_MASK);
|
||||
tool->m_item = item;
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(tool->m_item),
|
||||
|
@@ -913,6 +913,7 @@ wxWindow::wxWindow()
|
||||
m_pDropTarget = (wxDropTarget *) NULL;
|
||||
m_resizing = FALSE;
|
||||
m_hasOwnStyle = FALSE;
|
||||
m_scrollGC = (GdkGC*) NULL;
|
||||
}
|
||||
|
||||
bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
||||
@@ -982,7 +983,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_wxwindow = gtk_myfixed_new();
|
||||
|
||||
if (m_wxwindow) GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
|
||||
GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
|
||||
|
||||
if (m_windowStyle & wxTAB_TRAVERSAL == wxTAB_TRAVERSAL)
|
||||
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
|
||||
@@ -1031,6 +1032,8 @@ wxWindow::~wxWindow()
|
||||
|
||||
DestroyChildren();
|
||||
|
||||
if (m_scrollGC) gdk_gc_unref( m_scrollGC );
|
||||
|
||||
if (m_wxwindow) gtk_widget_destroy( m_wxwindow );
|
||||
|
||||
if (m_widget) gtk_widget_destroy( m_widget );
|
||||
@@ -1129,11 +1132,7 @@ void wxWindow::PostCreation()
|
||||
|
||||
if (m_widget && m_parent) gtk_widget_realize( m_widget );
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
gtk_widget_realize( m_wxwindow );
|
||||
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
||||
}
|
||||
if (m_wxwindow) gtk_widget_realize( m_wxwindow );
|
||||
|
||||
SetCursor( *wxSTANDARD_CURSOR );
|
||||
|
||||
@@ -2430,7 +2429,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
|
||||
int d_y = 0;
|
||||
if (dx > 0) d_x = dx;
|
||||
if (dy > 0) d_y = dy;
|
||||
gdk_window_copy_area( m_wxwindow->window, m_wxwindow->style->fg_gc[0], d_x, d_y,
|
||||
|
||||
if (!m_scrollGC)
|
||||
{
|
||||
m_scrollGC = gdk_gc_new( m_wxwindow->window );
|
||||
gdk_gc_set_exposures( m_scrollGC, TRUE );
|
||||
}
|
||||
|
||||
gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
|
||||
m_wxwindow->window, s_x, s_y, w, h );
|
||||
|
||||
wxRect rect;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: accel.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id:
|
||||
// Id: $id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: app.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $id$
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -135,7 +135,10 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
|
||||
m_title = title;
|
||||
|
||||
m_widget = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||
GtkWindowType win_type = GTK_WINDOW_TOPLEVEL;
|
||||
if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP;
|
||||
|
||||
m_widget = gtk_window_new( win_type );
|
||||
if ((size.x != -1) && (size.y != -1))
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
if ((pos.x != -1) && (pos.y != -1))
|
||||
|
@@ -31,13 +31,9 @@ wxMenuBar::wxMenuBar()
|
||||
|
||||
m_menus.DeleteContents( TRUE );
|
||||
|
||||
m_widget = gtk_handle_box_new();
|
||||
|
||||
m_menubar = gtk_menu_bar_new();
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), m_menubar );
|
||||
|
||||
gtk_widget_show( m_menubar );
|
||||
m_widget = GTK_WIDGET(m_menubar);
|
||||
|
||||
PostCreation();
|
||||
|
||||
|
@@ -2,9 +2,7 @@
|
||||
// Name: tbargtk.cpp
|
||||
// Purpose: GTK toolbar
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -113,16 +111,13 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_tools.DeleteContents( TRUE );
|
||||
|
||||
m_widget = gtk_handle_box_new();
|
||||
|
||||
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL,
|
||||
GTK_TOOLBAR_ICONS ) );
|
||||
|
||||
m_widget = GTK_WIDGET(m_toolbar);
|
||||
|
||||
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
|
||||
|
||||
gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
|
||||
|
||||
gtk_widget_show( GTK_WIDGET(m_toolbar) );
|
||||
|
||||
PostCreation();
|
||||
|
||||
Show( TRUE );
|
||||
@@ -209,12 +204,6 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
|
||||
(gpointer)tool
|
||||
);
|
||||
|
||||
// VZ: we don't want GDK_NO_EXPOSE events because for some reason our
|
||||
// toolbar buttons get them (it doesn't happen in a standalone GTK+ program
|
||||
// for unknown reasons) and it prevents tooltips from appearing.
|
||||
gtk_widget_set_events( GTK_WIDGET(item),
|
||||
gtk_widget_get_events( GTK_WIDGET(item) ) &
|
||||
~GDK_EXPOSURE_MASK);
|
||||
tool->m_item = item;
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(tool->m_item),
|
||||
|
@@ -913,6 +913,7 @@ wxWindow::wxWindow()
|
||||
m_pDropTarget = (wxDropTarget *) NULL;
|
||||
m_resizing = FALSE;
|
||||
m_hasOwnStyle = FALSE;
|
||||
m_scrollGC = (GdkGC*) NULL;
|
||||
}
|
||||
|
||||
bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
||||
@@ -982,7 +983,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_wxwindow = gtk_myfixed_new();
|
||||
|
||||
if (m_wxwindow) GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
|
||||
GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
|
||||
|
||||
if (m_windowStyle & wxTAB_TRAVERSAL == wxTAB_TRAVERSAL)
|
||||
GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
|
||||
@@ -1031,6 +1032,8 @@ wxWindow::~wxWindow()
|
||||
|
||||
DestroyChildren();
|
||||
|
||||
if (m_scrollGC) gdk_gc_unref( m_scrollGC );
|
||||
|
||||
if (m_wxwindow) gtk_widget_destroy( m_wxwindow );
|
||||
|
||||
if (m_widget) gtk_widget_destroy( m_widget );
|
||||
@@ -1129,11 +1132,7 @@ void wxWindow::PostCreation()
|
||||
|
||||
if (m_widget && m_parent) gtk_widget_realize( m_widget );
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
gtk_widget_realize( m_wxwindow );
|
||||
gdk_gc_set_exposures( m_wxwindow->style->fg_gc[0], TRUE );
|
||||
}
|
||||
if (m_wxwindow) gtk_widget_realize( m_wxwindow );
|
||||
|
||||
SetCursor( *wxSTANDARD_CURSOR );
|
||||
|
||||
@@ -2430,7 +2429,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
|
||||
int d_y = 0;
|
||||
if (dx > 0) d_x = dx;
|
||||
if (dy > 0) d_y = dy;
|
||||
gdk_window_copy_area( m_wxwindow->window, m_wxwindow->style->fg_gc[0], d_x, d_y,
|
||||
|
||||
if (!m_scrollGC)
|
||||
{
|
||||
m_scrollGC = gdk_gc_new( m_wxwindow->window );
|
||||
gdk_gc_set_exposures( m_scrollGC, TRUE );
|
||||
}
|
||||
|
||||
gdk_window_copy_area( m_wxwindow->window, m_scrollGC, d_x, d_y,
|
||||
m_wxwindow->window, s_x, s_y, w, h );
|
||||
|
||||
wxRect rect;
|
||||
|
Reference in New Issue
Block a user