wxWindow no longer emits any scroll events after

a programmatic change to its scrollbars.
  Reverted sense of SHIFT and CONTROL in wxListCtrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2000-02-05 10:33:57 +00:00
parent 2531c7e393
commit 473d087e56
5 changed files with 77 additions and 14 deletions

View File

@ -9,6 +9,7 @@ static char * listview_xpm[] = {
" ",
" ",
" ................ ",
" .++++++++++++++. ",
" .+@@+++++@@++++. ",
" .+@+@+.#+@+@+.+. ",
" .+@@@++++@@@+++. ",
@ -22,7 +23,6 @@ static char * listview_xpm[] = {
" .+@@+++++@@++++. ",
" .+@+@+.#+@+@+.+. ",
" .+@@@++++@@@+++. ",
" .++++++++++++++. ",
" ................ ",
" ",
" "};

View File

@ -65,25 +65,24 @@
class wxFileIconEntry : public wxObject
{
public:
wxFileIconEntry(int i) { id = i; }
public:
wxFileIconEntry(int i) { id = i; }
int id;
int id;
};
class wxFileIconsTable
{
public:
public:
wxFileIconsTable();
wxFileIconsTable();
int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString);
wxImageList *GetImageList() { return &m_ImageList; }
int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString);
wxImageList *GetImageList() { return &m_ImageList; }
protected:
wxImageList m_ImageList;
wxHashTable m_HashTable;
protected:
wxImageList m_ImageList;
wxHashTable m_HashTable;
};
static wxFileIconsTable *g_IconsTable = NULL;

View File

@ -1467,13 +1467,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
}
else
{
if (event.ShiftDown())
if (event.ControlDown())
{
m_current = line;
m_current->ReverseHilight();
RefreshLine( m_current );
}
else if (event.ControlDown())
else if (event.ShiftDown())
{
m_current = line;

View File

@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
}
if (orient == wxHORIZONTAL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
}
else
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
gtk_signal_connect( GTK_OBJECT(m_vAdjust), "changed",
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
}
}
void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
@ -3367,9 +3383,25 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
if (m_wxwindow->window)
{
if (orient == wxHORIZONTAL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
}
else
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
}
}
}

View File

@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
}
if (orient == wxHORIZONTAL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
}
else
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
gtk_signal_connect( GTK_OBJECT(m_vAdjust), "changed",
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
}
}
void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
@ -3367,9 +3383,25 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
if (m_wxwindow->window)
{
if (orient == wxHORIZONTAL)
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
}
else
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
}
}
}