]>
Commit | Line | Data |
---|---|---|
ffecfa5a JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/palmos/listctrl.cpp | |
3 | // Purpose: wxListCtrl | |
4 | // Author: William Osborne | |
5 | // Modified by: | |
6 | // Created: 10/13/04 | |
7 | // RCS-ID: $Id: | |
8 | // Copyright: (c) William Osborne | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
21 | #pragma implementation "listctrl.h" | |
22 | #pragma implementation "listctrlbase.h" | |
23 | #endif | |
24 | ||
25 | // For compilers that support precompilation, includes "wx.h". | |
26 | #include "wx/wxprec.h" | |
27 | ||
28 | #ifdef __BORLANDC__ | |
29 | #pragma hdrstop | |
30 | #endif | |
31 | ||
32 | #if wxUSE_LISTCTRL && defined(__WIN95__) | |
33 | ||
34 | #ifndef WX_PRECOMP | |
35 | #include "wx/app.h" | |
36 | #include "wx/intl.h" | |
37 | #include "wx/log.h" | |
38 | #include "wx/settings.h" | |
39 | #endif | |
40 | ||
41 | #include "wx/textctrl.h" | |
42 | #include "wx/imaglist.h" | |
43 | #include "wx/listctrl.h" | |
44 | #include "wx/dcclient.h" | |
45 | ||
46 | #include "wx/palmos/private.h" | |
47 | ||
48 | #include "wx/palmos/wrapcctl.h" | |
49 | ||
50 | // ---------------------------------------------------------------------------- | |
51 | // private functions | |
52 | // ---------------------------------------------------------------------------- | |
53 | ||
54 | // ---------------------------------------------------------------------------- | |
55 | // private helper classes | |
56 | // ---------------------------------------------------------------------------- | |
57 | ||
58 | // ---------------------------------------------------------------------------- | |
59 | // events | |
60 | // ---------------------------------------------------------------------------- | |
61 | ||
62 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG) | |
63 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG) | |
64 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT) | |
65 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT) | |
66 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM) | |
67 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS) | |
68 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO) | |
69 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO) | |
70 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED) | |
71 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED) | |
72 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN) | |
73 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM) | |
74 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK) | |
75 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK) | |
76 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG) | |
77 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_DRAGGING) | |
78 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_END_DRAG) | |
79 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK) | |
80 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK) | |
81 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED) | |
82 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_FOCUSED) | |
83 | DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT) | |
84 | ||
85 | #if wxUSE_EXTENDED_RTTI | |
86 | WX_DEFINE_FLAGS( wxListCtrlStyle ) | |
87 | ||
88 | wxBEGIN_FLAGS( wxListCtrlStyle ) | |
89 | // new style border flags, we put them first to | |
90 | // use them for streaming out | |
91 | wxFLAGS_MEMBER(wxBORDER_SIMPLE) | |
92 | wxFLAGS_MEMBER(wxBORDER_SUNKEN) | |
93 | wxFLAGS_MEMBER(wxBORDER_DOUBLE) | |
94 | wxFLAGS_MEMBER(wxBORDER_RAISED) | |
95 | wxFLAGS_MEMBER(wxBORDER_STATIC) | |
96 | wxFLAGS_MEMBER(wxBORDER_NONE) | |
97 | ||
98 | // old style border flags | |
99 | wxFLAGS_MEMBER(wxSIMPLE_BORDER) | |
100 | wxFLAGS_MEMBER(wxSUNKEN_BORDER) | |
101 | wxFLAGS_MEMBER(wxDOUBLE_BORDER) | |
102 | wxFLAGS_MEMBER(wxRAISED_BORDER) | |
103 | wxFLAGS_MEMBER(wxSTATIC_BORDER) | |
104 | wxFLAGS_MEMBER(wxBORDER) | |
105 | ||
106 | // standard window styles | |
107 | wxFLAGS_MEMBER(wxTAB_TRAVERSAL) | |
108 | wxFLAGS_MEMBER(wxCLIP_CHILDREN) | |
109 | wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) | |
110 | wxFLAGS_MEMBER(wxWANTS_CHARS) | |
111 | wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) | |
112 | wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) | |
113 | wxFLAGS_MEMBER(wxVSCROLL) | |
114 | wxFLAGS_MEMBER(wxHSCROLL) | |
115 | ||
116 | wxFLAGS_MEMBER(wxLC_LIST) | |
117 | wxFLAGS_MEMBER(wxLC_REPORT) | |
118 | wxFLAGS_MEMBER(wxLC_ICON) | |
119 | wxFLAGS_MEMBER(wxLC_SMALL_ICON) | |
120 | wxFLAGS_MEMBER(wxLC_ALIGN_TOP) | |
121 | wxFLAGS_MEMBER(wxLC_ALIGN_LEFT) | |
122 | wxFLAGS_MEMBER(wxLC_AUTOARRANGE) | |
123 | wxFLAGS_MEMBER(wxLC_USER_TEXT) | |
124 | wxFLAGS_MEMBER(wxLC_EDIT_LABELS) | |
125 | wxFLAGS_MEMBER(wxLC_NO_HEADER) | |
126 | wxFLAGS_MEMBER(wxLC_SINGLE_SEL) | |
127 | wxFLAGS_MEMBER(wxLC_SORT_ASCENDING) | |
128 | wxFLAGS_MEMBER(wxLC_SORT_DESCENDING) | |
129 | wxFLAGS_MEMBER(wxLC_VIRTUAL) | |
130 | ||
131 | wxEND_FLAGS( wxListCtrlStyle ) | |
132 | ||
133 | IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h") | |
134 | ||
135 | wxBEGIN_PROPERTIES_TABLE(wxListCtrl) | |
136 | wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) | |
137 | ||
138 | wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style | |
139 | wxEND_PROPERTIES_TABLE() | |
140 | ||
141 | wxBEGIN_HANDLERS_TABLE(wxListCtrl) | |
142 | wxEND_HANDLERS_TABLE() | |
143 | ||
144 | wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) | |
145 | ||
146 | /* | |
147 | Content-type: text/html ]>