Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for virtual ListCtrl, and a few other unwrapped ListCtrl …

…methods.

Added methods: listCtrlGetItemFont, listCtrlIsVirtual, listCtrlRefreshItem, listCtrlRefreshItems.
Added constants: wxLC_VIRTUAL, wxLC_MASK_TYPE, wxLC_MASK_ALIGN, wxLC_MASK_SORT.
Removed deprecated constant wxLC_USER_TEXT.
  • Loading branch information...
commit b5d1029b272460d729950d751d90da76df56b5dc 1 parent f225d0c
Jeremy O'Donoghue authored
25 wxc/src/cpp/eljlistctrl.cpp
View
@@ -25,6 +25,7 @@ EWXWEXPORT(void,wxListItem_Delete)(wxListItem* self)
{
delete self;
}
+
EWXWEXPORT(void,wxListItem_Clear)(wxListItem* self)
{
self->Clear();
@@ -483,5 +484,27 @@ EWXWEXPORT(void,wxListCtrl_UpdateStyle)(wxListCtrl* self)
self->UpdateStyle();
#endif
}
-
+
+EWXWEXPORT(wxFont*,wxListCtrl_GetItemFont)(wxListCtrl* self, long item)
+{
+ wxFont* fnt = new wxFont;
+ *fnt = self->GetItemFont(item);
+ return fnt;
+}
+
+EWXWEXPORT(bool,wxListCtrl_IsVirtual)(wxListCtrl* self)
+{
+ return self->IsVirtual();
+}
+
+EWXWEXPORT(void,wxListCtrl_RefreshItem)(wxListCtrl* self, long item)
+{
+ self->RefreshItem(item);
+}
+
+EWXWEXPORT(void,wxListCtrl_RefreshItems)(wxListCtrl* self, long from, long to)
+{
+ self->RefreshItems(from, to);
+}
+
}
3  wxc/src/include/wxc_glue.h
View
@@ -3067,6 +3067,7 @@ TClass(wxImageList) wxListCtrl_GetImageList( TSelf(wxListCtrl) _obj, int which )
TBool wxListCtrl_GetItem( TSelf(wxListCtrl) _obj, TClass(wxListItem) info );
int wxListCtrl_GetItemCount( TSelf(wxListCtrl) _obj );
int wxListCtrl_GetItemData( TSelf(wxListCtrl) _obj, int item );
+TClass(wxFont) wxListCtrl_GetItemFont( TSelf(wxListCtrl) _obj, long item);
TClass(wxPoint) wxListCtrl_GetItemPosition( TSelf(wxListCtrl) _obj, int item );
TClass(wxRect) wxListCtrl_GetItemRect( TSelf(wxListCtrl) _obj, int item, int code );
TClass(wxSize) wxListCtrl_GetItemSpacing( TSelf(wxListCtrl) _obj, TBool isSmall );
@@ -3083,6 +3084,8 @@ int wxListCtrl_InsertItem( TSelf(wxListCtrl) _obj, TClass(wxListItem) inf
int wxListCtrl_InsertItemWithData( TSelf(wxListCtrl) _obj, int index, TClass(wxString) label );
int wxListCtrl_InsertItemWithImage( TSelf(wxListCtrl) _obj, int index, int imageIndex );
int wxListCtrl_InsertItemWithLabel( TSelf(wxListCtrl) _obj, int index, TClass(wxString) label, int imageIndex );
+TBool wxListCtrl_IsVirtual( TSelf(wxListCtrl) _obj );
+void wxListCtrl_RefreshItem( TSelf(wxListCtrl) _obj, long item );
TBool wxListCtrl_ScrollList( TSelf(wxListCtrl) _obj, TVector(dx,dy) );
void wxListCtrl_SetBackgroundColour( TSelf(wxListCtrl) _obj, TClass(wxColour) col );
TBool wxListCtrl_SetColumn( TSelf(wxListCtrl) _obj, int col, TClass(wxListItem) item );
2  wxc/wxc.cabal
View
@@ -1,5 +1,5 @@
name: wxc
-version: 0.90.0.3
+version: 0.90.0.4
license: OtherLicense
license-file: LICENSE
maintainer: wxhaskell-devel@lists.sourceforge.net
31 wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
View
@@ -91,8 +91,6 @@ module Graphics.UI.WXCore.WxcDefs
,wxSTREAM_WRITE_ERROR
,wxSTREAM_READ_ERROR
,wxNB_MULTILINE
- ,wxLC_VRULES
- ,wxLC_HRULES
,wxIMAGE_LIST_NORMAL
,wxIMAGE_LIST_SMALL
,wxIMAGE_LIST_STATE
@@ -337,6 +335,8 @@ module Graphics.UI.WXCore.WxcDefs
,wxBU_TOP
,wxBU_RIGHT
,wxBU_BOTTOM
+ ,wxLC_VRULES
+ ,wxLC_HRULES
,wxLC_ICON
,wxLC_SMALL_ICON
,wxLC_LIST
@@ -344,13 +344,16 @@ module Graphics.UI.WXCore.WxcDefs
,wxLC_ALIGN_TOP
,wxLC_ALIGN_LEFT
,wxLC_AUTOARRANGE
- ,wxLC_USER_TEXT
+ ,wxLC_VIRTUAL
,wxLC_EDIT_LABELS
,wxLC_NO_HEADER
,wxLC_NO_SORT_HEADER
,wxLC_SINGLE_SEL
,wxLC_SORT_ASCENDING
,wxLC_SORT_DESCENDING
+ ,wxLC_MASK_TYPE
+ ,wxLC_MASK_ALIGN
+ ,wxLC_MASK_SORT
,wxSP_ARROW_KEYS
,wxSP_WRAP
,wxSP_NOBORDER
@@ -2484,6 +2487,8 @@ module Graphics.UI.WXCore.WxcDefs
,wxSTC_CMD_WORDRIGHTENDEXTEND
) where
+import Data.Bits
+
-- | A flag can be combined with other flags to a bit mask.
type BitFlag = Int
@@ -2679,12 +2684,6 @@ wxSTREAM_READ_ERROR = 3
wxNB_MULTILINE :: Int
wxNB_MULTILINE = 256
-wxLC_VRULES :: Int
-wxLC_VRULES = 1
-
-wxLC_HRULES :: Int
-wxLC_HRULES = 2
-
wxIMAGE_LIST_NORMAL :: Int
wxIMAGE_LIST_NORMAL = 0
@@ -3417,6 +3416,12 @@ wxBU_RIGHT = 256
wxBU_BOTTOM :: Int
wxBU_BOTTOM = 512
+wxLC_VRULES :: Int
+wxLC_VRULES = 1
+
+wxLC_HRULES :: Int
+wxLC_HRULES = 2
+
wxLC_ICON :: Int
wxLC_ICON = 4
@@ -3438,8 +3443,8 @@ wxLC_ALIGN_LEFT = 128
wxLC_AUTOARRANGE :: Int
wxLC_AUTOARRANGE = 256
-wxLC_USER_TEXT :: Int
-wxLC_USER_TEXT = 512
+wxLC_VIRTUAL :: Int
+wxLC_VIRTUAL = 512
wxLC_EDIT_LABELS :: Int
wxLC_EDIT_LABELS = 1024
@@ -3459,6 +3464,10 @@ wxLC_SORT_ASCENDING = 16384
wxLC_SORT_DESCENDING :: Int
wxLC_SORT_DESCENDING = 32768
+wxLC_MASK_TYPE = wxLC_ICON .|. wxLC_SMALL_ICON .|. wxLC_LIST .|. wxLC_REPORT
+wxLC_MASK_ALIGN = wxLC_ALIGN_TOP .|. wxLC_ALIGN_LEFT
+wxLC_MASK_SORT = wxLC_SORT_ASCENDING .|. wxLC_SORT_DESCENDING
+
wxSP_ARROW_KEYS :: Int
wxSP_ARROW_KEYS = 4096
4 wxcore/wxcore.cabal
View
@@ -1,5 +1,5 @@
name: wxcore
-version: 0.90.0.1
+version: 0.90.0.2
license: OtherLicense
license-file: LICENSE
author: Daan Leijen
@@ -71,7 +71,7 @@ library
filepath,
parsec,
stm,
- wxc >= 0.90,
+ wxc >= 0.90.0.4,
wxdirect >= 0.90,
directory,
time
Please sign in to comment.
Something went wrong with that request. Please try again.