class wxMacDataBrowserListCtrlControl;
class wxMacListControl;
+class wxListCtrlTextCtrlWrapper;
+class wxListCtrlRenameTimer;
WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList);
virtual bool SetBackgroundColour(const wxColour& colour);
virtual wxColour GetBackgroundColour();
+ // functions for editing/timer
+ void OnRenameTimer();
+ bool OnRenameAccept(long itemEdit, const wxString& value);
+ void OnRenameCancelled(long itemEdit);
+
+ void ChangeCurrent(long current);
+ void ResetCurrent() { ChangeCurrent((long)-1); }
+ bool HasCurrent() const { return m_current != (long)-1; }
+
+ void OnLeftDown(wxMouseEvent& event);
+ void OnDblClick(wxMouseEvent& event);
+
+ void FinishEditing(wxTextCtrl *text)
+ {
+ delete text;
+ m_textctrlWrapper = NULL;
+ SetFocus();
+ }
+
+ virtual int GetScrollPos(int orient) const;
+
+ virtual void SetDropTarget( wxDropTarget *dropTarget );
+ virtual wxDropTarget* GetDropTarget() const;
+
// with CG, we need to get the context from an kEventControlDraw event
// unfortunately, the DataBrowser callbacks don't provide the context
// and we need it, so we need to set/remove it before and after draw
void* MacGetDrawingContext() { return m_cgContext; }
protected:
+
// protected overrides needed for pimpl approach
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
+ virtual wxSize DoGetBestSize() const;
+
+ long m_current;
+ wxListCtrlTextCtrlWrapper *m_textctrlWrapper;
+ wxListCtrlRenameTimer *m_renameTimer;
// common part of all ctors
void Init();
// keep track of inserted/deleted columns
int m_count; // for virtual lists, store item count
+
+private:
+ DECLARE_EVENT_TABLE()
};
#endif