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

Data Structures

struct  mButton
 Button class, derived from mWidget. More...
 
struct  mButtonClass
 button struct of button control, derived from mWidgetClass More...
 
struct  mButtonRenderer
 Button class renderer interface, derived from mWidgetRenderer. More...
 

Macros

#define NCSCTRL_BUTTON   NCSCLASSNAME("button")
 the name of button control More...
 
#define NCSS_BUTTON_IMAGE   (1<<NCSS_WIDGET_SHIFT)
 indicate a image button More...
 
#define NCSS_BUTTON_CHECKABLE   (2<<NCSS_WIDGET_SHIFT)
 indicate a chackable button More...
 
#define NCSS_BUTTON_AUTOCHECK   (4<<NCSS_WIDGET_SHIFT)
 indicate a auto check button More...
 
#define NCSS_BUTTON_3DCHECK   (8<<NCSS_WIDGET_SHIFT)
 indicate a three type (unchecked-halfchekced-checked) check button More...
 
#define NCSS_BUTTON_IMAGELABEL   (0x10<<NCSS_WIDGET_SHIFT)
 indicate a button with image and label More...
 
#define NCSS_BUTTON_VERTIMAGELABEL   (0x20<<NCSS_WIDGET_SHIFT)
 indicate a button with vertical image and label More...
 

Enumerations

Variables

MGNCS_EXPORT mButtonClass g_stmButtonCls
 global mButtonClass More...
 

Detailed Description

Macro Definition Documentation

#define NCSCTRL_BUTTON   NCSCLASSNAME("button")

the name of button control

Definition at line 58 of file mbutton.h.

#define NCSS_BUTTON_3DCHECK   (8<<NCSS_WIDGET_SHIFT)

indicate a three type (unchecked-halfchekced-checked) check button

Note
This style must combine with NCSS_BUTTON_3DCHECK

Definition at line 285 of file mbutton.h.

#define NCSS_BUTTON_AUTOCHECK   (4<<NCSS_WIDGET_SHIFT)

indicate a auto check button

Note
This style must combine with NCSS_BUTTON_CHECKABLE

Definition at line 279 of file mbutton.h.

#define NCSS_BUTTON_CHECKABLE   (2<<NCSS_WIDGET_SHIFT)

indicate a chackable button

Definition at line 273 of file mbutton.h.

#define NCSS_BUTTON_IMAGE   (1<<NCSS_WIDGET_SHIFT)

indicate a image button

Definition at line 268 of file mbutton.h.

#define NCSS_BUTTON_IMAGELABEL   (0x10<<NCSS_WIDGET_SHIFT)

indicate a button with image and label

Note
by default, image and label are lined up horizontal

Definition at line 291 of file mbutton.h.

#define NCSS_BUTTON_VERTIMAGELABEL   (0x20<<NCSS_WIDGET_SHIFT)

indicate a button with vertical image and label

Note
This sytle must combine with NCSS_BUTTON_IMAGELABEL

Definition at line 297 of file mbutton.h.

Enumeration Type Documentation

the notification code of mButton

Enumerator
NCSN_BUTTON_PUSHED 

button pushed

NCSN_BUTTON_STATE_CHANGED 

button check state changed

Parameters
thenew check state
See also
NCSP_BUTTON_CHECKSTATE

Definition at line 248 of file mbutton.h.

define the check state of button

Enumerator
NCS_BUTTON_UNCHECKED 

button unchecked state, the button is not pushed down

NCS_BUTTON_HALFCHECKED 

button halfchecked state, it is a state between checked and unchecked, halfchecked state is valid if the button is a 3-state button

NCS_BUTTON_CHECKED 

button checked state, the button is pushed down

Definition at line 69 of file mbutton.h.

the properties id of mButton

Enumerator
NCSP_BUTTON_ALIGN 

Set the button text horizontal align.

  • Type enumNCSAlign
  • Read Write
  • set the horizontal align value of the text on button
NCSP_BUTTON_VALIGN 

Set the button text vertical align.

  • Type enumNCSVAlign
  • Read Write
  • set the vertical align value of the text on button
NCSP_BUTTON_WORDWRAP 

Set the button text to autowrap mode.

  • Type int
  • Read Write
  • turn on/off the autowrap mode of button text
NCSP_BUTTON_IMAGE 

Set the button image pointer.

  • Type PBITMAP
  • Read Write
  • Set the image pointer for the image displayed on button
NCSP_BUTTON_CHECKSTATE 

Set the check state of button.

  • Type mButtonCheckState
  • Read Write
  • set the check state of button to checked/half-checked/unchecked
NCSP_BUTTON_IMAGE_SIZE_PERCENT 

Set the image size.

  • Type int
  • Read Write
  • Set the image size percent on button, it should be >=15 and <=85, this property works when the button has NCSS_BUTTON_IMAGELABEL style
NCSP_BUTTON_GROUPID 

Set the button group id.

  • Type int
  • Read Write
  • Set the the button group id
NCSP_BUTTON_GROUP 

Set the button group.

  • Type mButtonGroup*
  • Read Write
  • Set the button group pointer

Definition at line 175 of file mbutton.h.

Variable Documentation

g_stmButtonCls

global mButtonClass

global mStaticClass