-//-----------------------------------------------------------------------------
-// wxListTextCtrl (internal)
-//-----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
-{
- DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
-
- private:
- bool *m_accept;
- wxString *m_res;
- wxListMainWindow *m_owner;
- wxString m_startValue;
-
- public:
- wxListTextCtrl() {};
- wxListTextCtrl( wxWindow *parent, const wxWindowID id,
- bool *accept, wxString *res, wxListMainWindow *owner,
- const wxString &value = "",
- const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
-#if wxUSE_VALIDATORS
-# if defined(__VISAGECPP__)
- int style = 0, const wxValidator* validator = wxDefaultValidator,
-# else
- int style = 0, const wxValidator& validator = wxDefaultValidator,
-# endif
-#endif
- const wxString &name = "wxListTextCtrlText" );
- void OnChar( wxKeyEvent &event );
- void OnKillFocus( wxFocusEvent &event );
-
- DECLARE_EVENT_TABLE()
-};
-
-//-----------------------------------------------------------------------------
-// wxListMainWindow (internal)
-//-----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
-{
- DECLARE_DYNAMIC_CLASS(wxListMainWindow);
-
- public:
- long m_mode;
- wxList m_lines;
- wxList m_columns;
- wxListLineData *m_current;
- wxListLineData *m_currentEdit;
- int m_visibleLines;
- wxBrush *m_hilightBrush;
- wxColour *m_hilightColour;
- int m_xScroll,m_yScroll;
- bool m_dirty;
- wxImageList *m_small_image_list;
- wxImageList *m_normal_image_list;
- int m_small_spacing;
- int m_normal_spacing;
- bool m_hasFocus;
- bool m_usedKeys;
- bool m_lastOnSame;
- wxTimer *m_renameTimer;
- bool m_renameAccept;
- wxString m_renameRes;
- bool m_isCreated;
- int m_dragCount;
- wxPoint m_dragStart;
-
- public:
- wxListMainWindow();
- wxListMainWindow( wxWindow *parent, wxWindowID id,
- const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
- long style = 0, const wxString &name = "listctrl" );
- ~wxListMainWindow();
- void RefreshLine( wxListLineData *line );
- void OnPaint( wxPaintEvent &event );
- void HilightAll( bool on );
- void SendNotify( wxListLineData *line, wxEventType command );
- void FocusLine( wxListLineData *line );
- void UnfocusLine( wxListLineData *line );
- void SelectLine( wxListLineData *line );
- void DeselectLine( wxListLineData *line );
- void DeleteLine( wxListLineData *line );
-
- void EditLabel( long item );
- void Edit( long item ) { EditLabel(item); } // deprecated
- void OnRenameTimer();
- void OnRenameAccept();
-
- void OnMouse( wxMouseEvent &event );
- void MoveToFocus();
- 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 );
-
- void DrawImage( int index, wxDC *dc, int x, int y );
- void GetImageSize( int index, int &width, int &height );
- int GetIndexOfLine( const wxListLineData *line );
- int GetTextLength( wxString &s ); // should be const
-
- void SetImageList( wxImageList *imageList, int which );
- void SetItemSpacing( int spacing, bool isSmall = FALSE );
- int GetItemSpacing( bool isSmall = FALSE );
- void SetColumn( int col, wxListItem &item );
- void SetColumnWidth( int col, int width );
- void GetColumn( int col, wxListItem &item );
- int GetColumnWidth( int vol );
- int GetColumnCount();
- int GetCountPerPage();
- void SetItem( wxListItem &item );
- void GetItem( wxListItem &item );
- void SetItemState( long item, long state, long stateMask );
- int GetItemState( long item, long stateMask );
- int GetItemCount();
- void GetItemRect( long index, wxRect &rect );
- bool GetItemPosition( long item, wxPoint& pos );
- int GetSelectedItemCount();
- void SetMode( long mode );
- long GetMode() const;
- void CalculatePositions();
- void RealizeChanges();
- long GetNextItem( long item, int geometry, int state );
- void DeleteItem( long index );
- void DeleteAllItems();
- void DeleteColumn( int col );
- void DeleteEverything();
- void EnsureVisible( long index );
- long FindItem( long start, const wxString& str, bool partial = FALSE );
- long FindItem( long start, long data);
- long HitTest( int x, int y, int &flags );
- void InsertItem( wxListItem &item );
-// void AddItem( wxListItem &item );
- void InsertColumn( long col, wxListItem &item );
-// void AddColumn( wxListItem &item );
- void SortItems( wxListCtrlCompare fn, long data );
-
- DECLARE_EVENT_TABLE()
-};
-
-//-----------------------------------------------------------------------------
-// wxListCtrl
-//-----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxListCtrl: public wxControl
-{
- DECLARE_DYNAMIC_CLASS(wxListCtrl);
-
- public:
- wxListCtrl();
- wxListCtrl( wxWindow *parent, wxWindowID id = -1,
- const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
-#if wxUSE_VALIDATORS
-# if defined(__VISAGECPP__)
- long style = wxLC_ICON, const wxValidator* validator = wxDefaultValidator,
-# else
- long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
-# endif
-#endif
- const wxString &name = "listctrl" )