mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
Macros | Enumerations | Functions
mtoolitem.h File Reference

Go to the source code of this file.

Macros

#define NCS_TOOLITEM_FLAG_TEXT_LEFT   0x01
 indicate that create a tool item whoes text at left. default is in the right More...
 
#define NCS_TOOLITEM_FLAG_TEXT_UP   NCS_TOOLITEM_FLAG_TEXT_LEFT
 indicate that create a tool item whoes text at up More...
 
#define NCS_TOOLITEM_FLAG_VERT   0x02
 indicate that create a tool item whoes text and image arranged vertically More...
 
#define NCS_TOOLITEM_UNCHECKED   0x00
 tool item state unckecked More...
 
#define NCS_TOOLITEM_CHECKED   0x01
 tool item state checked More...
 

Enumerations

Functions

MGNCS_EXPORT mToolImage * ncsNewToolImage (PBITMAP pbmp, int cell_count, BOOL autoUnload, BOOL bVert)
 create a tool image for tool item More...
 
MGNCS_EXPORT mToolImage * ncsNewToolImageFromFile (const char *fileName, int cell_count, BOOL autoUnload, BOOL bVert)
 create a tool image from file, More...
 
MGNCS_EXPORT void ncsFreeToolImage (mToolImage *mti)
 free the toolimage More...
 
MGNCS_EXPORT BOOL ncsDrawToolImageCell (mToolImage *mti, HDC hdc, int idx, const RECT *prc)
 draw a sub image from toolimage to hdc More...
 
MGNCS_EXPORT void * ncsCreatePushToolItem (int id, mToolImage *img, const char *str, UINT flags)
 create push tool item. a push tool item like a push button More...
 
MGNCS_EXPORT BOOL ncsInitToolItems (void)
 initialize tool items More...
 
MGNCS_EXPORT void * ncsCreateMenuToolItem (int id, mToolImage *img, const char *str, UINT flags, mPopMenuMgr *menu)
 create mnue tool item, like a mMenuButton More...
 
MGNCS_EXPORT void * ncsCreateCheckToolItem (int id, mToolImage *img, const char *str, UINT flags, int state)
 create a check able tool item, like mCheckButton More...
 
MGNCS_EXPORT void * ncsCreateRadioToolItem (int id, mToolImage *img, const char *str, UINT flags)
 create a check able tool item, like mRadioButton More...
 
MGNCS_EXPORT void * ncsCreateWidgetToolItem (mWidget *widget)
 create a toolitem which include a mWidget object More...
 
MGNCS_EXPORT void * ncsCreateSeparatorItem (void)
 create separator item More...
 
MGNCS_EXPORT int ncsGetToolItemType (void *toolitem)
 get the type of item More...
 
MGNCS_EXPORT BOOL ncsIsPushToolItem (void *toolitem)
 check the toolitem is push item or not More...
 
MGNCS_EXPORT BOOL ncsIsMenuToolItem (void *toolitem)
 check the toolitem is menu tool item or not More...
 
MGNCS_EXPORT BOOL ncsIsSeparatorToolItem (void *toolitem)
 check the toolitem is separator tool item or not More...
 
MGNCS_EXPORT BOOL ncsIsWidgetToolItem (void *toolitem)
 check the toolitem is widget tool item or not More...
 
MGNCS_EXPORT int ncsToolItem_getId (void *self)
 get the id of toolitem More...
 
MGNCS_EXPORT int ncsToolItem_setId (void *self, int id)
 get the id of toolitem More...
 
MGNCS_EXPORT BOOL ncsToolItem_setCheck (void *self, int check_state)
 set the check state of toolitem More...
 
MGNCS_EXPORT int ncsToolItem_getCheck (void *self)
 get the check state of toolitem More...
 
MGNCS_EXPORT BOOL ncsToolItem_showMenu (void *self, mObject *owner)
 show the menu of MenuToolItem More...
 
MGNCS_EXPORT mObjectncsNewToolItem (int id, mObjectClass *_class, DWORD param)
 new a tool item object More...
 
MGNCS_EXPORT void ncsFreeToolItem (mObject *obj)
 free the tool item object More...
 

Detailed Description

Author
Date
   This file is part of mGNCS, a component for MiniGUI.

   Copyright (C) 2008~2018, Beijing FMSoft Technologies Co., Ltd.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

   Or,

   As this program is a library, any link to this program must follow
   GNU General Public License version 3 (GPLv3). If you cannot accept
   GPLv3, you need to be licensed from FMSoft.

   If you have got a commercial license of this program, please use it
   under the terms and conditions of the commercial license.

   For more information about the commercial license, please refer to
   <http://www.minigui.com/en/about/licensing-policy/>.

Definition in file mtoolitem.h.