mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
Data Structures | Macros | Typedefs | Enumerations | Variables
mItemView

Data Structures

struct  NCS_CB_ITEMOPS
 The structure of NCS_CB_ITEMOPS. The Item operations interface. More...
 
struct  mItemView
 The structure of mItemView control, which derived from mScrollWidget. It is the abstract superclass of all classes which represent controls that have items. More...
 
struct  mItemViewClass
 The virtual function table of mItemView, which derived from mScrollWidgetClass. More...
 
struct  mItemViewRenderer
 The structure of mItemView renderer, which inheried from mScrollWidgetRenderer. More...
 

Macros

#define NCSCTRL_ITEMVIEW   NCSCLASSNAME("itemview")
 The name of mItemView control. More...
 
#define NCSS_ITEMV_AUTOSORT   (0x0002<<NCSS_SWGT_SHIFT)
 Sort items automatically. More...
 
#define NCSS_ITEMV_LOOP   (0x0004<<NCSS_SWGT_SHIFT)
 Travel all items circularly. More...
 
#define NCSS_ITEMV_SINGLE   (0x0000<<NCSS_SWGT_SHIFT)
 Only have a selected item simultaneously. More...
 
#define NCSS_ITEMV_MULTIPLE   (0x0008<<NCSS_SWGT_SHIFT)
 Allow user to select multiple items. Reserved. More...
 
#define NCSS_ITEMV_SHIFT   (NCSS_SWGT_SHIFT+4)
 The bits used by mItemView in style. More...
 

Typedefs

typedef int(* NCS_CB_INITITEM) (mItemView *self, HITEM hItem)
 The callback of initializing item. More...
 
typedef void(* NCS_CB_DSTRITEM) (mItemView *self, HITEM hItem)
 The callback of destroying item. More...
 
typedef void(* NCS_CB_DRAWITEM) (mItemView *self, HITEM hItem, HDC hdc, RECT *rcDraw)
 The callback of drawing item. More...
 

Enumerations

enum  mItemViewProp { NCSP_ITEMV_DEFITEMHEIGHT = NCSP_SWGT_MAX + 1, NCSP_ITEMV_ITEMCOUNT, NCSP_ITEMV_MAX }
 The properties id of mItemView. More...
 
enum  mItemViewNotify {
  NCSN_ITEMV_CLICKED = NCSN_WIDGET_CLICKED, NCSN_ITEMV_SELCHANGING = NCSN_SWGT_MAX + 1, NCSN_ITEMV_SELCHANGED, NCSN_ITEMV_ENTER,
  NCSN_ITEMV_SETFOCUS, NCSN_ITEMV_KILLFOCUS, NCSN_ITEMV_MAX
}
 The notification code id of mItemView. More...
 

Variables

MGNCS_EXPORT mItemViewClass g_stmItemViewCls
 The instance of mItemViewClass. More...
 

Detailed Description

Macro Definition Documentation

◆ NCSCTRL_ITEMVIEW

#define NCSCTRL_ITEMVIEW   NCSCLASSNAME("itemview")

The name of mItemView control.

Definition at line 71 of file mitemview.h.

◆ NCSS_ITEMV_AUTOSORT

#define NCSS_ITEMV_AUTOSORT   (0x0002<<NCSS_SWGT_SHIFT)

Sort items automatically.

Definition at line 119 of file mitemview.h.

◆ NCSS_ITEMV_LOOP

#define NCSS_ITEMV_LOOP   (0x0004<<NCSS_SWGT_SHIFT)

Travel all items circularly.

Definition at line 125 of file mitemview.h.

◆ NCSS_ITEMV_MULTIPLE

#define NCSS_ITEMV_MULTIPLE   (0x0008<<NCSS_SWGT_SHIFT)

Allow user to select multiple items. Reserved.

Definition at line 137 of file mitemview.h.

◆ NCSS_ITEMV_SHIFT

#define NCSS_ITEMV_SHIFT   (NCSS_SWGT_SHIFT+4)

The bits used by mItemView in style.

Definition at line 143 of file mitemview.h.

◆ NCSS_ITEMV_SINGLE

#define NCSS_ITEMV_SINGLE   (0x0000<<NCSS_SWGT_SHIFT)

Only have a selected item simultaneously.

Definition at line 131 of file mitemview.h.

Typedef Documentation

◆ NCS_CB_DRAWITEM

typedef void(* NCS_CB_DRAWITEM)(mItemView *self, HITEM hItem, HDC hdc, RECT *rcDraw)

The callback of drawing item.

Definition at line 93 of file mitemview.h.

◆ NCS_CB_DSTRITEM

typedef void(* NCS_CB_DSTRITEM)(mItemView *self, HITEM hItem)

The callback of destroying item.

Definition at line 87 of file mitemview.h.

◆ NCS_CB_INITITEM

typedef int(* NCS_CB_INITITEM)(mItemView *self, HITEM hItem)

The callback of initializing item.

Definition at line 81 of file mitemview.h.

Enumeration Type Documentation

◆ mItemViewNotify

The notification code id of mItemView.

Enumerator
NCSN_ITEMV_CLICKED 

Mouse click.

NCSN_ITEMV_SELCHANGING 

Changing selected item.

NCSN_ITEMV_SELCHANGED 

Selected item changed.

NCSN_ITEMV_ENTER 

ENTER pressed.

NCSN_ITEMV_SETFOCUS 

Get focus.

NCSN_ITEMV_KILLFOCUS 

Lost focus.

NCSN_ITEMV_MAX 

The maximum value of mItemView notification code id.

Definition at line 581 of file mitemview.h.

◆ mItemViewProp

The properties id of mItemView.

Enumerator
NCSP_ITEMV_DEFITEMHEIGHT 

The default item height.

NCSP_ITEMV_ITEMCOUNT 

The number of items.

NCSP_ITEMV_MAX 

The maximum value of mItemView properties id.

Definition at line 560 of file mitemview.h.

Variable Documentation

◆ g_stmItemViewCls

g_stmItemViewCls

The instance of mItemViewClass.

See also
mItemViewClass