X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a240683ed2ed0ad7efe733d451dd36740607605..319fefa9109ef95cab9f6dcbd46e3f3edbcff8c9:/include/wx/generic/listctrl.h diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 697ce88046..70afe45135 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -145,8 +145,8 @@ enum { // Autosize values for SetColumnWidth enum { - wxLIST_AUTOSIZE = -1, // always 80 in wxGLC (what else?) - wxLIST_AUTOSIZE_USEHEADER = -2 + wxLIST_AUTOSIZE = -1, // width of longest item + wxLIST_AUTOSIZE_USEHEADER = -2 // always 80 in wxGLC }; // Flag values for GetItemRect @@ -365,7 +365,7 @@ class WXDLLEXPORT wxListHeaderWindow : public wxWindow wxListMainWindow *m_owner; wxCursor *m_currentCursor; wxCursor *m_resizeCursor; - bool m_isDraging; + bool m_isDragging; int m_column; int m_minX; int m_currentX; @@ -481,6 +481,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow void MoveToFocus( void ); void OnArrowChar( wxListLineData *newCurrent, bool shiftDown ); void OnChar( wxKeyEvent &event ); + void OnKeyDown( wxKeyEvent &event ); void OnSetFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event ); void OnSize( wxSizeEvent &event ); @@ -611,9 +612,9 @@ class WXDLLEXPORT wxListCtrl: public wxControl // We have to hand down a few functions - void SetBackgroundColour( const wxColour &colour ); - void SetForegroundColour( const wxColour &colour ); - void SetFont( const wxFont &font ); + bool SetBackgroundColour( const wxColour &colour ); + bool SetForegroundColour( const wxColour &colour ); + bool SetFont( const wxFont &font ); #if wxUSE_DRAG_AND_DROP void SetDropTarget( wxDropTarget *dropTarget ) @@ -622,14 +623,12 @@ class WXDLLEXPORT wxListCtrl: public wxControl { return m_mainWin->GetDropTarget(); } #endif - void SetCursor( const wxCursor &cursor ) - { if (m_mainWin) m_mainWin->wxWindow::SetCursor( cursor); } + bool SetCursor( const wxCursor &cursor ) + { return m_mainWin ? m_mainWin->wxWindow::SetCursor(cursor) : FALSE; } wxColour GetBackgroundColour() const - { if (m_mainWin) return m_mainWin->GetBackgroundColour(); - else return wxColour(); } + { return m_mainWin ? m_mainWin->GetBackgroundColour() : wxColour(); } wxColour GetForegroundColour() const - { if (m_mainWin) return m_mainWin->GetForegroundColour(); - else return wxColour(); } + { return m_mainWin ? m_mainWin->GetForegroundColour() : wxColour(); } bool PopupMenu( wxMenu *menu, int x, int y ) { return m_mainWin->PopupMenu( menu, x, y ); } void SetFocus()