3 * Custom list control, which send "list marked" events when the user right-
4 * click on a item, or double-click on a mark.
6 * Nicolas Boichat, April 2004
10 Copyright (C) 2004 Kern Sibbald and John Walker
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License
14 as published by the Free Software Foundation; either version 2
15 of the License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #include "wx/wxprec.h"
36 #include <wx/listctrl.h>
38 BEGIN_DECLARE_EVENT_TYPES()
39 DECLARE_LOCAL_EVENT_TYPE(wxbLIST_MARKED_EVENT, 1)
40 END_DECLARE_EVENT_TYPES()
42 /* Customized list event, used for marking events */
43 class wxbListMarkedEvent: public wxEvent {
45 wxbListMarkedEvent(int id);
46 ~wxbListMarkedEvent();
47 wxbListMarkedEvent(const wxbListMarkedEvent& te);
48 virtual wxEvent *Clone() const;
52 typedef void (wxEvtHandler::*wxListMarkedEventFunction)(wxbListMarkedEvent&);
54 #define EVT_LIST_MARKED_EVENT(id, fn) \
55 DECLARE_EVENT_TABLE_ENTRY( \
56 wxbLIST_MARKED_EVENT, id, wxID_ANY, \
57 (wxObjectEventFunction)(wxEventFunction)(wxListMarkedEventFunction)&fn, \
61 /* Customized list, which transmit double clicks on images */
62 class wxbListCtrl: public wxListCtrl {
64 wxbListCtrl(wxWindow* parent, wxEvtHandler* handler, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
68 void OnDoubleClicked(wxMouseEvent& event);
69 void OnRightClicked(wxMouseEvent& event);
71 wxEvtHandler* handler;
73 DECLARE_EVENT_TABLE();
76 #endif // WXBTREECTRL_H