X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9a0cc4b727ed06da1a776a1b6c4ba66ed4bde3c..f84a986cfc6e512240b77fcdfbacc769b8a0cd02:/include/wx/mac/carbon/listctrl.h diff --git a/include/wx/mac/carbon/listctrl.h b/include/wx/mac/carbon/listctrl.h index 0b62528075..c34868b6ff 100644 --- a/include/wx/mac/carbon/listctrl.h +++ b/include/wx/mac/carbon/listctrl.h @@ -16,6 +16,8 @@ class wxMacDataBrowserListCtrlControl; class wxMacListControl; +class wxListCtrlTextCtrlWrapper; +class wxListCtrlRenameTimer; WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList); @@ -318,6 +320,30 @@ class WXDLLEXPORT wxListCtrl: public wxControl 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 @@ -326,11 +352,17 @@ class WXDLLEXPORT wxListCtrl: public wxControl 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(); @@ -362,6 +394,9 @@ protected: // keep track of inserted/deleted columns int m_count; // for virtual lists, store item count + +private: + DECLARE_EVENT_TABLE() }; #endif