mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
initical commit
This commit is contained in:
27
include/ctrl/Makefile.am
Normal file
27
include/ctrl/Makefile.am
Normal file
@@ -0,0 +1,27 @@
|
||||
libminiguiincludedir = $(includedir)/minigui/ctrl
|
||||
|
||||
libminiguiinclude_HEADERS= \
|
||||
ctrlhelper.h \
|
||||
static.h \
|
||||
button.h \
|
||||
edit.h \
|
||||
combobox.h \
|
||||
progressbar.h \
|
||||
menubutton.h \
|
||||
newtoolbar.h \
|
||||
propsheet.h \
|
||||
listbox.h \
|
||||
scrollview.h \
|
||||
trackbar.h \
|
||||
textedit.h \
|
||||
spinbox.h \
|
||||
monthcal.h \
|
||||
coolbar.h \
|
||||
listview.h \
|
||||
treeview.h \
|
||||
gridview.h \
|
||||
iconview.h \
|
||||
animation.h \
|
||||
scrollbar.h
|
||||
|
||||
EXTRA_DIST=makefile.ng makefile.msvc
|
||||
349
include/ctrl/animation.h
Normal file
349
include/ctrl/animation.h
Normal file
@@ -0,0 +1,349 @@
|
||||
/**
|
||||
* \file animation.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2002/01/06
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software
|
||||
Copyright (C) 1998-2002 Wei Yongming
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: animation.h 10865 2008-08-27 06:52:22Z wangjian $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1998-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef EXT_ANIMATION_H
|
||||
#define EXT_ANIMATION_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_animation ANIMATION control and animation GIF (GIF87a/GIF89a) support
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Animation frame structure. */
|
||||
typedef struct _ANIMATIONFRAME
|
||||
{
|
||||
/** The disposal method (from GIF89a specification):
|
||||
* Indicates the way in which the graphic is to be treated after being displayed.
|
||||
* - 0\n No disposal specified. The decoder is not required to take any action.
|
||||
* - 1\n Do not dispose. The graphic is to be left in place.
|
||||
* - 2\n Restore to background color. The area used by the frame must be restored to
|
||||
* the background color.
|
||||
* - 3\n Restore to previous. The decoder is required to restore the area overwritten by
|
||||
* the frmae with what was there prior to rendering the frame.
|
||||
*/
|
||||
int disposal;
|
||||
/** The x-coordinate of top-left corner of the frame in whole animation screen. */
|
||||
int off_x;
|
||||
/** The y-coordinate of top-left corner of the frame in whole animation screen. */
|
||||
int off_y;
|
||||
/** The width of the frame. */
|
||||
unsigned int width;
|
||||
/** The height of the frame. */
|
||||
unsigned int height;
|
||||
|
||||
/** The time of the frame will be display, in the unit of animation time_unit. */
|
||||
unsigned int delay_time;
|
||||
/** The memdc compatible with the gif image. */
|
||||
HDC mem_dc;
|
||||
/** The bits of the mem_dc, should be freed after deleting the mem_dc. */
|
||||
Uint8* bits;
|
||||
|
||||
/** The next frame */
|
||||
struct _ANIMATIONFRAME* next;
|
||||
/** The previous frame */
|
||||
struct _ANIMATIONFRAME* prev;
|
||||
} ANIMATIONFRAME;
|
||||
|
||||
/** Animation structure */
|
||||
typedef struct _ANIMATION
|
||||
{
|
||||
/** The width of the animation. */
|
||||
unsigned int width;
|
||||
/** The height of the animation. */
|
||||
unsigned int height;
|
||||
|
||||
/** The background color */
|
||||
RGB bk;
|
||||
|
||||
/** The number of all frames. */
|
||||
int nr_frames;
|
||||
/**
|
||||
* The unit of the time will be used count the delay time of every frame.
|
||||
* The default is 1, equal to 10ms.
|
||||
*/
|
||||
int time_unit;
|
||||
/** Pointer to the animation frame.*/
|
||||
ANIMATIONFRAME* frames;
|
||||
} ANIMATION;
|
||||
|
||||
/**
|
||||
* \fn ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
|
||||
* \brief Creates an ANIMATION obeject from a GIF 89a data source.
|
||||
*
|
||||
* This function load a GIF 89a graphic from the data source \a area,
|
||||
* and create an ANIMATION object from the GIF 89a data.
|
||||
*
|
||||
* \param hdc The dc will be used to create BITMAP object for the animation frame.
|
||||
* \param area The data source.
|
||||
*
|
||||
* \return This function returns an ANIMATION object when success, otherwise NULL.
|
||||
*
|
||||
* \sa DestroyAnimation, ANIMATION
|
||||
*/
|
||||
ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area);
|
||||
|
||||
/**
|
||||
* \fn ANIMATION* CreateAnimationFromGIF89aFile (HDC hdc, const char* file)
|
||||
* \brief Creates an ANIMATION obeject from a GIF 89a file.
|
||||
*
|
||||
* This function load a GIF 89a graphic from the file \a file,
|
||||
* and create an ANIMATION object.
|
||||
*
|
||||
* \param hdc The dc will be used to create BITMAP object for the animation frame.
|
||||
* \param file The file name.
|
||||
*
|
||||
* \return This function returns an ANIMATION object when success, otherwise NULL.
|
||||
*
|
||||
* \sa DestroyAnimation, ANIMATION
|
||||
*/
|
||||
MG_EXPORT ANIMATION* CreateAnimationFromGIF89aFile (HDC hdc, const char* file);
|
||||
|
||||
/**
|
||||
* \fn ANIMATION* CreateAnimationFromGIF89aMem (HDC hdc, const void* mem, int size)
|
||||
* \brief Creates an ANIMATION obeject from a GIF 89a memory data.
|
||||
*
|
||||
* This function load a GIF 89a graphic from the memory \a mem which
|
||||
* is \a size long and create an ANIMATION object from the GIF 89a data.
|
||||
*
|
||||
* \param hdc The dc will be used to create BITMAP object for the animation frame.
|
||||
* \param mem The pointer to the memory.
|
||||
* \param size The size of the memory.
|
||||
*
|
||||
* \return This function returns an ANIMATION object when success, otherwise NULL.
|
||||
*
|
||||
* \sa DestroyAnimation, ANIMATION
|
||||
*/
|
||||
MG_EXPORT ANIMATION* CreateAnimationFromGIF89aMem (HDC hdc, const void* mem, int size);
|
||||
|
||||
/**
|
||||
* \fn void DestroyAnimation (ANIMATION* anim, BOOL free_it)
|
||||
* \brief Destories an ANIMATION object.
|
||||
*
|
||||
* This function destroies the ANIMATION object \a anim, and
|
||||
* free it if \a free_it is TRUE.
|
||||
*
|
||||
* \param anim Pointer to the ANIMATION object.
|
||||
* \param free_it Specify whether free the object by calling \a free(3).
|
||||
*
|
||||
* \sa CreateAnimationFromGIF89a, ANIMATION
|
||||
*/
|
||||
MG_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it);
|
||||
|
||||
/** Control class name of ANIMATION control. */
|
||||
#define CTRL_ANIMATION ("Animation")
|
||||
|
||||
/** Return values of ANIMATION control. */
|
||||
#define ANIMATION_OKAY 0
|
||||
/** Return values of ANIMATION control. */
|
||||
#define ANIMATION_ERR 1
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_animation_styles Styles of ANIMATION control
|
||||
*
|
||||
* This control can be used to play the animation object, and
|
||||
* you should specify the animation object when you create the
|
||||
* control by using the dwAddData:
|
||||
*
|
||||
* \code
|
||||
*
|
||||
* HWND hwnd;
|
||||
* ANIMATION* anim = CreateAnimationFromGIF89aFile (HDC_SCREEN, "banner.gif");
|
||||
*
|
||||
* if (anim == NULL)
|
||||
* goto error;
|
||||
*
|
||||
* hwnd = CreateWindow (CTRL_ANIMATION,
|
||||
* "",
|
||||
* WS_VISIBLE | ANS_AUTOLOOP,
|
||||
* 100,
|
||||
* 10, 10, 300, 200, hWnd, (DWORD)anim);
|
||||
* SendMessage (hwnd, ANM_STARTPLAY, 0, 0);
|
||||
*
|
||||
* \endcode
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def ANS_AUTOLOOP
|
||||
* \brief Loop playing the animation automatically.
|
||||
*/
|
||||
#define ANS_AUTOLOOP 0x0001L
|
||||
|
||||
/**
|
||||
* \def ANS_SCALED
|
||||
* \brief Scale the animation to the control size.
|
||||
*/
|
||||
#define ANS_SCALED 0x0002L
|
||||
|
||||
/**
|
||||
* \def ANS_FITTOANI
|
||||
* \brief Resize the control to fit the animation.
|
||||
*/
|
||||
#define ANS_FITTOANI 0x0004L
|
||||
|
||||
/** @} end of mgext_ctrl_animation_styles */
|
||||
|
||||
/**
|
||||
** \defgroup mgext_control_animation_msgs Messages of ANIMATION control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def ANM_SETANIMATION
|
||||
* \brief Sets the animation object for the control.
|
||||
*
|
||||
* An application can send ANM_SETANIMATION to set the animation object of a control.
|
||||
*
|
||||
* \code
|
||||
* ANM_SETANIMATION
|
||||
* ANIMATION* anim;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)anim;
|
||||
* \endcode
|
||||
*
|
||||
* \return The old animation object.
|
||||
*/
|
||||
#define ANM_SETANIMATION 0xF110
|
||||
|
||||
/**
|
||||
* \def ANM_GETANIMATION
|
||||
* \brief Gets the animation object of the control.
|
||||
*
|
||||
* An application can send ANM_GETANIMATION to retrive the animation object of a control.
|
||||
*
|
||||
* \code
|
||||
* ANM_GETANIMATION
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current animation object of the control.
|
||||
*/
|
||||
#define ANM_GETANIMATION 0xF111
|
||||
|
||||
/**
|
||||
* \def ANM_STARTPLAY
|
||||
* \brief Indicates the control to start playing the animation.
|
||||
*
|
||||
* The animation will not be played when create the control,
|
||||
* an application should send ANM_STARTPLAY to an animation control
|
||||
* to start playing the animation.
|
||||
*
|
||||
* \code
|
||||
* ANM_STARTPLAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define ANM_STARTPLAY 0xF112
|
||||
|
||||
/**
|
||||
* \def ANM_PAUSE_RESUME
|
||||
* \brief Indicates the control to pause/resume playing the animation.
|
||||
*
|
||||
* An application can send ANM_PAUSE_RESUME to an animation control
|
||||
* to pause/resume playing the animation.
|
||||
*
|
||||
* \code
|
||||
* ANM_PAUSE_RESUME
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define ANM_PAUSE_RESUME 0xF113
|
||||
|
||||
/**
|
||||
* \def ANM_STOPPLAY
|
||||
* \brief Indicates the control to stop playing the animation.
|
||||
*
|
||||
* An application can send ANM_STOPPLAY to an animation control
|
||||
* to stop playing the animation. The control will display the
|
||||
* first frame of the animation.
|
||||
*
|
||||
* \code
|
||||
* ANM_STOPPLAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define ANM_STOPPLAY 0xF114
|
||||
|
||||
#define ANM_MSGMAX 0xF120
|
||||
|
||||
/** @} end of mgext_ctrl_animation_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_animation_ncs Notification code of ANIMATION control
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* \def ANNC_CLICKED
|
||||
* \brief Indicates the user has clicked the control
|
||||
*/
|
||||
#define ANNC_CLICKED 1
|
||||
|
||||
/**
|
||||
* \def ANNC_DBLCLK
|
||||
* \brief Indicates the user has double clicked the control
|
||||
*/
|
||||
#define ANNC_DBLCLK 2
|
||||
|
||||
/** @} end of mgext_ctrl_animation_ncs */
|
||||
|
||||
/** @} end of mgext_ctrl_animation */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXT_ANIMATION_H */
|
||||
|
||||
668
include/ctrl/button.h
Normal file
668
include/ctrl/button.h
Normal file
File diff suppressed because it is too large
Load Diff
989
include/ctrl/combobox.h
Normal file
989
include/ctrl/combobox.h
Normal file
File diff suppressed because it is too large
Load Diff
211
include/ctrl/coolbar.h
Normal file
211
include/ctrl/coolbar.h
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* \file coolbar.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2002/01/06
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software
|
||||
Copyright (C) 1998-2002 Wei Yongming
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: coolbar.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1998-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef EXT_COOLBAR_H
|
||||
#define EXT_COOLBAR_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_coolbar CoolBar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_COOLBAR
|
||||
* \brief The class name of coolbar control.
|
||||
*/
|
||||
#define CTRL_COOLBAR ("CoolBar")
|
||||
|
||||
#define TYPE_BARITEM 1
|
||||
#define TYPE_BMPITEM 2
|
||||
#define TYPE_TEXTITEM 3
|
||||
|
||||
/** Structure of the coolbar item info */
|
||||
typedef struct _COOLBARITEMINFO
|
||||
{
|
||||
/** Reserved, do not use. */
|
||||
int insPos;
|
||||
|
||||
/**
|
||||
* Identifier of the item. When the user clicked the item, this control
|
||||
* will send a notification message to the parent window
|
||||
* with the notification code to be equal to this identifier.
|
||||
*/
|
||||
int id;
|
||||
|
||||
/**
|
||||
* Type of the item, can be one of the following values:
|
||||
* - TYPE_BARITEM
|
||||
* The item is a separator (a vertical line).
|
||||
* - TYPE_BMPITEM
|
||||
* The item is a bitmap.
|
||||
* - TYPE_TEXTITEM
|
||||
* The item is text.
|
||||
*/
|
||||
int ItemType;
|
||||
|
||||
/**
|
||||
* Pointer to the bitmap of the item, valid when the type is TYPE_BMPITEM.
|
||||
*/
|
||||
PBITMAP Bmp;
|
||||
|
||||
/**
|
||||
* Hint text of the item, will be displayed in the tooltip window.
|
||||
*/
|
||||
const char *ItemHint;
|
||||
|
||||
/**
|
||||
* Caption of the item, valid when the type is TPYE_TEXTITEM.
|
||||
*/
|
||||
const char *Caption;
|
||||
|
||||
/** Additional data of the item */
|
||||
DWORD dwAddData;
|
||||
} COOLBARITEMINFO;
|
||||
|
||||
/**
|
||||
* \var typedef struct COOLBARITEMINFO *PCOOLBARITEMINFO;
|
||||
* \brief Data type of the pointer to a COOLBARITEMINFO.
|
||||
*/
|
||||
typedef COOLBARITEMINFO *PCOOLBARITEMINFO;
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_coolbar_styles Styles of coolbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CBS_BMP_16X16
|
||||
* \brief The size of the item bitmap is 16x16.
|
||||
*/
|
||||
#define CBS_BMP_16X16 0x0000
|
||||
|
||||
/**
|
||||
* \def CBS_BMP_32X32
|
||||
* \brief The size of the item bitmap is 32x32.
|
||||
*/
|
||||
#define CBS_BMP_32X32 0x0001
|
||||
|
||||
/**
|
||||
* \def CBS_BMP_CUSTOM
|
||||
* \brief The item bitmap has customized size.
|
||||
*
|
||||
* \note For the control with this style, you should pass
|
||||
* the width and the height of the item bitmap by
|
||||
* the argument \a dwAddData of \a CreateWindowEx function.
|
||||
*
|
||||
* \code
|
||||
* int item_width = 20;
|
||||
* int item_height = 20;
|
||||
*
|
||||
* CreateWindowEx (CTRL_COOLBAR, ..., MAKELONG (item_width, item_height)));
|
||||
* \endcode
|
||||
*/
|
||||
#define CBS_BMP_CUSTOM 0x0002
|
||||
|
||||
/**
|
||||
* \def CBS_USEBKBMP
|
||||
* \brief The control has a background bitmap.
|
||||
*
|
||||
* \note For a CoolBar control with this style, you should pass the bitmap file name
|
||||
* by the argument \a spCaption of \a CreateWindowEx function.
|
||||
*
|
||||
* \code
|
||||
* const char* file_bkgnd = "res/my_bkgnd.gif";
|
||||
*
|
||||
* CreateWindowEx (CTRL_COOLBAR, file_bkgnd, ...);
|
||||
* \endcode
|
||||
*/
|
||||
#define CBS_USEBKBMP 0x0004
|
||||
|
||||
/** @} end of mgext_ctrl_coolbar_styles */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_coolbar_msgs Messages of coolbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CBM_ADDITEM
|
||||
* \brief Adds a new item in a coolbar control.
|
||||
*
|
||||
* \code
|
||||
* CBM_ADDITEM
|
||||
* COOLBARITEMINFO *newIteminfo;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)newIteminfo;
|
||||
* \endcode
|
||||
*
|
||||
* \param newIteminfo Pointer to the item info structure of the new item
|
||||
* to be added.
|
||||
*
|
||||
* \return Zero when success, otherwise less than 0;
|
||||
*/
|
||||
#define CBM_ADDITEM 0xFE00
|
||||
|
||||
/**
|
||||
* \def CBM_ENABLE
|
||||
* \brief Sets an item to be enabled or disabled.
|
||||
*
|
||||
* \code
|
||||
* CBM_ENABLE
|
||||
* int id;
|
||||
* BOOL enabled;
|
||||
*
|
||||
* wParam = (WPARAM)id;
|
||||
* lParam = (LPARAM)enabled;
|
||||
* \endcode
|
||||
*
|
||||
* \param id The identifier of the item to change.
|
||||
* \param enabled TRUE to enable the item, FALSE to disable the item.
|
||||
*
|
||||
* \return Zero when success, otherwise less than 0.
|
||||
*/
|
||||
#define CBM_ENABLE 0xFE01
|
||||
|
||||
/** @} end of mgext_ctrl_coolbar_msgs */
|
||||
|
||||
/** @} end of mgext_ctrl_coolbar */
|
||||
|
||||
/** @} end of controls */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXT_COOLBAR_H */
|
||||
|
||||
224
include/ctrl/ctrlhelper.h
Normal file
224
include/ctrl/ctrlhelper.h
Normal file
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
* \file ctrlhelper.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: ctrlhelper.h 10829 2008-08-26 07:47:17Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_CTRLHELPER_H
|
||||
#define _MGUI_CTRL_CTRLHELPER_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup fns Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup global_fns Global/general functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup misc_fns Miscellaneous functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \enum SBPolicyType
|
||||
* \brief Scroll bar display policies in scrolled window
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/**
|
||||
* The scroll bar is always visible
|
||||
*/
|
||||
SB_POLICY_ALWAYS,
|
||||
/**
|
||||
* The scroll bar is shown or hided automatically
|
||||
*/
|
||||
SB_POLICY_AUTOMATIC,
|
||||
/** The scroll bar is never visbile
|
||||
*/
|
||||
SB_POLICY_NEVER
|
||||
} SBPolicyType;
|
||||
|
||||
#define DF_3DBOX_NORMAL 0x0000
|
||||
#define DF_3DBOX_PRESSED 0x0001
|
||||
#define DF_3DBOX_STATEMASK 0x000F
|
||||
#define DF_3DBOX_NOTFILL 0x0000
|
||||
#define DF_3DBOX_FILL 0x0010
|
||||
|
||||
/**
|
||||
* \fn void GUIAPI DisabledTextOutEx (HDC hdc, HWND hwnd, int x, int y, const char* szText)
|
||||
* \brief Outputs disabled (grayed) text.
|
||||
*
|
||||
* This function outputs a grayed text at the specified position.
|
||||
*
|
||||
* \param hdc The device context.
|
||||
* \param hwnd Tell the function to draw with the color definitions of this window.
|
||||
* \param x The x-coordinate of start point.
|
||||
* \param y The y-coordinate of start point.
|
||||
* \param szText The null-terminated text to be output.
|
||||
*
|
||||
* \sa TextOut, DrawText
|
||||
*/
|
||||
MG_EXPORT void GUIAPI DisabledTextOutEx (HDC hdc, HWND hwnd, int x, int y, const char* szText);
|
||||
|
||||
/**
|
||||
* \fn HWND CreateToolTipWin (HWND hParentWnd, int x, int y,\
|
||||
int timeout_ms, const char* text, ...)
|
||||
* \brief Creates a tool tip window.
|
||||
*
|
||||
* This function creates a tool tip window and returns the handle to it.
|
||||
* You can call \a DestroyToolTipWin to destroy it. This function also
|
||||
* receives \a printf-like arguments to format a string.
|
||||
*
|
||||
* Note that the tool tip window will disappear automatically after the
|
||||
* specified milliseconds by \a timeout_ms if \a timeout_ms is larger
|
||||
* than 9 ms.
|
||||
*
|
||||
* \param hParentWnd The hosting main window.
|
||||
* \param x The position of the tool tip window.
|
||||
* \param y The position of the tool tip window.
|
||||
* \param timeout_ms The timeout value of the tool tip window.
|
||||
* \param text The format string.
|
||||
*
|
||||
* \return The handle to the tool tip window on success, HWND_INVALID on error.
|
||||
*
|
||||
* \sa ResetToolTipWin, DestroyToolTipWin
|
||||
*/
|
||||
MG_EXPORT HWND CreateToolTipWin (HWND hParentWnd, int x, int y,
|
||||
int timeout_ms, const char* text, ...);
|
||||
|
||||
/**
|
||||
* \fn void ResetToolTipWin (HWND hwnd, int x, int y,\
|
||||
const char* text, ...)
|
||||
* \brief Resets a tool tip window.
|
||||
*
|
||||
* This function resets the tool tip window specified by \a hwnd, including its
|
||||
* position, text displayed in it, and the visible status. If the tool tip is
|
||||
* invisible, it will become visible.
|
||||
*
|
||||
* This function also receives \a printf-like arguments to format a string.
|
||||
*
|
||||
* \param hwnd The tool tip window handle returned by \a CreateToolTipWin.
|
||||
* \param x The new position of the tool tip window.
|
||||
* \param y The new position of the tool tip window.
|
||||
* \param text The new format string.
|
||||
*
|
||||
* \sa CreateToolTipWin, DestroyToolTipWin
|
||||
*/
|
||||
MG_EXPORT void ResetToolTipWin (HWND hwnd, int x, int y,
|
||||
const char* text, ...);
|
||||
|
||||
/**
|
||||
* \fn void DestroyToolTipWin (HWND hwnd)
|
||||
* \brief Destroies a tool tip window.
|
||||
*
|
||||
* This function destroies the specified tool tip window \a hwnd, which
|
||||
* is returned by \a CreateToolTipWin.
|
||||
*
|
||||
* \param hwnd The handle to the tool tip window.
|
||||
*
|
||||
* \sa CreateToolTipWin
|
||||
*/
|
||||
MG_EXPORT void DestroyToolTipWin (HWND hwnd);
|
||||
|
||||
/**
|
||||
* \fn void GUIAPI NotifyParentEx (HWND hwnd, int id, int code, DWORD add_data)
|
||||
* \brief Sends a notification message to the parent.
|
||||
*
|
||||
* By default, the notification from a control will be sent to its parent
|
||||
* window within a MSG_COMMAND messsage.
|
||||
*
|
||||
* Since version 1.2.6, MiniGUI defines the Nofication Callback Procedure
|
||||
* for control. You can specify a callback function for a control by calling
|
||||
* \a SetNotificationCallback to receive and handle the notification from
|
||||
* the control.
|
||||
*
|
||||
* If you have defined the Notificaton Callback Procedure for the control,
|
||||
* calling NotifyParentEx will call the notification callback procedure,
|
||||
* not send the notification message to the parent.
|
||||
*
|
||||
* Note that if the control has WS_EX_NOPARENTNOTIFY style, this function
|
||||
* will not notify the parent.
|
||||
*
|
||||
* \param hwnd The handle to current control window.
|
||||
* \param id The identifier of current control.
|
||||
* \param code The notification code.
|
||||
* \param add_data The additional data of the notification.
|
||||
*
|
||||
* \sa SetNotificationCallback
|
||||
*/
|
||||
MG_EXPORT void GUIAPI NotifyParentEx (HWND hwnd, int id, int code, DWORD add_data);
|
||||
|
||||
/**
|
||||
* \def NotifyParent(hwnd, id, code)
|
||||
* \brief Sends a notification message to the parent,
|
||||
* but without additional data.
|
||||
*
|
||||
* \param hwnd The handle to current control window.
|
||||
* \param id The identifier of current control.
|
||||
* \param code The notification code.
|
||||
*
|
||||
* \note This function is actually a macro of NotifyParentEx with
|
||||
* \a dwAddData being zero.
|
||||
*
|
||||
* \sa NotifiyParentEx
|
||||
*/
|
||||
#define NotifyParent(hwnd, id, code) \
|
||||
NotifyParentEx(hwnd, id, code, 0)
|
||||
|
||||
/**
|
||||
* \var typedef int (*STRCMP) (const char* s1, const char* s2, size_t n)
|
||||
* \brief Type of general strncmp function.
|
||||
*
|
||||
* The function compares the two strings \a s1 and \a s2. It returns
|
||||
* an integer less than, equal to, or greater than zero if \a s1 is found,
|
||||
* respectively, to be less than, to match, or be greater than \a s2.
|
||||
*
|
||||
* Note that it only compares the first (at most) \a n characters of s1 and s2.
|
||||
*/
|
||||
typedef int (*STRCMP) (const char* s1, const char* s2, size_t n);
|
||||
|
||||
MG_EXPORT int GUIAPI
|
||||
DefaultPageProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
/** @} end of misc_fns */
|
||||
|
||||
/** @} end of global_fns */
|
||||
|
||||
/** @} end of fns */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_CTRLHELPER_H */
|
||||
|
||||
1320
include/ctrl/edit.h
Normal file
1320
include/ctrl/edit.h
Normal file
File diff suppressed because it is too large
Load Diff
673
include/ctrl/gridview.h
Normal file
673
include/ctrl/gridview.h
Normal file
File diff suppressed because it is too large
Load Diff
464
include/ctrl/iconview.h
Normal file
464
include/ctrl/iconview.h
Normal file
@@ -0,0 +1,464 @@
|
||||
/**
|
||||
* \file iconview.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2002/01/06
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software
|
||||
Copyright (C) 1998-2002 Wei Yongming
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: iconview.h 11576 2009-04-27 01:01:57Z dongjunjie $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1998-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef EXT_ICONVIEW_H
|
||||
#define EXT_ICONVIEW_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_iconview IconView control
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* \def CTRL_ICONVIEW
|
||||
* \brief The class name of iconview control.
|
||||
*/
|
||||
#define CTRL_ICONVIEW ("IconView")
|
||||
|
||||
/** Iconview return value */
|
||||
#define IV_OKAY 0
|
||||
/** Iconview return value */
|
||||
#define IV_ERR (-1)
|
||||
/** Iconview return value */
|
||||
#define IV_ERRSPACE (-2)
|
||||
|
||||
/**
|
||||
* \var typedef GHANDLE HIVITEM
|
||||
* \brief Icon view item handle
|
||||
*/
|
||||
typedef GHANDLE HIVITEM;
|
||||
|
||||
/**
|
||||
* Structure of the iconview item info, contains information about an item.
|
||||
* This structure is used for creating or retrieving an item.
|
||||
*/
|
||||
typedef struct _IVITEMINFO
|
||||
{
|
||||
/**
|
||||
* The Index of the item
|
||||
*/
|
||||
int nItem;
|
||||
|
||||
/**
|
||||
* The bitmap icon of the item
|
||||
*/
|
||||
PBITMAP bmp;
|
||||
|
||||
/**
|
||||
* The text label of the item
|
||||
*/
|
||||
const char *label;
|
||||
|
||||
/** Attached additional data of this item */
|
||||
DWORD addData;
|
||||
|
||||
/**
|
||||
* Reserved
|
||||
*/
|
||||
DWORD dwFlags;
|
||||
|
||||
} IVITEMINFO;
|
||||
typedef IVITEMINFO* PIVITEMINFO;
|
||||
|
||||
/** Iconview bitmap flags, reserved */
|
||||
#define IVFLAG_BITMAP 0x0001
|
||||
/** Iconview icon flags, reserved */
|
||||
#define IVFLAG_ICON 0x0002
|
||||
|
||||
|
||||
/**
|
||||
* \fn int iconview_is_item_hilight (HWND hWnd, GHANDLE hivi)
|
||||
* \brief Uses this to get an iconview item is hilighted or not.
|
||||
*
|
||||
* \returns TRUE when item is hilighted, or FALSE.
|
||||
*/
|
||||
MG_EXPORT int iconview_is_item_hilight (HWND hWnd, GHANDLE hivi);
|
||||
|
||||
/**
|
||||
* \fn DWORD iconview_get_item_bitmap (GHANDLE hivi)
|
||||
* \brief Uses this to get bitmap handle from an iconview item.
|
||||
*
|
||||
* \returns the bitmap handle of iconview item.
|
||||
*/
|
||||
MG_EXPORT PBITMAP iconview_get_item_bitmap (GHANDLE hivi);
|
||||
|
||||
/**
|
||||
* \fn DWORD iconview_get_item_label (GHANDLE hivi)
|
||||
* \brief Uses this to get text label from an iconview item.
|
||||
*
|
||||
* \returns the text label of iconview item.
|
||||
*/
|
||||
MG_EXPORT const char* iconview_get_item_label (GHANDLE hivi);
|
||||
|
||||
/**
|
||||
* \fn DWORD iconview_get_item_adddata (GHANDLE hivi)
|
||||
* \brief Uses this to get additional data from an iconview item.
|
||||
*
|
||||
* \returns the additional data of iconview item.
|
||||
*/
|
||||
MG_EXPORT DWORD iconview_get_item_adddata (GHANDLE hivi);
|
||||
|
||||
MG_EXPORT GHANDLE iconview_get_item(HWND hwnd, int index);
|
||||
|
||||
MG_EXPORT BOOL iconview_set_item_lable(GHANDLE hivi, const char* strLable);
|
||||
|
||||
MG_EXPORT PBITMAP iconview_set_item_bitmap(GHANDLE hivi, PBITMAP pbmp);
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_iconview_styles Styles of iconview control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* reserved */
|
||||
/**
|
||||
* \def IVS_NOTIFY
|
||||
* \brief The notify style of iconview control
|
||||
* \sa SVS_NOTIFY
|
||||
*/
|
||||
#define IVS_NOTIFY SVS_NOTIFY
|
||||
|
||||
/**
|
||||
* \def IVS_UPNOTIFY
|
||||
* \brief The upnotify style of iconview control
|
||||
* \sa SVS_UPNOTIFY
|
||||
*/
|
||||
#define IVS_UPNOTIFY SVS_UPNOTIFY
|
||||
|
||||
/**
|
||||
* \def IVS_AUTOSORT
|
||||
* \brief The auto sort style of iconview control
|
||||
* \sa SVS_AUTOSORT
|
||||
*/
|
||||
#define IVS_AUTOSORT SVS_AUTOSORT
|
||||
|
||||
/**
|
||||
* \def IVS_LOOP
|
||||
* \brief The loop style of iconview control
|
||||
* \sa SVS_LOOP
|
||||
*/
|
||||
#define IVS_LOOP SVS_LOOP
|
||||
|
||||
|
||||
/** @} end of mgext_ctrl_iconview_styles */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_iconview_msgs Messages of ListView control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def IVM_ADDITEM
|
||||
* \brief Adds a item to iconview.
|
||||
*
|
||||
* \code
|
||||
* IVM_ADDITEM
|
||||
* PIVITEMINFO p
|
||||
*
|
||||
* p =(LPARAM)lParam;
|
||||
* \endcode
|
||||
*
|
||||
* \param p Pointes to a IVITEMINFO structure that contains the information of
|
||||
* the new item to be added. nItem member of the IVITEMINFO struct speficied
|
||||
* the item position in its parent item, beginning with zero.
|
||||
*
|
||||
* \return Returns the handle of the new item if successful, or 0 otherwise.
|
||||
*/
|
||||
#define IVM_ADDITEM 0xF300
|
||||
|
||||
/**
|
||||
* \def IVM_SETITEMSIZE
|
||||
* \brief Sets the item width and height of an iconview control
|
||||
*
|
||||
* All the items have the same item size. This message should be sent
|
||||
* before you add items to iconview control.
|
||||
*
|
||||
* \code
|
||||
* IVM_SETITEMSIZE
|
||||
* int width;
|
||||
* int height;
|
||||
*
|
||||
* wParam = width;
|
||||
* lParam = height;
|
||||
* \endcode
|
||||
*
|
||||
* \param width Width of an item.
|
||||
* \param height Height of an item.
|
||||
*
|
||||
* \return 0.
|
||||
*/
|
||||
#define IVM_SETITEMSIZE 0xF436
|
||||
|
||||
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_RESETCONTENT
|
||||
*/
|
||||
#define IVM_RESETCONTENT SVM_RESETCONTENT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_DELITEM
|
||||
*/
|
||||
#define IVM_DELITEM SVM_DELITEM
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMDRAW
|
||||
*/
|
||||
#define IVM_SETITEMDRAW SVM_SETITEMDRAW
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETCONTWIDTH
|
||||
*/
|
||||
#define IVM_SETCONTWIDTH SVM_SETCONTWIDTH
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETCONTHEIGHT
|
||||
*/
|
||||
#define IVM_SETCONTHEIGHT SVM_SETCONTHEIGHT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMOPS
|
||||
*/
|
||||
#define IVM_SETITEMOPS SVM_SETITEMOPS
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETMARGINS
|
||||
*/
|
||||
#define IVM_GETMARGINS SVM_GETMARGINS
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETMARGINS
|
||||
*/
|
||||
#define IVM_SETMARGINS SVM_SETMARGINS
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETLEFTMARGIN
|
||||
*/
|
||||
#define IVM_GETLEFTMARGIN SVM_GETLEFTMARGIN
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETTOPMARGIN
|
||||
*/
|
||||
#define IVM_GETTOPMARGIN SVM_GETTOPMARGIN
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETRIGHTMARGIN
|
||||
*/
|
||||
#define IVM_GETRIGHTMARGIN SVM_GETRIGHTMARGIN
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETBOTTOMMARGIN
|
||||
*/
|
||||
#define IVM_GETBOTTOMMARGIN SVM_GETBOTTOMMARGIN
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETVISIBLEWIDTH
|
||||
*/
|
||||
#define IVM_GETVISIBLEWIDTH SVM_GETVISIBLEWIDTH
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETVISIBLEHEIGHT
|
||||
*/
|
||||
#define IVM_GETVISIBLEHEIGHT SVM_GETVISIBLEHEIGHT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETCONTWIDTH
|
||||
*/
|
||||
#define IVM_GETCONTWIDTH SVM_GETCONTWIDTH
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETCONTHEIGHT
|
||||
*/
|
||||
#define IVM_GETCONTHEIGHT SVM_GETCONTHEIGHT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETCONTRANGE
|
||||
*/
|
||||
#define IVM_SETCONTRANGE SVM_SETCONTRANGE
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETCONTENTX
|
||||
*/
|
||||
#define IVM_GETCONTENTX SVM_GETCONTENTX
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETCONTENTY
|
||||
*/
|
||||
#define IVM_GETCONTENTY SVM_GETCONTENTY
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETCONTPOS
|
||||
*/
|
||||
#define IVM_SETCONTPOS SVM_SETCONTPOS
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETCURSEL
|
||||
*/
|
||||
#define IVM_GETCURSEL SVM_GETCURSEL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SELECTITEM
|
||||
*/
|
||||
#define IVM_SELECTITEM SVM_SELECTITEM
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SHOWITEM
|
||||
*/
|
||||
#define IVM_SHOWITEM SVM_SHOWITEM
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_CHOOSEITEM
|
||||
*/
|
||||
#define IVM_CHOOSEITEM SVM_CHOOSEITEM
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETCURSEL
|
||||
*/
|
||||
#define IVM_SETCURSEL SVM_SETCURSEL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMINIT
|
||||
*/
|
||||
#define IVM_SETITEMINIT SVM_SETITEMINIT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMDESTROY
|
||||
*/
|
||||
#define IVM_SETITEMDESTROY SVM_SETITEMDESTROY
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMCMP
|
||||
*/
|
||||
#define IVM_SETITEMCMP SVM_SETITEMCMP
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_MAKEPOSVISIBLE
|
||||
*/
|
||||
#define IVM_MAKEPOSVISIBLE SVM_MAKEPOSVISIBLE
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETHSCROLLVAL
|
||||
*/
|
||||
#define IVM_GETHSCROLLVAL SVM_GETHSCROLLVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETVSCROLLVAL
|
||||
*/
|
||||
#define IVM_GETVSCROLLVAL SVM_GETVSCROLLVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETHSCROLLPAGEVAL
|
||||
*/
|
||||
#define IVM_GETHSCROLLPAGEVAL SVM_GETHSCROLLPAGEVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETVSCROLLPAGEVAL
|
||||
*/
|
||||
#define IVM_GETVSCROLLPAGEVAL SVM_GETVSCROLLPAGEVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETSCROLLVAL
|
||||
*/
|
||||
#define IVM_SETSCROLLVAL SVM_SETSCROLLVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETSCROLLPAGEVAL
|
||||
*/
|
||||
#define IVM_SETSCROLLPAGEVAL SVM_SETSCROLLPAGEVAL
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SORTITEMS
|
||||
*/
|
||||
#define IVM_SORTITEMS SVM_SORTITEMS
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETITEMCOUNT
|
||||
*/
|
||||
#define IVM_GETITEMCOUNT SVM_GETITEMCOUNT
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETITEMADDDATA
|
||||
*/
|
||||
#define IVM_GETITEMADDDATA SVM_GETITEMADDDATA
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_SETITEMADDDATA
|
||||
*/
|
||||
#define IVM_SETITEMADDDATA SVM_SETITEMADDDATA
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_REFRESHITEM
|
||||
*/
|
||||
#define IVM_REFRESHITEM SVM_REFRESHITEM
|
||||
/**
|
||||
* The same common control messages as scrollview control
|
||||
* \sa SVM_GETFIRSTVISIBLEITEM
|
||||
*/
|
||||
#define IVM_GETFIRSTVISIBLEITEM SVM_GETFIRSTVISIBLEITEM
|
||||
|
||||
/** @} end of mgext_ctrl_iconview_msgs */
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_iconview_ncs Notification code of IconView control
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* The notification messages as scrollview control
|
||||
* \sa SVN_CLICKED
|
||||
*/
|
||||
#define IVN_CLICKED SVN_CLICKED
|
||||
|
||||
/**
|
||||
* The notification messages as scrollview control
|
||||
* \sa SVN_SELCHANGED
|
||||
*/
|
||||
#define IVN_SELCHANGED SVN_SELCHANGED
|
||||
|
||||
|
||||
/** @} end of mgext_ctrl_iconview_ncs */
|
||||
|
||||
/** @} end of mgext_ctrl_iconview */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXT_ICONVIEW_H */
|
||||
|
||||
1203
include/ctrl/listbox.h
Normal file
1203
include/ctrl/listbox.h
Normal file
File diff suppressed because it is too large
Load Diff
1279
include/ctrl/listview.h
Normal file
1279
include/ctrl/listview.h
Normal file
File diff suppressed because it is too large
Load Diff
11
include/ctrl/makefile.msvc
Normal file
11
include/ctrl/makefile.msvc
Normal file
@@ -0,0 +1,11 @@
|
||||
# Makefile defines for building the MiniGUI DLL with Microsoft VC
|
||||
|
||||
SUBINC=1
|
||||
|
||||
!INCLUDE Makefile.am
|
||||
!INCLUDE ..\..\build\Defs.win32
|
||||
!INCLUDE ..\..\build\makedefs.msvc
|
||||
|
||||
install::
|
||||
@for %d in ($(libminiguiinclude_HEADERS)) do $(CP) %d $(libminiguiincludedir)\ctrl\
|
||||
|
||||
12
include/ctrl/makefile.ng
Normal file
12
include/ctrl/makefile.ng
Normal file
@@ -0,0 +1,12 @@
|
||||
# Makefile defines for building the MiniGUI DLL with Microsoft VC
|
||||
|
||||
SUBINC=1
|
||||
|
||||
abs_top_srcdir=../..
|
||||
|
||||
include Makefile.am
|
||||
include ../../rules.make
|
||||
|
||||
install::
|
||||
@for i in $(libminiguiinclude_HEADERS); do $(CP) $$i $(libminiguiincludedir)/ctrl/; done
|
||||
|
||||
383
include/ctrl/menubutton.h
Normal file
383
include/ctrl/menubutton.h
Normal file
@@ -0,0 +1,383 @@
|
||||
/**
|
||||
* \file menubutton.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: menubutton.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_MENUBUTTON_H
|
||||
#define _MGUI_CTRL_MENUBUTTON_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_menubutton MenuButton control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_MENUBTN
|
||||
* \brief The class name of menubutton control.
|
||||
*/
|
||||
#define CTRL_MENUBTN ("menubutton")
|
||||
|
||||
/**
|
||||
* \def CTRL_MENUBUTTON
|
||||
* \brief The class name of menubutton control.
|
||||
*/
|
||||
#define CTRL_MENUBUTTON ("menubutton")
|
||||
|
||||
/** Menu Button return value */
|
||||
#define MB_OKAY 0
|
||||
/** Menu Button return value */
|
||||
#define MB_ERR -1
|
||||
/** Menu Button return value */
|
||||
#define MB_INV_ITEM -2
|
||||
/** Menu Button return value */
|
||||
#define MB_ERR_SPACE -3
|
||||
|
||||
/** Struct used by parent to add/retrive item */
|
||||
#define MB_WHICH_TEXT 0x01
|
||||
/** Struct used by parent to add/retrive item */
|
||||
#define MB_WHICH_BMP 0x02
|
||||
/** Struct used by parent to add/retrive item */
|
||||
#define MB_WHICH_ATTDATA 0x04
|
||||
|
||||
/** Structure of the menubutton item */
|
||||
typedef struct _MENUBUTTONITEM
|
||||
{
|
||||
/**
|
||||
* Which fields are valid when sets/retrives the item information
|
||||
* (ignored when add item). It can be OR'd with the following values:
|
||||
*
|
||||
* - MB_WHICH_TEXT The \a text field is valid.
|
||||
* - MB_WHICH_BMP The \a bmp field is valid.
|
||||
* - MB_WHICH_ATTDATA The \a data field is valid.
|
||||
*/
|
||||
DWORD which;
|
||||
/** Item string */
|
||||
const char* text;
|
||||
/** Item bitmap */
|
||||
PBITMAP bmp;
|
||||
/** Attached data */
|
||||
DWORD data;
|
||||
} MENUBUTTONITEM;
|
||||
|
||||
/**
|
||||
* \var typedef MENUBUTTONITEM* PMENUBUTTONITEM;
|
||||
* \brief Data type of the pointer to a MENUBUTTONITEM.
|
||||
*/
|
||||
typedef MENUBUTTONITEM* PMENUBUTTONITEM;
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_menubutton_styles Styles of menubutton control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def MBS_SORT
|
||||
* \brief If this bit is set, the items listed in the control
|
||||
* are displayed in a specified order.
|
||||
*/
|
||||
#define MBS_SORT 0x0001
|
||||
|
||||
/**
|
||||
* \def MBS_LEFTARROW
|
||||
* \brief The menu pull-down arrow will be display at the left of the text.
|
||||
*/
|
||||
#define MBS_LEFTARROW 0x0002
|
||||
|
||||
/**
|
||||
* \def MBS_NOBUTTON
|
||||
* \brief The control have not push button.
|
||||
*/
|
||||
#define MBS_NOBUTTON 0x0004
|
||||
|
||||
/**
|
||||
* \def MBS_ALIGNLEFT
|
||||
* \brief The text on menubutton is left-align (default).
|
||||
*/
|
||||
#define MBS_ALIGNLEFT 0x0000
|
||||
|
||||
/**
|
||||
* \def MBS_ALIGNRIGHT
|
||||
* \brief The text on menubutton is right-align.
|
||||
*/
|
||||
#define MBS_ALIGNRIGHT 0x0010
|
||||
|
||||
/**
|
||||
* \def MBS_ALIGNCENTER
|
||||
* \brief The text on menubutton is center-align.
|
||||
*/
|
||||
#define MBS_ALIGNCENTER 0x0020
|
||||
|
||||
/**
|
||||
* \def MBS_ALIGNMASK
|
||||
* \brief The align mask of menubutton.
|
||||
*/
|
||||
#define MBS_ALIGNMASK 0x00F0
|
||||
|
||||
/** @} end of ctrl_menubutton_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_menubutton_msgs Messages of menubutton control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def MBM_ADDITEM
|
||||
* \brief Sends to the control to add an item to the menu list.
|
||||
*
|
||||
* \code
|
||||
* MBM_ADDITEM
|
||||
* int pos;
|
||||
* MENUBUTTONITEM newitem;
|
||||
*
|
||||
* wParam = (WPARAM)pos;
|
||||
* lParam = (LPARAM)&newitem;
|
||||
* \endcode
|
||||
*
|
||||
* \param pos The position at which to add the item. If the control
|
||||
* was created with the style of \a MBS_SORT, this parameter
|
||||
* will be ignored. If this parameter is less than 0,
|
||||
* the new item will be append to the tail of the menu list.
|
||||
* \param newitem Pointer to the menubutton item info structure.
|
||||
*
|
||||
* \return The position at which the item has been added, i.e.,
|
||||
* the index of the added item if success. Otherwise,
|
||||
* the following error code will be returned:
|
||||
*
|
||||
* - MB_ERR_SPACE\n No memory can be allocated for new item.
|
||||
*/
|
||||
#define MBM_ADDITEM 0xF200
|
||||
|
||||
/**
|
||||
* \def MBM_DELITEM
|
||||
* \brief Sends to the control to delete an item in the menu list.
|
||||
*
|
||||
* \code
|
||||
* MBM_DELETEITEM
|
||||
* int del;
|
||||
*
|
||||
* wParam = (WPARAM)del;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param del The index of the item to be deleted.
|
||||
*
|
||||
* \return MB_OKAY if success, else MB_INV_ITEM to indicate valid index.
|
||||
*/
|
||||
#define MBM_DELITEM 0xF201
|
||||
|
||||
/**
|
||||
* \def MBM_RESETCTRL
|
||||
* \brief Sends to the control to remove all items in the menu list.
|
||||
*
|
||||
* \code
|
||||
* MBM_RESETCTRL
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define MBM_RESETCTRL 0xF202
|
||||
|
||||
/**
|
||||
* \def MBM_SETITEMDATA
|
||||
* \brief Sends to the control to set the data of a specific item.
|
||||
*
|
||||
* \code
|
||||
* MBM_SETITEMDATA
|
||||
* int index;
|
||||
* PMENUBUTTONITEM pmbi;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = (LPARAM)pmbi;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index of the item to be altered.
|
||||
* \param pmbi Pointer to the MENUBUTTONITEM structure that stores the new
|
||||
* menubutton item data.
|
||||
*
|
||||
* \return MB_OKAY if success, otherwise will be one of the following error codes:
|
||||
*
|
||||
* - MB_INV_ITEM\n Indicate that the index you passed is valid.
|
||||
* - MB_ERR_SPACE\n No memory can be allocated for new item data.
|
||||
*/
|
||||
#define MBM_SETITEMDATA 0xF203
|
||||
|
||||
/**
|
||||
* \def MBM_GETITEMDATA
|
||||
* \brief Sends to the control to retrive the data of a specific item.
|
||||
*
|
||||
* \code
|
||||
* MBM_GETITEMDATA
|
||||
* int index;
|
||||
* PMENUBUTTONITEM pmbi;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = (LPARAM)pmbi;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index of the specific item.
|
||||
* \param pmbi Pointer to the MENUBUTTONITEM structure for storing the
|
||||
* menubutton item data.
|
||||
*
|
||||
* \return MB_OKAY if success, otherwise MB_INV_ITEM to indicate invalid index.
|
||||
*/
|
||||
#define MBM_GETITEMDATA 0xF204
|
||||
|
||||
/**
|
||||
* \def MBM_GETCURITEM
|
||||
* \brief Sends to get the index of the current selected item.
|
||||
*
|
||||
* \code
|
||||
* MBM_GETCURITEM
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The index of the current selected item. If there is no seleted
|
||||
* item, MB_INV_ITEM will be returned.
|
||||
*/
|
||||
#define MBM_GETCURITEM 0xF206
|
||||
|
||||
/**
|
||||
* \def MBM_SETCURITEM
|
||||
* \brief Sends to set the current selected item based on index.
|
||||
*
|
||||
* \code
|
||||
* MBM_SETCURITEM
|
||||
* int cur;
|
||||
*
|
||||
* wParam = (WPARAM)cur;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param cur The index to be the current item.
|
||||
*
|
||||
* \return The index of the old selected item.
|
||||
*/
|
||||
#define MBM_SETCURITEM 0xF207
|
||||
|
||||
/**
|
||||
* \def MBM_SETSTRCMPFUNC
|
||||
* \brief Sets the STRCMP function used to sort items.
|
||||
*
|
||||
* An application sends a MBM_SETSTRCMPFUNC message to set a
|
||||
* new STRCMP function to sort items in the menubutton.
|
||||
*
|
||||
* Note that you should send this message before adding
|
||||
* any item to the menubutton control.
|
||||
*
|
||||
* \code
|
||||
* static int my_strcmp (const char* s1, const char* s2, size_t n)
|
||||
* {
|
||||
* ...
|
||||
* return 0;
|
||||
* }
|
||||
*
|
||||
* MBM_SETSTRCMPFUNC
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM) my_strcmp;
|
||||
* \endcode
|
||||
*
|
||||
* \param my_strcmp Your own function to compare two strings.
|
||||
*
|
||||
* \return One of the following values:
|
||||
* - MB_OKAY\n Success
|
||||
* - MB_ERR\n Not an empty menubutton
|
||||
*/
|
||||
#define MBM_SETSTRCMPFUNC 0xF208
|
||||
|
||||
/* Internal */
|
||||
#define MBM_MSGMAX 0xF210
|
||||
|
||||
/** @} end of ctrl_menubutton_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_menubutton_ncs Notification codes of menubutton control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def MBN_ERRSPACE
|
||||
* \brief Sends when memory space error occures.
|
||||
*/
|
||||
#define MBN_ERRSPACE 255
|
||||
|
||||
/**
|
||||
* \def MBN_CHANGED
|
||||
* \brief Sends when selected item changes.
|
||||
*/
|
||||
#define MBN_CHANGED 1
|
||||
|
||||
/**
|
||||
* \def MBN_SELECTED
|
||||
* \brief Sends when an item is selected.
|
||||
*/
|
||||
#define MBN_SELECTED 2
|
||||
|
||||
/**
|
||||
* \def MBN_STARTMENU
|
||||
* \brief Sends when starting tracking popup menu.
|
||||
*/
|
||||
#define MBN_STARTMENU 4
|
||||
|
||||
/**
|
||||
* \def MBN_ENDMENU
|
||||
* \brief Sends when ending tracking popup menu.
|
||||
*/
|
||||
#define MBN_ENDMENU 5
|
||||
|
||||
/**
|
||||
* \def MBN_CLICKED
|
||||
* \brief Sends when the user clicked the menubutton but not active the menu.
|
||||
*/
|
||||
#define MBN_CLICKED 6
|
||||
|
||||
/** @} end of ctrl_menubutton_ncs */
|
||||
|
||||
/** @} end of ctrl_menubutton */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_MENUBUTTON_H */
|
||||
|
||||
470
include/ctrl/monthcal.h
Normal file
470
include/ctrl/monthcal.h
Normal file
@@ -0,0 +1,470 @@
|
||||
/**
|
||||
* \file monthcal.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2002/01/06
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software
|
||||
Copyright (C) 1998-2002 Wei Yongming
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: monthcal.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1998-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef EXT_MONTHCAL_H
|
||||
#define EXT_MONTHCAL_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_monthcal MonthCalendar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_MONTHCALENDAR
|
||||
* \brief The class name of monthcalendar control.
|
||||
*/
|
||||
#define CTRL_MONTHCALENDAR ("MonthCalendar")
|
||||
|
||||
/** Structure of the system time */
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
/** Year number of the date */
|
||||
int year;
|
||||
/** Month number of the date */
|
||||
int month;
|
||||
/** Day number of the date */
|
||||
int day;
|
||||
/** Weekday number of the date */
|
||||
int weekday;
|
||||
} SYSTEMTIME;
|
||||
/**
|
||||
* \var typedef SYSTEMTIME *PSYSTEMTIME;
|
||||
* \brief Data type of the pointer to a SYSTEMTIME.
|
||||
*/
|
||||
typedef SYSTEMTIME *PSYSTEMTIME;
|
||||
|
||||
/** Struture of the color info of the monthcalendar control */
|
||||
typedef struct _MCCOLORINFO
|
||||
{
|
||||
/** Color of the titile background */
|
||||
int clr_titlebk;
|
||||
/** Color of the titile text */
|
||||
int clr_titletext;
|
||||
/** Color of the arrow */
|
||||
int clr_arrow;
|
||||
/** Color of the hilighted arrow background*/
|
||||
int clr_arrowHibk;
|
||||
|
||||
/** Color of the week caption background */
|
||||
int clr_weekcaptbk;
|
||||
/** Color of the week caption text */
|
||||
int clr_weekcapttext;
|
||||
|
||||
/** Color of the day text background */
|
||||
int clr_daybk;
|
||||
/** Color of the hilighted day text background */
|
||||
int clr_dayHibk;
|
||||
/** Color of the day text */
|
||||
int clr_daytext;
|
||||
/** Color of the trailing day text */
|
||||
int clr_trailingtext;
|
||||
/** Color of the hilighted day text */
|
||||
int clr_dayHitext;
|
||||
} MCCOLORINFO;
|
||||
|
||||
/**
|
||||
* \var typedef MCCOLORINFO *PMCCOLORINFO;
|
||||
* \brief Data type of the pointer to a MCCOLORINFO.
|
||||
*/
|
||||
typedef MCCOLORINFO *PMCCOLORINFO;
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_monthcal_styles Styles of monthcalendar control
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* \def MCS_CHN
|
||||
* \brief Displays chinese label.
|
||||
*/
|
||||
#define MCS_CHN 0x0001L
|
||||
|
||||
/**
|
||||
* \def MCS_ENG_L
|
||||
* \brief Displays long english label.
|
||||
*/
|
||||
#define MCS_ENG_L 0x0002L
|
||||
|
||||
/**
|
||||
* \def MCS_ENG_S
|
||||
* \brief Displays short english label.
|
||||
*/
|
||||
#define MCS_ENG_S 0x0003L
|
||||
|
||||
/**
|
||||
* \def MCS_NOTIFY
|
||||
* \brief Notifies the parent window when something happens.
|
||||
*/
|
||||
#define MCS_NOTIFY 0x0004L
|
||||
|
||||
/**
|
||||
* \def MCS_NOYEARMON
|
||||
* \brief Do not show year and month.
|
||||
*/
|
||||
#define MCS_NOYEARMON 0x0008L
|
||||
|
||||
/** @} end of mgext_ctrl_monthcal_styles */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_monthcal_msgs Messages of monthcalendar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURDAY
|
||||
* \brief Gets the day number of the current selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURDAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The day number of the current selected date.
|
||||
*/
|
||||
#define MCM_GETCURDAY 0xF300
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURMONTH
|
||||
* \brief Gets the month number of the current selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURMONTH
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The month number of the current selected date.
|
||||
*/
|
||||
#define MCM_GETCURMONTH 0xF301
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURYEAR
|
||||
* \brief Gets the year number of the current selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURYEAR
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The year number of the current selected date.
|
||||
*/
|
||||
#define MCM_GETCURYEAR 0xF302
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURWEEKDAY
|
||||
* \brief Gets the weekday number of the current selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURWEEKDAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The weekday number of the current selected date.
|
||||
*/
|
||||
#define MCM_GETCURWEEKDAY 0xF303
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURMONLEN
|
||||
* \brief Gets the month length of the current selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURMONLEN
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The month length of the current selected date.
|
||||
*/
|
||||
#define MCM_GETCURMONLEN 0xF304
|
||||
|
||||
/**
|
||||
* \def MCM_SETCURDAY
|
||||
* \brief Changes the day of the currently selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_SETCURDAY
|
||||
* int newday;
|
||||
*
|
||||
* wParam = (WPARAM)newday;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param newday The new day number of the currently selected date.
|
||||
*/
|
||||
#define MCM_SETCURDAY 0xF305
|
||||
|
||||
/**
|
||||
* \def MCM_SETCURMONTH
|
||||
* \brief Changes the month of the currently selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_SETCURMONTH
|
||||
* int newmonth;
|
||||
*
|
||||
* wParam = (WPARAM)newmonth;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param newmonth The new month number of the currently selected date.
|
||||
*/
|
||||
#define MCM_SETCURMONTH 0xF306
|
||||
|
||||
/**
|
||||
* \def MCM_SETCURYEAR
|
||||
* \brief Changes the year of the currently selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_SETCURYEAR
|
||||
* int newyear;
|
||||
*
|
||||
* wParam = (WPARAM)newyear;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param newyear The new year number of the currently selected date.
|
||||
*/
|
||||
#define MCM_SETCURYEAR 0xF307
|
||||
|
||||
/**
|
||||
* \def MCM_SETTODAY
|
||||
* \brief Sets the currently selected date as the date of "today".
|
||||
*
|
||||
* \code
|
||||
* MCM_SETTODAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*/
|
||||
#define MCM_SETTODAY 0xF308
|
||||
|
||||
/**
|
||||
* \def MCM_GETFIRSTWEEKDAY
|
||||
* \brief Gets the weekday of the first day of this month.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETFIRSTWEEKDAY
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The weekday of the first day.
|
||||
*/
|
||||
#define MCM_GETFIRSTWEEKDAY 0xF309
|
||||
|
||||
/**
|
||||
* \def MCM_GETCURDATE
|
||||
* \brief Gets the currently selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCURDATE
|
||||
* PSYSTEMTIME pcurdate;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)pcurdate;
|
||||
* \endcode
|
||||
*
|
||||
* \param pcurdate Pointer to the SYSTEMTIME structure to retreive the date.
|
||||
*/
|
||||
#define MCM_GETCURDATE 0xF310
|
||||
|
||||
/**
|
||||
* \def MCM_GETTODAY
|
||||
* \brief Gets the date of "today".
|
||||
*
|
||||
* \code
|
||||
* MCM_GETTODAY
|
||||
* PSYSTEMTIME pcurdate;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)pcurdate;
|
||||
* \endcode
|
||||
*
|
||||
* \param pcurdate Pointer to the SYSTEMTIME structure to retreive the
|
||||
* date of "today".
|
||||
*/
|
||||
#define MCM_GETTODAY 0xF311
|
||||
|
||||
/**
|
||||
* \def MCM_GETMINREQRECTW
|
||||
* \brief Gets the minimum width required to display a full month in a month
|
||||
* calendar control.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETMINREQRECTW
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The minimum width required to dispaly a full month.
|
||||
*/
|
||||
#define MCM_GETMINREQRECTW 0xF312
|
||||
|
||||
/**
|
||||
* \def MCM_GETMINREQRECTH
|
||||
* \brief Gets the minimum height required to display a full month in a month
|
||||
* calendar control.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETMINREQRECTH
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The minimum height required to dispaly a full month.
|
||||
*/
|
||||
#define MCM_GETMINREQRECTH 0xF313
|
||||
|
||||
/**
|
||||
* \def MCM_SETCURDATE
|
||||
* \brief Sets the currently selected date.
|
||||
*
|
||||
* \code
|
||||
* MCM_SETCURDATE
|
||||
* PSYSTEMTIME pcurdate;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)pcurdate;
|
||||
* \endcode
|
||||
*
|
||||
* \param pcurdate Pointer to the SYSTEMTIME structure storing the values of
|
||||
* the current selected date.
|
||||
*/
|
||||
#define MCM_SETCURDATE 0xF314
|
||||
|
||||
/**
|
||||
* \def MCM_SETCOLOR
|
||||
* \brief Sets the color of the monthcalendar control.
|
||||
*
|
||||
* \code
|
||||
* MCM_SETCOLOR
|
||||
* PMCCOLORINFO newcolor;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)newcolor;
|
||||
* \endcode
|
||||
*
|
||||
* \param newcolor Pointer to the MCCOLORINFO structure storing the vaules of
|
||||
* the new color info.
|
||||
*/
|
||||
#define MCM_SETCOLOR 0xF315
|
||||
|
||||
/**
|
||||
* \def MCM_GETCOLOR
|
||||
* \brief Gets the color of the monthcalendar control.
|
||||
*
|
||||
* \code
|
||||
* MCM_GETCOLOR
|
||||
* PMCCOLORINFO color;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)color;
|
||||
* \endcode
|
||||
*
|
||||
* \param color Pointer to the MCCOLORINFO structure retreiving the color info.
|
||||
*/
|
||||
#define MCM_GETCOLOR 0xF316
|
||||
|
||||
/**
|
||||
* \def MCM_SETDAYCOLOR
|
||||
* \brief Sets the color of a specified date .
|
||||
*
|
||||
* \code
|
||||
* MCM_SETDAYCOLOR
|
||||
* int day;
|
||||
* int color;
|
||||
*
|
||||
* wParam = day;
|
||||
* lParam = color;
|
||||
* \endcode
|
||||
*
|
||||
* \param day Month day to set color
|
||||
* \param color Pixel color.
|
||||
*/
|
||||
#define MCM_SETDAYCOLOR 0xF317
|
||||
|
||||
/**
|
||||
* \def MCM_CLEARDAYCOLOR
|
||||
* \brief Clears the color of a specified month view .
|
||||
*
|
||||
* \code
|
||||
* MCM_CLEARDAYCOLOR
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*/
|
||||
#define MCM_CLEARDAYCOLOR 0xF318
|
||||
|
||||
|
||||
/** @} end of mgext_ctrl_monthcal_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_monthcal_ncs Notification codes of monthcalendar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def MCN_DATECHANGE
|
||||
* \brief Notifies that the currently selected date is changed.
|
||||
*/
|
||||
#define MCN_DATECHANGE 1
|
||||
/*#define MCN_DAYCHANGE 2 */
|
||||
#define MCN_DATECLK 3
|
||||
|
||||
/** @} end of mgext_ctrl_monthcal_ncs */
|
||||
|
||||
/** @} end of mgext_ctrl_monthcal */
|
||||
|
||||
/** @} end of controls */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXT_MONTHCAL_H */
|
||||
|
||||
386
include/ctrl/newtoolbar.h
Normal file
386
include/ctrl/newtoolbar.h
Normal file
@@ -0,0 +1,386 @@
|
||||
/**
|
||||
* \file newtoolbar.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: newtoolbar.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_NEWTOOLBAR_H
|
||||
#define _MGUI_CTRL_NEWTOOLBAR_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_newtoolbar NewToolBar control
|
||||
*
|
||||
* \note You should pass information of the control through
|
||||
* the argument \a dwAddData of \a CreateWindowEx function.
|
||||
*
|
||||
* \code
|
||||
* NTBINFO ntb_info;
|
||||
*
|
||||
* CreateWindowEx (CTRL_TOOLBAR, ..., (DWORD) &ntb_info);
|
||||
* \endcode
|
||||
*
|
||||
* \sa NTBINFO
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_NEWTOOLBAR
|
||||
* \brief The class name of newtoolbar control.
|
||||
*/
|
||||
#define CTRL_NEWTOOLBAR ("newtoolbar")
|
||||
|
||||
/** Structure of the newtoolbar control information */
|
||||
typedef struct _NTBINFO
|
||||
{
|
||||
/** Images for displaying tool bar item. */
|
||||
PBITMAP image;
|
||||
|
||||
/** Number of bitmap cells in the image. */
|
||||
int nr_cells;
|
||||
|
||||
/**
|
||||
* Number of cell columns in the image.
|
||||
* It should be one of the following values:
|
||||
* - 0, 4\n
|
||||
* Four rows, the cells have normal, highlight, pushed, and disabled states.
|
||||
* - 1\n
|
||||
* The cells have only normal state.
|
||||
* - 2\n
|
||||
* The cells have normal and highlight states.
|
||||
* - 3\n
|
||||
* The cells have normal, highlight, and pushed states.
|
||||
*/
|
||||
int nr_cols;
|
||||
|
||||
/**
|
||||
* Width of bitmap cell. If w_cell is zero, it will be
|
||||
* equal to (width_of_image / nr_cols).
|
||||
*/
|
||||
int w_cell;
|
||||
|
||||
/**
|
||||
* Height of bitmap cell. If h_cell is zero, it will be
|
||||
* equal to (height_of_image / nr_cells).
|
||||
*/
|
||||
int h_cell;
|
||||
|
||||
} NTBINFO;
|
||||
|
||||
/**
|
||||
* \var typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y)
|
||||
* \brief Type of the hotspot-clicked callback procedure.
|
||||
*
|
||||
* \param hwnd The handle to the control.
|
||||
* \param id The identifier of the button in the NewToolBar control.
|
||||
* \param cell The rectangle of the button in screen coordinates.
|
||||
* \param x The x-coordinate of the mouse down point.
|
||||
* \param y THe y-coordinate of the mouse down point.
|
||||
*/
|
||||
typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
|
||||
|
||||
/* Internal */
|
||||
#define NTB_TEXT_LEN 15
|
||||
/* Internal */
|
||||
#define NTB_TIP_LEN 255
|
||||
|
||||
#define NTBIF_PUSHBUTTON 0x0001
|
||||
#define NTBIF_HOTSPOTBUTTON 0x0002
|
||||
#define NTBIF_SEPARATOR 0x0003
|
||||
#define NTBIF_CHECKBUTTON 0x0005
|
||||
#define NTBIF_NEWLINE 0x0008
|
||||
#define NTBIF_TYPEMASK 0x000F
|
||||
|
||||
/**
|
||||
* \def NTBIF_DISABLED
|
||||
* \brief The item is disabled.
|
||||
*/
|
||||
#define NTBIF_DISABLED 0x0010
|
||||
/**
|
||||
* \def NTBIF_CHECKED
|
||||
* \brief The item is checked.
|
||||
*/
|
||||
#define NTBIF_CHECKED 0x0020
|
||||
|
||||
#define MTB_WHICH_FLAGS 0x0001
|
||||
#define MTB_WHICH_ID 0x0002
|
||||
#define MTB_WHICH_TEXT 0x0004
|
||||
#define MTB_WHICH_TIP 0x0008
|
||||
#define MTB_WHICH_CELL 0x0010
|
||||
#define MTB_WHICH_HOTSPOT 0x0020
|
||||
#define MTB_WHICH_ADDDATA 0x0040
|
||||
|
||||
/** Structure of the new toolbar item info */
|
||||
typedef struct _NTBITEMINFO
|
||||
{
|
||||
/**
|
||||
* Which fields are valid when sets/retrives the item information
|
||||
* (ignored when add item). It can be OR'd with the following values:
|
||||
*
|
||||
* - MTB_WHICH_FLAGS\n The flags is valid.
|
||||
* - MTB_WHICH_ID\n The identifier is valid.
|
||||
* - MTB_WHICH_TEXT\n The text is valid.
|
||||
* - MTB_WHICH_TIP\n The tip text is valid.
|
||||
* - MTB_WHICH_CELL\n The bitmap cell index is valid.
|
||||
* - MTB_WHICH_HOTSPOT\n The hotspot rect is valid.
|
||||
* - MTB_WHICH_ADDDATA\n The additional data is valid.
|
||||
*/
|
||||
DWORD which;
|
||||
|
||||
/**
|
||||
* Flags of the item. It can be OR'd with the following values:
|
||||
*
|
||||
* - NTBIF_PUSHBUTTON\n The item is a normal push button.
|
||||
* - NTBIF_CHECKBUTTON\n The item is a normal check button.
|
||||
* - NTBIF_NEWLINE\n The item is a newline tag.
|
||||
* - NTBIF_HOTSPOTBUTTON\n The item is a menu button with hotspot.
|
||||
* - NTBIF_SEPARATOR\n The item is a separator.
|
||||
* - NTBIF_DISABLED\n The item is disabled.
|
||||
*/
|
||||
DWORD flags;
|
||||
|
||||
/**
|
||||
* Identifier of the item. When the user clicked the item, this control
|
||||
* will send a notification message to the parent window
|
||||
* with the notification code to be equal to this identifier.
|
||||
*/
|
||||
int id;
|
||||
|
||||
/**
|
||||
* Text of the item. This text will be displayed under the bitmap
|
||||
* if the control have NTBS_WITHTEXT style.
|
||||
*/
|
||||
char* text;
|
||||
|
||||
/** Tooltip of the item, not used, reserved. */
|
||||
char* tip;
|
||||
|
||||
/** Index of bitmap cell. */
|
||||
int bmp_cell;
|
||||
|
||||
/** Hotpot-clicked callback procedure for menubutton. */
|
||||
HOTSPOTPROC hotspot_proc;
|
||||
|
||||
/** Rectangle region of hotspot in the cell. */
|
||||
RECT rc_hotspot;
|
||||
|
||||
/** Additional data of the item */
|
||||
DWORD add_data;
|
||||
} NTBITEMINFO;
|
||||
|
||||
/**
|
||||
* \var PNTBITEMINFO
|
||||
* \brief Data type of pointer to a NTBITEMINFO;
|
||||
*/
|
||||
typedef NTBITEMINFO* PNTBITEMINFO;
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_newtoolbar_styles Styles of NewToolBar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def NTBS_WITHTEXT
|
||||
* \brief Displays text with the item bitmap.
|
||||
*/
|
||||
#define NTBS_WITHTEXT 0x000000001L
|
||||
|
||||
/**
|
||||
* \def NTBS_TEXTRIGHT
|
||||
* \brief Displays text at the right side of the item bitmap.
|
||||
*/
|
||||
#define NTBS_TEXTRIGHT 0x000000002L
|
||||
|
||||
/**
|
||||
* \def NTBS_DRAWSTATES
|
||||
* \brief Draws the button states with 3D frame, and does not
|
||||
* use the highlight, pushed and disabled bitmap cell.
|
||||
*/
|
||||
#define NTBS_DRAWSTATES 0x000000004L
|
||||
|
||||
/**
|
||||
* \def NTBS_DRAWSEPARATOR
|
||||
* \brief Draws the separator bar.
|
||||
*/
|
||||
#define NTBS_DRAWSEPARATOR 0x000000008L
|
||||
|
||||
/**
|
||||
* \def NTBS_HORIZONTAL
|
||||
* \brief The NewToolbar will be displayed horizontally.
|
||||
*/
|
||||
#define NTBS_HORIZONTAL 0x00000000L
|
||||
|
||||
/**
|
||||
* \def NTBS_VERTICAL
|
||||
* \brief The NewToolbar will be displayed vertically.
|
||||
*/
|
||||
#define NTBS_VERTICAL 0x00000010L
|
||||
|
||||
/**
|
||||
*
|
||||
* \def NTBS_MULTLINE
|
||||
* \brief The Newtoolbar item will be displayed in several lines.
|
||||
* In this style , your should define the toolbar RECT in CreateWindwEx.
|
||||
*/
|
||||
#define NTBS_MULTLINE 0x00000020L
|
||||
|
||||
/** @} end of ctrl_newtoolbar_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_newtoolbar_msgs Messages of NewToolBar control
|
||||
* @{
|
||||
*/
|
||||
/** Newtoolbar return value */
|
||||
#define NTB_OKAY 0
|
||||
/** Newtoolbar return value */
|
||||
#define NTB_ERR (-1)
|
||||
/** Newtoolbar return value */
|
||||
#define NTB_ERR_SPACE (-2)
|
||||
/** Newtoolbar return value */
|
||||
#define NTB_ERR_DUPID (-3)
|
||||
|
||||
/**
|
||||
* \def NTBM_ADDITEM
|
||||
* \brief Adds an item to a newtoolbar.
|
||||
*
|
||||
* \code
|
||||
* NTBM_ADDITEM
|
||||
* NTBITEMINFO *ntbii;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)ntbii;
|
||||
* \endcode
|
||||
*
|
||||
* \param ntbii Pointer to the data storing the newtoobar item info.
|
||||
*
|
||||
* \return NTB_OKAY on success, else one of the following values:
|
||||
* - NTB_ERR_SPACE\n No enongh space to allocate memory for new item.
|
||||
* - NTB_ERR_DUPID\n Duplicated identifier with an existed item.
|
||||
*/
|
||||
#define NTBM_ADDITEM 0xFE00
|
||||
|
||||
/**
|
||||
* \def NTBM_GETITEM
|
||||
* \brief Retrives the information of an item in a newtoolbar control.
|
||||
*
|
||||
* \code
|
||||
* NTBM_GETITEM
|
||||
* int id;
|
||||
* NTBITEMINFO *ntbii;
|
||||
*
|
||||
* wParam = id;
|
||||
* lParam = (LPARAM)ntbii;
|
||||
* \endcode
|
||||
*
|
||||
* \param id The identifier of the item.
|
||||
* \param ntbii Pointer to the data storing the newtoobar item info.
|
||||
*
|
||||
* \return NTB_OKAY on success, else NTB_ERR.
|
||||
*/
|
||||
#define NTBM_GETITEM 0xFE01
|
||||
|
||||
/**
|
||||
* \def NTBM_SETITEM
|
||||
* \brief Sets the information of an item in a newtoolbar control.
|
||||
*
|
||||
* \code
|
||||
* NTBM_SETITEM
|
||||
* int id;
|
||||
* NTBITEMINFO ntbii;
|
||||
*
|
||||
* wParam = id;
|
||||
* lParam = (LPARAM)&ntbii;
|
||||
* \endcode
|
||||
*
|
||||
* \param id The identifier of the item.
|
||||
* \param ntbii The structure for storing the newtoobar item info.
|
||||
*
|
||||
* \return NTB_OKAY on success, else NTB_ERR.
|
||||
*/
|
||||
#define NTBM_SETITEM 0xFE02
|
||||
|
||||
/**
|
||||
* \def NTBM_ENABLEITEM
|
||||
* \brief Enables/Disables an item in a newtoolbar control.
|
||||
*
|
||||
* \code
|
||||
* NTBM_ENABLEITEM
|
||||
* int id;
|
||||
* BOOL enable;
|
||||
*
|
||||
* wParam = id;
|
||||
* lParam = enable;
|
||||
* \endcode
|
||||
*
|
||||
* \param id The identifier of the item.
|
||||
* \param enable True to enable item; false to disable item.
|
||||
*
|
||||
* \return NTB_OKAY on success, else NTB_ERR.
|
||||
*/
|
||||
#define NTBM_ENABLEITEM 0xFE03
|
||||
|
||||
/**
|
||||
* \def NTBM_SETBITMAP
|
||||
* \brief Sets the bitmap of a newtoolbar control.
|
||||
*
|
||||
* \code
|
||||
* NTBM_SETBITMAP
|
||||
* NTBINFO ntbi;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)&ntbi;
|
||||
* \endcode
|
||||
*
|
||||
* \param ntbi The structure for storing the newtoobar info.
|
||||
*
|
||||
* \return NTB_OKAY on success, else NTB_ERR.
|
||||
*/
|
||||
#define NTBM_SETBITMAP 0xFE04
|
||||
|
||||
|
||||
#define NTBM_MSGMAX 0xFE10
|
||||
|
||||
/** @} end of ctrl_newtoolbar_msgs */
|
||||
|
||||
/** @} end of ctrl_newtoolbar */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_NEWTOOLBAR_H */
|
||||
|
||||
217
include/ctrl/progressbar.h
Normal file
217
include/ctrl/progressbar.h
Normal file
@@ -0,0 +1,217 @@
|
||||
/**
|
||||
* \file progressbar.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: progressbar.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_PROGRESSBAR_H
|
||||
#define _MGUI_CTRL_PROGRESSBAR_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_progbar ProgressBar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_PROGRESSBAR
|
||||
* \brief The class name of progressbar control.
|
||||
*/
|
||||
#define CTRL_PROGRESSBAR ("progressbar")
|
||||
/** Progressbar return value */
|
||||
#define PB_OKAY 0
|
||||
/** Progressbar return value */
|
||||
#define PB_ERR -1
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_progbar_styles Styles of progressbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def PBS_NOTIFY
|
||||
* \brief Notifies the parent window.
|
||||
*
|
||||
* Sends the parent window notification messages when
|
||||
* the user clicks or double-clicks the control.
|
||||
*/
|
||||
#define PBS_NOTIFY 0x0001L
|
||||
|
||||
/**
|
||||
* \def PBS_VERTICAL
|
||||
* \brief Creates progressbar vertically.
|
||||
*/
|
||||
#define PBS_VERTICAL 0x0002L
|
||||
|
||||
/** @} end of ctrl_progbar_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_progbar_msgs Messages of progressbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def PBM_SETRANGE
|
||||
* \brief Sets the limits of the range.
|
||||
*
|
||||
* Sets the upper and lower limits of the progress bar control's range,
|
||||
* and redraws the bar to reflect the new ranges.
|
||||
*
|
||||
* \code
|
||||
* PBM_SETRANGE
|
||||
* int min, max;
|
||||
*
|
||||
* wParam = (WPARAM)min;
|
||||
* lParam = (LPARAM)max;
|
||||
* \endcode
|
||||
*
|
||||
* \param min The lower limit of the progress bar.
|
||||
* \param max The upper limit of the progress bar.
|
||||
*
|
||||
* \return PB_OKAY on success, else PB_ERR.
|
||||
*/
|
||||
#define PBM_SETRANGE 0xF0A0
|
||||
|
||||
/**
|
||||
* \def PBM_SETSTEP
|
||||
* \brief Specifies the step increment for a progress bar control.
|
||||
*
|
||||
* \code
|
||||
* PBM_SETSTEP
|
||||
* int stepinc;
|
||||
*
|
||||
* wParam = (WPARAM)stepinc;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param stepinc Step increment for a progress bar control.
|
||||
* \return PB_OKAY on success, else PB_ERR.
|
||||
*/
|
||||
#define PBM_SETSTEP 0xF0A1
|
||||
|
||||
/**
|
||||
* \def PBM_SETPOS
|
||||
* \brief Sets the progress bar control's current position.
|
||||
*
|
||||
* Sets the progress bar control's current position as specified by nPos,
|
||||
* and redraw the bar to reflect the new position.
|
||||
*
|
||||
* \code
|
||||
* PBM_SETPOS
|
||||
* int nPos;
|
||||
*
|
||||
* wParam = (WPARAM)nPos;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param nPos The progress bar control's current position.
|
||||
* \return Always be PB_OKAY.
|
||||
*/
|
||||
#define PBM_SETPOS 0xF0A2
|
||||
|
||||
/**
|
||||
* \def PBM_DELTAPOS
|
||||
* \brief Advances the progress bar control's current position.
|
||||
*
|
||||
* Advances the progress bar control's current position as specified by posInc,
|
||||
* and redraw the bar to reflect the new position.
|
||||
*
|
||||
* \code
|
||||
* PBM_DELTAPOS
|
||||
* int posInc;
|
||||
*
|
||||
* wParam = (WPARAM)posInc;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param posInc The progress bar control's position increment.
|
||||
* \return Always be PB_OKAY.
|
||||
*/
|
||||
#define PBM_DELTAPOS 0xF0A3
|
||||
|
||||
/**
|
||||
* \def PBM_STEPIT
|
||||
* \brief Advances the current position by the step increment.
|
||||
*
|
||||
* Advances the current position for a progress bar control by
|
||||
* the step increment, and redraw the bar to reflect the new position.
|
||||
*
|
||||
* \code
|
||||
* PBM_STEPIT
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be PB_OKAY.
|
||||
*/
|
||||
#define PBM_STEPIT 0xF0A4
|
||||
|
||||
#define PBM_MSGMAX 0xF0B0
|
||||
|
||||
/** @} end of ctrl_progbar_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_progbar_ncs Notification codes of progressbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def PBN_REACHMAX
|
||||
* \brief Notifies reach of maximum limit.
|
||||
*
|
||||
* The PBN_REACHMAX notification code is sent when the progressbar reachs its maximum limit.
|
||||
*/
|
||||
#define PBN_REACHMAX 1
|
||||
|
||||
/**
|
||||
* \def PBN_REACHMIN
|
||||
* \brief Notifies reach of minimum limit.
|
||||
*
|
||||
* The PBN_REACHMIN notification code is sent when the progressbar reachs its minimum limit.
|
||||
*/
|
||||
#define PBN_REACHMIN 2
|
||||
|
||||
/** @} end of ctrl_progbar_ncs */
|
||||
|
||||
/** @} end of ctrl_progbar */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_PROGRESSBAR_H */
|
||||
|
||||
380
include/ctrl/propsheet.h
Normal file
380
include/ctrl/propsheet.h
Normal file
@@ -0,0 +1,380 @@
|
||||
/**
|
||||
* \file propsheet.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: propsheet.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_PROPSHEET_H
|
||||
#define _MGUI_CTRL_PROPSHEET_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_propsheet PropertySheet control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_PROPSHEET
|
||||
* \brief The class name of propsheet control.
|
||||
*/
|
||||
#define CTRL_PROPSHEET ("propsheet")
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_propsheet_styles Styles of propertysheet control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def PSS_SIMPLE
|
||||
* \brief A simple property sheet control. All tabs of the control
|
||||
* will have the same width.
|
||||
*/
|
||||
#define PSS_SIMPLE 0x0000L
|
||||
|
||||
/**
|
||||
* \def PSS_COMPACTTAB
|
||||
* \brief Compact tab style. The width of a tab is adaptive to the tab title.
|
||||
*/
|
||||
#define PSS_COMPACTTAB 0x0001L
|
||||
|
||||
/**
|
||||
* \def PSS_SCROLLABLE
|
||||
* \brief Tabs can be scrolled by scroll button.
|
||||
*/
|
||||
#define PSS_SCROLLABLE 0x0002L
|
||||
|
||||
/**
|
||||
* \def PSS_BOTTOM
|
||||
* \brief Bottom tab style. Tabs will be located at the bottom of
|
||||
* the property sheet.
|
||||
*/
|
||||
#define PSS_BOTTOM 0x0010L
|
||||
|
||||
/** @} end of ctrl_propsheet_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_propsheet_msgs Messages of propertysheet control
|
||||
* @{
|
||||
*/
|
||||
/** Propsheet return value */
|
||||
#define PS_OKAY 0
|
||||
/** Propsheet return value */
|
||||
#define PS_ERR (-1)
|
||||
|
||||
/**
|
||||
* \def PSM_GETACTIVEPAGE
|
||||
* \brief Gets the handle of current active page.
|
||||
*
|
||||
* Sends this message to retreive the propsheet window's active page.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETACTIVEPAGE
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The handle to the active page; HWND_INVALID if no such a page.
|
||||
*/
|
||||
#define PSM_GETACTIVEPAGE 0xF1C0L
|
||||
|
||||
/**
|
||||
* \def PSM_SETACTIVEINDEX
|
||||
* \brief Changes the active page by index.
|
||||
*
|
||||
* Sends this message to change the propsheet window's active page.
|
||||
*
|
||||
* \code
|
||||
* PSM_SETACTIVEINDEX
|
||||
* int page;
|
||||
*
|
||||
* wParam = (WPARAM)page;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param page Index of the page to set.
|
||||
*
|
||||
* \return PS_OKAY on success, otherwise PS_ERR.
|
||||
*/
|
||||
#define PSM_SETACTIVEINDEX 0xF1C2L
|
||||
|
||||
/**
|
||||
* \def PSM_GETPAGE
|
||||
* \brief Gets the handle of a page by index.
|
||||
*
|
||||
* Sends this message to retreive the handle to a page by index.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETPAGE
|
||||
* int index;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index of the page.
|
||||
*
|
||||
* \return The handle to the page; HWND_INVALID if no such a page.
|
||||
*/
|
||||
#define PSM_GETPAGE 0xF1C3L
|
||||
|
||||
/**
|
||||
* \def PSM_GETACTIVEINDEX
|
||||
* \brief Gets the index of the current active page.
|
||||
*
|
||||
* Sends this message to retreive the index of the propsheet window's active page.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETACTIVEINDEX
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The index number of the active page.
|
||||
*/
|
||||
#define PSM_GETACTIVEINDEX 0xF1C4L
|
||||
|
||||
/**
|
||||
* \def PSM_GETPAGEINDEX
|
||||
* \brief Gets the index of a page by handle.
|
||||
*
|
||||
* Sends this message to retreive the index to a page by handle.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETPAGEINDEX
|
||||
* HWND hwnd;
|
||||
*
|
||||
* wParam = hwnd;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param hwnd The handle of the page.
|
||||
*
|
||||
* \return The index of the page; PS_ERR if no such a page.
|
||||
*/
|
||||
#define PSM_GETPAGEINDEX 0xF1C5L
|
||||
|
||||
/**
|
||||
* \def PSM_GETPAGECOUNT
|
||||
* \brief Gets the number of pages of the propsheet.
|
||||
*
|
||||
* Sends this message to retreive the number of pages currently in the propsheet.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETPAGECOUNT
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The number of pages in the propsheet.
|
||||
*/
|
||||
#define PSM_GETPAGECOUNT 0xF1C6L
|
||||
|
||||
/**
|
||||
* \def PSM_GETTITLELENGTH
|
||||
* \brief Gets the length of a page title.
|
||||
*
|
||||
* Sends this message to retreive the title length of a page.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETTITLELENGTH
|
||||
* int index;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index number of the page in the propsheet.
|
||||
*
|
||||
* \return The length of the page in the propsheet; PS_ERR if no such a page.
|
||||
*/
|
||||
#define PSM_GETTITLELENGTH 0xF1C7L
|
||||
|
||||
/**
|
||||
* \def PSM_GETTITLE
|
||||
* \brief Gets a page title.
|
||||
*
|
||||
* Sends this message to retreive the title of a page.
|
||||
*
|
||||
* \code
|
||||
* PSM_GETTITLE
|
||||
* int index;
|
||||
* char *buffer;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = (LPARAM)buffer;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index number of the page in the propsheet.
|
||||
* \param buffer The buffer storing the title string.
|
||||
*
|
||||
* \return PS_OKAY on success; PS_ERR if no such a page.
|
||||
*/
|
||||
#define PSM_GETTITLE 0xF1C8L
|
||||
|
||||
/**
|
||||
* \def PSM_SETTITLE
|
||||
* \brief Sets a page title.
|
||||
*
|
||||
* Sends this message to specify the title of a page.
|
||||
*
|
||||
* \code
|
||||
* PSM_SETTITLE
|
||||
* int index;
|
||||
* char *buffer;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = (LPARAM)buffer;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index number of the page in the propsheet.
|
||||
* \param buffer The string buffer storing the title.
|
||||
*
|
||||
* \return PS_OKAY on success; PS_ERR if no such a page.
|
||||
*/
|
||||
#define PSM_SETTITLE 0xF1C9L
|
||||
|
||||
/**
|
||||
* \def PSM_ADDPAGE
|
||||
* \brief Adds a page to the propsheet.
|
||||
*
|
||||
* Sends this message to add a page to the propsheet.
|
||||
*
|
||||
* \code
|
||||
* PSM_ADDPAGE
|
||||
* DLGTEMPLATE *dlg_tmpl;
|
||||
* WNDPROC proc;
|
||||
*
|
||||
* wParam = (WPARAM)dlg_tmpl;
|
||||
* lParam = (LPARAM)proc;
|
||||
* \endcode
|
||||
*
|
||||
* \param hdlg The handle of the page window to be added in the propsheet.
|
||||
* \param proc The window callback procedure of the page window.
|
||||
* Note that the procedure should call DefaultPageProc function
|
||||
* by default.
|
||||
*
|
||||
* \return The index of the page added on success; PS_ERR on error.
|
||||
*/
|
||||
#define PSM_ADDPAGE 0xF1D0L
|
||||
|
||||
/**
|
||||
* \def PSM_REMOVEPAGE
|
||||
* \brief Removes a page from the propsheet.
|
||||
*
|
||||
* Sends this message to remove a page from the propsheet and destroys the
|
||||
* associated controls.
|
||||
*
|
||||
* \code
|
||||
* PSM_REMOVEPAGE
|
||||
* int index;
|
||||
*
|
||||
* wParam = (WPARAM)index;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param index The index number of the page to be removed from the propsheet.
|
||||
*
|
||||
* \return If success, return PS_OKAY, otherwise PS_ERR.
|
||||
*/
|
||||
#define PSM_REMOVEPAGE 0xF1D1L
|
||||
|
||||
/**
|
||||
* \def PSM_SHEETCMD
|
||||
* \brief Sends a MSG_SHEETCMD message to all pages in the propsheet.
|
||||
*
|
||||
* If you send MSG_SHEETCMD message to the propsheet control, the control
|
||||
* will broadcast the message to all pages it contains. The page callback
|
||||
* procedure will receive the message and handle it. If one page return non-zero
|
||||
* value, the broadcast will be broken and the message will return a value
|
||||
* indicating which page returned error. The value will be equal to the page index
|
||||
* plus one.
|
||||
*
|
||||
* The PSM_SHEETCMD can be used by property sheet window, i.e., the container
|
||||
* of the property pages. The sheet can create three buttons, like
|
||||
* "Ok", "Cancel", and "Apply". When the user clicked the "Apply" or "Ok"
|
||||
* button, it can send a PSM_SHEETCMD message to the propsheet control, the
|
||||
* control will then send the message to all pages to notify pages to apply
|
||||
* the changes made by the user. If there are some errors, the page can return
|
||||
* a non-zero value to indicate an invalid chage so that the sheet can stop
|
||||
* to close the sheet window. You can tell the pages which action should
|
||||
* be taken by passing a value through the WPARAM parameter of the message.
|
||||
*
|
||||
* \code
|
||||
* PSM_SHEETCMD
|
||||
* WPARAM wParam;
|
||||
* LPARAM lParam;
|
||||
*
|
||||
* wParam = (WPARAM)wParam;
|
||||
* lParam = (LPARAM)lParam;
|
||||
* \endcode
|
||||
*
|
||||
* \param wParam The WPARAM parameter of the MSG_SHEETCMD message.
|
||||
* \param lParam The LPARAM parameter of the MSG_SHEETCMD message.
|
||||
*
|
||||
* \return The message has been broken by a page, the value will be
|
||||
* (page_index + 1); Zero indicates no page asserts an error.
|
||||
*/
|
||||
#define PSM_SHEETCMD 0xF1D2L
|
||||
|
||||
#define PSM_MSGMAX 0xF1E0L
|
||||
|
||||
/** @} end of ctrl_propsheet_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_propsheet_ncs Notification codes of propertysheet control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def PSN_ACTIVE_CHANGED
|
||||
* \brief Notifies the parent window that the active page of
|
||||
* the propsheet has been changed.
|
||||
*/
|
||||
#define PSN_ACTIVE_CHANGED 0x01
|
||||
|
||||
/** @} end of ctrl_propsheet_ncs */
|
||||
|
||||
/** @} end of ctrl_propsheet */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_PROPSHEET_H */
|
||||
|
||||
306
include/ctrl/scrollbar.h
Normal file
306
include/ctrl/scrollbar.h
Normal file
@@ -0,0 +1,306 @@
|
||||
/**
|
||||
* \file scrollbar.h
|
||||
* \author wangjian <wangjian@minigui.org>
|
||||
* \date 2008/01/17
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: scrollbar.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_SCROLLBAR_H
|
||||
#define _MGUI_CTRL_SCROLLBAR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_scrollbar ScrollBar control
|
||||
*
|
||||
* \note The scrollbar is not implemented as a control in current version.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_SCROLLBAR
|
||||
* \brief The class name of scrollbar control.
|
||||
*/
|
||||
#define CTRL_SCROLLBAR ("scrollbar")
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_scrollbar_styles Styles of scrollbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def SBS_HORZ
|
||||
* \brief Create a horizontal scrollbar.
|
||||
*/
|
||||
#define SBS_HORZ 0x1000
|
||||
|
||||
/**
|
||||
* \def SBS_VERT
|
||||
* \brief Create a vertical scrollbar.
|
||||
*/
|
||||
#define SBS_VERT 0x2000
|
||||
|
||||
/**
|
||||
* \def SBS_BOTTOMALIGN
|
||||
* \brief Create a horizontal scrollbar on the bottom of the rect.
|
||||
*
|
||||
* \note This style must be used together with SBS_HORZ, and the height of the
|
||||
* scrollbar will depend on the window elements or renderer.
|
||||
*/
|
||||
#define SBS_BOTTOMALIGN 0x0001
|
||||
|
||||
/**
|
||||
* \def SBS_TOPALIGN
|
||||
* \brief Create a horizontal scrollbar on the top of the rect.
|
||||
*
|
||||
* \note This style must be used together with SBS_HORZ, and the height of the
|
||||
* scrollbar will depend on the window elements or renderer.
|
||||
*/
|
||||
#define SBS_TOPALIGN 0x0002
|
||||
|
||||
/**
|
||||
* \def SBS_LEFTALIGN
|
||||
* \brief Create a vertical scrollbar on the left of the rect.
|
||||
*
|
||||
* \note This style must be used together with SBS_VERT, and the width of the
|
||||
* scrollbar will depend on the window elements or renderer.
|
||||
*/
|
||||
#define SBS_LEFTALIGN 0x0001
|
||||
|
||||
/**
|
||||
* \def SBS_RIGHTALIGN
|
||||
* \brief Create a vertical scrollbar on the right of the rect.
|
||||
*
|
||||
* \note This style must be used together with SBS_VERT, and the width of the
|
||||
* scrollbar will depend on the window elements or renderer.
|
||||
*/
|
||||
#define SBS_RIGHTALIGN 0x0002
|
||||
|
||||
/**
|
||||
* \def SBS_NOARROW
|
||||
* \brief Create a vertical scrollbar with no arrow.
|
||||
*
|
||||
* \note This style must't be used together with SBS_NOSHAFT.
|
||||
*/
|
||||
#define SBS_NOARROW 0x0004
|
||||
|
||||
/**
|
||||
* \def SBS_NOSHAFT
|
||||
* \brief Create a vertical scrollbar with no shaft.
|
||||
*
|
||||
* \note This style must't be used together with SBS_NOARROWS.
|
||||
*/
|
||||
#define SBS_NOSHAFT 0x0008
|
||||
|
||||
/**
|
||||
* \def SBS_FIXEDBARLEN
|
||||
* \brief Create a scrollbar with fixed thumb.
|
||||
*
|
||||
*/
|
||||
#define SBS_FIXEDBARLEN 0x0010
|
||||
|
||||
/**
|
||||
* \def SBS_NOTNOTIFYPARENT
|
||||
* \brief send notification code with SendNotifyMessage instead of NotifyParent
|
||||
*
|
||||
*/
|
||||
#define SBS_NOTNOTIFYPARENT 0x0020
|
||||
|
||||
/** @} end of ctrl_scrollbar_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_scrollbar_msgs Messages of scrollbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def SBM_GETSCROLLINFO
|
||||
* \brief Get the scroll information of the scrollbar.
|
||||
*
|
||||
*/
|
||||
#define SBM_GETSCROLLINFO 0xF0E0
|
||||
|
||||
/**
|
||||
* \def SBM_SETSCROLLINFO
|
||||
* \brief Set the scroll information of the scrollbar.
|
||||
*/
|
||||
#define SBM_SETSCROLLINFO 0xF0E1
|
||||
|
||||
/**
|
||||
* \def SBM_GETPOS
|
||||
* \brief Get the thumb pos of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_GETPOS message to get the start position
|
||||
* of the scrollbar thumb.
|
||||
*
|
||||
* \code
|
||||
* SBM_GETPOS
|
||||
* int pos;
|
||||
*
|
||||
* pos = SendMessage (hwnd_scrollbar, SBM_GETPOS, 0, 0);
|
||||
* \endcode
|
||||
*
|
||||
* \return the postion of the thumb.
|
||||
*/
|
||||
#define SBM_GETPOS 0xF0E2
|
||||
|
||||
/**
|
||||
* \def SBM_SETPOS
|
||||
* \brief Set the thumb pos of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_SETPOS message to set the start position
|
||||
* of the scrollbar thumb.
|
||||
*
|
||||
* \code
|
||||
* SBM_SETPOS
|
||||
* int pos = 10;
|
||||
* BOOL redraw = TRUE;
|
||||
*
|
||||
* wParam = (WPARAM)pos;
|
||||
* lParam = (LPARAM)redraw;
|
||||
* SendMessage (hwnd_scrollbar, SBM_SETPOS, wParam, lParam);
|
||||
* \endcode
|
||||
*
|
||||
* \param pos The new positon of the thumb to set.
|
||||
* \param redraw Whether to repaint the control, TRUE for repaint, FALSE for not.
|
||||
*
|
||||
* \return the old postion of the thumb.
|
||||
*/
|
||||
#define SBM_SETPOS 0xF0E3
|
||||
|
||||
/**
|
||||
* \def SBM_GETRANGE
|
||||
* \brief Get the range of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_GETRANGE message to get the move
|
||||
* range of the scrollbar.
|
||||
*
|
||||
* \code
|
||||
* SBM_GETRANGE
|
||||
* int range;
|
||||
*
|
||||
* range = SendMessage (hwnd_scrollbar, SBM_GETRANGE, 0, 0);
|
||||
* \endcode
|
||||
*
|
||||
* \return the range of the scrollbar.
|
||||
*/
|
||||
#define SBM_GETRANGE 0xF0E4
|
||||
|
||||
/**
|
||||
* \def SBM_SETRANGE
|
||||
* \brief Set the range of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_SETRANGE message to set the move
|
||||
* range of the scrollbar.
|
||||
*
|
||||
* \code
|
||||
* SBM_SETRANGE
|
||||
* int min = 0;
|
||||
* int max = 100;
|
||||
*
|
||||
* wParam = (WPARAM)min;
|
||||
* lParam = (LPARAM)max;
|
||||
* SendMessage (hwnd_scrollbar, SBM_SETRANGE, wParam, lParam);
|
||||
* \endcode
|
||||
*
|
||||
* \param min The minimum value of the range to set.
|
||||
* \param max The maximum value of the range to set.
|
||||
*
|
||||
* \note this message will not redraw the control.
|
||||
*/
|
||||
#define SBM_SETRANGE 0xF0E5
|
||||
|
||||
/**
|
||||
* \def SBM_SETRANGEREDRAW
|
||||
* \brief Set the range of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_SETRANGEREDRAW message to set the move
|
||||
* range of the scrollbar and redraw the control.
|
||||
*
|
||||
* \code
|
||||
* SBM_SETRANGEREDRAW
|
||||
* int min = 0;
|
||||
* int max = 100;
|
||||
*
|
||||
* wParam = (WPARAM)min;
|
||||
* lParam = (LPARAM)max;
|
||||
* SendMessage (hwnd_scrollbar, SBM_SETRANGEREDRAW, wParam, lParam);
|
||||
* \endcode
|
||||
*
|
||||
* \param min The minimum value of the range to set.
|
||||
* \param max The maximum value of the range to set.
|
||||
*
|
||||
* \note this message will redraw the control.
|
||||
*/
|
||||
#define SBM_SETRANGEREDRAW 0xF0E6
|
||||
|
||||
/**
|
||||
* \def SBM_ENABLE_ARROW
|
||||
* \brief Enable or disable the arrow of the scrollbar.
|
||||
*
|
||||
* An application sends a SBM_ENABLE_ARROW message to enable or disable
|
||||
* the arrow button of the scrollbar.
|
||||
*
|
||||
* \code
|
||||
* SBM_ENABLE_ARROW
|
||||
* int which = SB_ARROW_LTUP;
|
||||
* BOOL is_active;
|
||||
*
|
||||
* wParam = (WPARAM)which;
|
||||
* lParam = (LPARAM)is_active;
|
||||
* SendMessage (hwnd_scrollbar, SBM_ENABLE_ARROW, wParam, lParam);
|
||||
* \endcode
|
||||
*
|
||||
* \param which the part of the scrollbar to enable or disable,
|
||||
* can be one of the follow value:
|
||||
* - SB_ARROW_LTUP\n
|
||||
* the left or up arrow button.
|
||||
* - SB_ARROW_BTDN\n
|
||||
* the right or down arrow button.
|
||||
* - SB_ARROW_BOTH\n
|
||||
* all the arrow button.
|
||||
* \param is_active TRUE for enable ,FALSE for disable.
|
||||
*
|
||||
*/
|
||||
#define SBM_ENABLE_ARROW 0xF0E7
|
||||
|
||||
/** @} end of ctrl_scrollbar_msgs */
|
||||
|
||||
/** @} end of ctrl_scrollbar */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_SCROLLBAR_H */
|
||||
|
||||
1097
include/ctrl/scrollview.h
Normal file
1097
include/ctrl/scrollview.h
Normal file
File diff suppressed because it is too large
Load Diff
336
include/ctrl/spinbox.h
Normal file
336
include/ctrl/spinbox.h
Normal file
@@ -0,0 +1,336 @@
|
||||
/**
|
||||
* \file spinbox.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2002/01/06
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software
|
||||
Copyright (C) 1998-2002 Wei Yongming
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: spinbox.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1998-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef EXT_SPINBOX_H
|
||||
#define EXT_SPINBOX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_spinbox SpinBox control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_SPINBOX
|
||||
* \brief The class name of spinbox control.
|
||||
*/
|
||||
#define CTRL_SPINBOX ("SpinBox")
|
||||
|
||||
/** Structure of the spinbox info */
|
||||
typedef struct _SPININFO
|
||||
{
|
||||
/** Maximum position value */
|
||||
int max;
|
||||
/** Minimum position value */
|
||||
int min;
|
||||
/** Current position value */
|
||||
int cur;
|
||||
} SPININFO;
|
||||
/**
|
||||
* \var typedef SPININFO *PSPININFO;
|
||||
* \brief Data type of the pointer to a SPININFO.
|
||||
*/
|
||||
typedef SPININFO *PSPININFO;
|
||||
|
||||
/**
|
||||
* \fn void GetSpinBoxSize (DWORD dwStyle, int* w, int* h)
|
||||
* \brief Gets size of a vertical spin box control.
|
||||
*
|
||||
* The spin box control in MiniGUI has fixed size.
|
||||
* This function gets the size of a spin box control.
|
||||
*
|
||||
* \param dwStyle The style of the spin box.
|
||||
* \param w The width of the spin box control will be returned through this argument.
|
||||
* \param h The height of the spin box control will be returned through this argument.
|
||||
*/
|
||||
void GetSpinBoxSize (DWORD dwStyle, int* w, int* h);
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_spinbox_styles Styles of spinbox control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def SPS_AUTOSCROLL
|
||||
* \brief The spinbox control can automatically scroll,
|
||||
* and disable itself when reach maximal or minimal value.
|
||||
*/
|
||||
#define SPS_AUTOSCROLL 0x00000001L
|
||||
|
||||
/**
|
||||
* \def SPS_HORIZONTAL
|
||||
* \brief The spinbox control is horizontal. The default is vertical.
|
||||
*/
|
||||
#define SPS_HORIZONTAL 0x00000010L
|
||||
|
||||
/**
|
||||
* \def SPS_TYPE_NORMAL
|
||||
* \brief The spinbox control contains the up and left arrows.
|
||||
*/
|
||||
#define SPS_TYPE_NORMAL 0x00000000L
|
||||
|
||||
/**
|
||||
* \def SPS_TYPE_UPARROW
|
||||
* \brief The spinbox control contains only the up/left arrow.
|
||||
*/
|
||||
#define SPS_TYPE_UPARROW 0x00000100L
|
||||
|
||||
/**
|
||||
* \def SPS_TYPE_DOWNARROW
|
||||
* \brief The spinbox control contains only the down/right arrow.
|
||||
*/
|
||||
#define SPS_TYPE_DOWNARROW 0x00000200L
|
||||
|
||||
/**
|
||||
* \def SPS_TYPE_MASK
|
||||
* \brief The mask code of spinbox control.
|
||||
*/
|
||||
#define SPS_TYPE_MASK 0x00000F00L
|
||||
|
||||
/** @} end of mgext_ctrl_spinbox_styles */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_spinbox_msgs Messages of spinbox control
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* \def KS_SPINPOST
|
||||
* \brief The flag of the spinbox control message.
|
||||
*/
|
||||
#define KS_SPINPOST 0x00010000
|
||||
|
||||
/**
|
||||
* \def SPM_SETTARGET
|
||||
* \brief Sets the target window of the spinbox.
|
||||
*
|
||||
* When the user click the up/left or down/right arrow of the spin box, it will
|
||||
* emulate the down and up of the key SCANCODE_CURSORBLOCKUP or
|
||||
* SCANCODE_CURSORBLOCKDOWN, and post MSG_KEYDOWN and MSG_KEYUP
|
||||
* message to the target window. Note that the shifit key status of the
|
||||
* message will have the flag KS_SPINPOST set.
|
||||
*
|
||||
* \code
|
||||
* SPM_SETTARGET
|
||||
* HWND hTarget;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)hTarget;
|
||||
* \endcode
|
||||
*
|
||||
* \param hTarget Handle of the target window.
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define SPM_SETTARGET 0xF300
|
||||
|
||||
/**
|
||||
* \def SPM_GETTARGET
|
||||
* \brief Gets the target window of the spinbox.
|
||||
*
|
||||
* \code
|
||||
* SPM_GETTARGET
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The handle to the target window.
|
||||
*/
|
||||
#define SPM_GETTARGET 0xF301
|
||||
|
||||
/**
|
||||
* \def SPM_SETINFO
|
||||
* \brief Sets the parameter information of the spinbox.
|
||||
*
|
||||
* \code
|
||||
* SPM_SETINFO
|
||||
* PSPININFO newinfo;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)newinfo;
|
||||
* \endcode
|
||||
*
|
||||
* \param newinfo Pointer to the SPININFO structure storing the new spinbox info.
|
||||
*
|
||||
* \return Zero on success, -1 to indicate invalid parameter.
|
||||
*
|
||||
* \sa SPININFO
|
||||
*/
|
||||
#define SPM_SETINFO 0xF302
|
||||
|
||||
/**
|
||||
* \def SPM_GETINFO
|
||||
* \brief Gets the parameter infos of the spinbox.
|
||||
*
|
||||
* \code
|
||||
* SPM_GETINFO
|
||||
* PSPININFO info;
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = (LPARAM)info;
|
||||
* \endcode
|
||||
*
|
||||
* \param info Pointer to the SPININFO structure retreiving the spinbox info.
|
||||
*
|
||||
* \return Zero on success, -1 to indicate invalid parameter.
|
||||
*
|
||||
* \sa SPININFO
|
||||
*/
|
||||
#define SPM_GETINFO 0xF303
|
||||
|
||||
/**
|
||||
* \def SPM_DISABLEUP
|
||||
* \brief Disable the ability to scroll up.
|
||||
*
|
||||
* \code
|
||||
* SPM_DISABLEUP
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define SPM_DISABLEUP 0xF304
|
||||
|
||||
/**
|
||||
* \def SPM_DISABLEDOWN
|
||||
* \brief Disable the ability to scroll down.
|
||||
*
|
||||
* \code
|
||||
* SPM_DISABLEDOWN
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define SPM_DISABLEDOWN 0xF305
|
||||
|
||||
/**
|
||||
* \def SPM_ENABLEUP
|
||||
* \brief Enable the ability to scroll up.
|
||||
*
|
||||
* \code
|
||||
* SPM_ENABLEUP
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define SPM_ENABLEUP 0xF306
|
||||
|
||||
/**
|
||||
* \def SPM_ENABLEDOWN
|
||||
* \brief Enable the ability to scroll down.
|
||||
*
|
||||
* \code
|
||||
* SPM_ENABLEDOWN
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define SPM_ENABLEDOWN 0xF307
|
||||
|
||||
/**
|
||||
* \def SPM_SETCUR
|
||||
* \brief Sets the current position in the range of the spinbox.
|
||||
*
|
||||
* \code
|
||||
* SPM_SETCUR
|
||||
* int pos;
|
||||
*
|
||||
* wParam = (WPARAM)pos;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param pos The current position to set.
|
||||
*
|
||||
* \return Zero on success, -1 to indicate invalid parameter.
|
||||
*/
|
||||
#define SPM_SETCUR 0xF308
|
||||
|
||||
/**
|
||||
* \def SPM_GETCUR
|
||||
* \brief Gets the current position in the range of the spinbox.
|
||||
*
|
||||
* \code
|
||||
* SPM_GETCUR
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current position in the range of the spinbox.
|
||||
*/
|
||||
#define SPM_GETCUR 0xF309
|
||||
|
||||
/** @} end of mgext_ctrl_spinbox_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup mgext_ctrl_spinbox_ncs Notification codes of spinbox control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def SPN_REACHMIN
|
||||
* \brief Notifies that the spin box has reached the minimum limit.
|
||||
*/
|
||||
#define SPN_REACHMIN 1
|
||||
|
||||
/**
|
||||
* \def SPN_REACHMAX
|
||||
* \brief Notifies that the spin box has reached the maximum limit.
|
||||
*/
|
||||
#define SPN_REACHMAX 2
|
||||
|
||||
/** @} end of mgext_ctrl_spinbox_ncs */
|
||||
|
||||
/** @} end of mgext_ctrl_spinbox */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXT_SPINBOX_H */
|
||||
|
||||
299
include/ctrl/static.h
Normal file
299
include/ctrl/static.h
Normal file
@@ -0,0 +1,299 @@
|
||||
/**
|
||||
* \file static.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: static.h 12453 2010-01-12 03:51:55Z dongkai $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_STATIC_H
|
||||
#define _MGUI_CTRL_STATIC_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_static Static control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_STATIC
|
||||
* \brief The class name of static control.
|
||||
*/
|
||||
#define CTRL_STATIC ("static")
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_static_styles Styles of static control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def SS_SIMPLE
|
||||
* \brief Designates a simple rectangle and displays a single line
|
||||
* of text flush-left in the rectangle.
|
||||
*/
|
||||
#define SS_SIMPLE 0x00000000L
|
||||
|
||||
/**
|
||||
* \def SS_BLACKRECT
|
||||
* \brief Specifies a rectangle filled with the black color.
|
||||
*/
|
||||
#define SS_BLACKRECT 0x00000001L
|
||||
|
||||
/**
|
||||
* \def SS_GRAYRECT
|
||||
* \brief Specifies a rectangle filled with the light gray color.
|
||||
*/
|
||||
#define SS_GRAYRECT 0x00000002L
|
||||
|
||||
/**
|
||||
* \def SS_WHITERECT
|
||||
* \brief Specifies a rectangle filled with the light white color.
|
||||
*/
|
||||
#define SS_WHITERECT 0x00000003L
|
||||
|
||||
/**
|
||||
* \def SS_BLACKFRAME
|
||||
* \brief Specifies a box with a frame drawn with the black color.
|
||||
*/
|
||||
#define SS_BLACKFRAME 0x00000004L
|
||||
|
||||
/**
|
||||
* \def SS_GRAYFRAME
|
||||
* \brief Specifies a box with a frame drawn with the light gray color.
|
||||
*/
|
||||
#define SS_GRAYFRAME 0x00000005L
|
||||
|
||||
/**
|
||||
* \def SS_WHITEFRAME
|
||||
* \brief Specifies a box with a frame drawn with the light white color.
|
||||
*/
|
||||
#define SS_WHITEFRAME 0x00000006L
|
||||
|
||||
/**
|
||||
* \def SS_GROUPBOX
|
||||
* \brief Creates a rectangle in which other controls can be grouped.
|
||||
*/
|
||||
#define SS_GROUPBOX 0x00000007L
|
||||
|
||||
/**
|
||||
* \def SS_ICON
|
||||
* \brief Designates an icon displayed in the static control.
|
||||
*/
|
||||
#define SS_ICON 0x00000008L
|
||||
|
||||
/**
|
||||
* \def SS_BITMAP
|
||||
* \brief Specifies that a bitmap will be displayed in the static control.
|
||||
*/
|
||||
#define SS_BITMAP 0x00000009L
|
||||
|
||||
/* Reserved */
|
||||
#define SS_OWNERDRAW 0x0000000AL
|
||||
|
||||
/* Reserved */
|
||||
#define SS_ENHMETAFILE 0x0000000BL
|
||||
|
||||
/**
|
||||
* \def SS_TYPEMASK
|
||||
* \brief The mask code of the static control.
|
||||
*/
|
||||
#define SS_TYPEMASK 0x0000000FL
|
||||
|
||||
/**
|
||||
* \def SS_LEFT
|
||||
* \brief Displays the given text flush-left.
|
||||
*/
|
||||
#define SS_LEFT 0x00000010L
|
||||
|
||||
/**
|
||||
* \def SS_CENTER
|
||||
* \brief Displays the given text centered in the rectangle.
|
||||
*/
|
||||
#define SS_CENTER 0x00000020L
|
||||
|
||||
/**
|
||||
* \def SS_RIGHT
|
||||
* \brief Displays the given text flush-right.
|
||||
*/
|
||||
#define SS_RIGHT 0x00000030L
|
||||
|
||||
/**
|
||||
* \def SS_ALIGNMASK
|
||||
* \brief The mask code of the static control.
|
||||
*/
|
||||
|
||||
#define SS_ALIGNMASK 0x000000F0L
|
||||
|
||||
/**
|
||||
* \def SS_NOPREFIX
|
||||
* \brief Prevents interpretation of any ampersand (&) characters in
|
||||
* the control's text as accelerator prefix characters.
|
||||
*
|
||||
* \note Not implemented so far.
|
||||
*/
|
||||
#define SS_NOPREFIX 0x00000100L
|
||||
|
||||
/**
|
||||
* \def SS_CENTERIMAGE
|
||||
* \brief Puts the image in the center of the static control.
|
||||
* Default is top-left aligned.
|
||||
*/
|
||||
#define SS_CENTERIMAGE 0x00000200L
|
||||
|
||||
/**
|
||||
* \def SS_NOWORDWRAP
|
||||
* \brief Designates a simple rectangle and displays the given text
|
||||
* in single line in the rectangle.
|
||||
*
|
||||
* Tabs are expanded, but words are not wrapped.
|
||||
* Text that extends past the rectagnel is clipped.
|
||||
*/
|
||||
#define SS_NOWORDWRAP 0x00000400L
|
||||
|
||||
/**
|
||||
* \def SS_LEFTNOWORDWRAP
|
||||
* \brief Backward compatibility definition.
|
||||
*
|
||||
* \sa SS_NOWORDWRAP
|
||||
*/
|
||||
#define SS_LEFTNOWORDWRAP SS_NOWORDWRAP
|
||||
|
||||
/**
|
||||
* \def SS_REALSIZEIMAGE
|
||||
* \brief Does not scale the image.
|
||||
*/
|
||||
#define SS_REALSIZEIMAGE 0x00000800L
|
||||
|
||||
/**
|
||||
* \def SS_NOTIFY
|
||||
* \brief Sends the parent window notification messages when the user
|
||||
* clicks or double-clicks the control.
|
||||
*/
|
||||
#define SS_NOTIFY 0x00001000L
|
||||
|
||||
/** @} end of ctrl_static_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_static_msgs Messages of static control
|
||||
* @{
|
||||
*/
|
||||
/* Reserved */
|
||||
#define STM_SETICON 0xF170
|
||||
/* Reserved */
|
||||
#define STM_GETICON 0xF171
|
||||
|
||||
/**
|
||||
* \def STM_SETIMAGE
|
||||
* \brief Associates a new image (icon or bitmap) with a static control.
|
||||
*
|
||||
* An application sends an STM_SETIMAGE message to
|
||||
* associate a new image (icon or bitmap) with a static control.
|
||||
*
|
||||
* \code
|
||||
* STM_SETIMAGE
|
||||
* HICON image;
|
||||
* or
|
||||
* BITMAP* image;
|
||||
*
|
||||
* wParam = (WPARAM)image;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param image The handle to an icon if the type of static control type
|
||||
* is SS_ICON, or the pointer to a BITMAP object if the type is SS_BITMAP.
|
||||
*
|
||||
* \return The old image (handle or pointer).
|
||||
*/
|
||||
#define STM_SETIMAGE 0xF172
|
||||
|
||||
/**
|
||||
* \def STM_GETIMAGE
|
||||
* \brief Retrieves a handle to the image.
|
||||
*
|
||||
* An application sends an STM_GETIMAGE message to retrieve a handle
|
||||
* to the image associated with a static control.
|
||||
*
|
||||
* \code
|
||||
* STM_GETIMAGE
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The handle to the icon if the type of static control type is SS_ICON,
|
||||
* or the pointer to the BITMAP object if the type is SS_BITMAP.
|
||||
*/
|
||||
#define STM_GETIMAGE 0xF173
|
||||
|
||||
#define STM_MSGMAX 0xF174
|
||||
|
||||
/** @} end of ctrl_static_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_static_ncs Notification codes of static control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def STN_DBLCLK
|
||||
* \brief Notifies a double-click.
|
||||
*
|
||||
* The STN_DBLCLK notification message is sent when
|
||||
* the user double-clicks a static control that has the SS_NOTIFY style.
|
||||
*/
|
||||
#define STN_DBLCLK 1
|
||||
|
||||
/* Not use */
|
||||
#define STN_ENABLE 2
|
||||
/* Not use */
|
||||
#define STN_DISABLE 3
|
||||
|
||||
/**
|
||||
* \def STN_CLICKED
|
||||
* \brief Notifies that a static control is clicked.
|
||||
*
|
||||
* The STN_CLICKED notification message is sent
|
||||
* when the user clicks a static control that has the SS_NOTIFY style.
|
||||
*/
|
||||
#define STN_CLICKED 4
|
||||
|
||||
/** @} end of ctrl_static_ncs */
|
||||
|
||||
/** @} end of ctrl_static */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_STATIC_H */
|
||||
|
||||
103
include/ctrl/textedit.h
Normal file
103
include/ctrl/textedit.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* \file textedit.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: textedit.h 12871 2010-05-07 06:13:42Z wanzheng $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_TEXTEDIT_H
|
||||
#define _MGUI_CTRL_TEXTEDIT_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_textedit TextEdit control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_TEXTEDIT
|
||||
* \brief The class name of textedit control.
|
||||
*/
|
||||
#define CTRL_TEXTEDIT ("textedit")
|
||||
|
||||
|
||||
/**
|
||||
* \var typedef GHANDLE HTEXTDOC
|
||||
* \brief Text document/buffer object
|
||||
*/
|
||||
typedef GHANDLE HTEXTDOC;
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_textedit_styles Styles of textedit control
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define TES_BASELINE ES_BASELINE
|
||||
#define TES_AUTOWRAP ES_AUTOWRAP
|
||||
#define TES_TITLE ES_TITLE
|
||||
|
||||
/** @} end of ctrl_textedit_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_textedit_msgs Messages of textedit control
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define TEM_RESETCONTENT 0xF400
|
||||
#define TEM_ADDLINE 0xF401
|
||||
|
||||
#define TEM_GETBKGNDINVALID 0xF402
|
||||
|
||||
/** @} end of ctrl_textedit_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_textedit_ncs Notification codes of textedit control
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define TEN_CLICK 1
|
||||
|
||||
|
||||
/** @} end of ctrl_textedit_ncs */
|
||||
|
||||
/** @} end of ctrl_textedit */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_TEXTEDIT_H */
|
||||
|
||||
456
include/ctrl/trackbar.h
Normal file
456
include/ctrl/trackbar.h
Normal file
@@ -0,0 +1,456 @@
|
||||
/**
|
||||
* \file trackbar.h
|
||||
* \author Wei Yongming <ymwei@minigui.org>
|
||||
* \date 2001/12/29
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2008 Feynman Software.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by Feynman Software.
|
||||
|
||||
This file is part of MiniGUI, a compact cross-platform Graphics
|
||||
User Interface (GUI) support system for real-time embedded systems.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: trackbar.h 10690 2008-08-18 09:32:47Z weiym $
|
||||
*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*
|
||||
* Copyright (C) 2002-2008 Feynman Software.
|
||||
* Copyright (C) 1999-2002 Wei Yongming.
|
||||
*/
|
||||
|
||||
#ifndef _MGUI_CTRL_TRACKBAR
|
||||
#define _MGUI_CTRL_TRACKBAR
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* \addtogroup controls
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_trackbar TrackBar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def CTRL_TRACKBAR
|
||||
* \brief The class name of trackbar control.
|
||||
*/
|
||||
#define CTRL_TRACKBAR ("trackbar")
|
||||
|
||||
/**
|
||||
* \def TBLEN_TIP
|
||||
* \brief The maximum length of the trackbar tip string.
|
||||
*/
|
||||
#define TBLEN_TIP 31
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_trackbar_styles Styles of trackbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def TBS_NOTIFY
|
||||
* \brief Causes the trackbar to notify the parent window with a notification message
|
||||
* when the user clicks or doubleclicks the trackbar.
|
||||
*/
|
||||
#define TBS_NOTIFY 0x0001L
|
||||
|
||||
/**
|
||||
* \def TBS_VERTICAL
|
||||
* \brief The trackbar control will be oriented vertically.
|
||||
*/
|
||||
#define TBS_VERTICAL 0x0002L
|
||||
|
||||
/**
|
||||
* \def TBS_BORDER
|
||||
* \brief The trackbar control will have border.
|
||||
*/
|
||||
#define TBS_BORDER 0x0004L
|
||||
|
||||
/**
|
||||
* \def TBS_TIP
|
||||
* \brief The trackbar control will display tip string above the control.
|
||||
*/
|
||||
#define TBS_TIP 0x0008L
|
||||
|
||||
/**
|
||||
* \def TBS_NOTICK
|
||||
* \brief The trackbar control will not display tick line beside the control.
|
||||
*/
|
||||
#define TBS_NOTICK 0x0010L
|
||||
|
||||
/* internally used style */
|
||||
#define TBS_FOCUS 0x1000L
|
||||
|
||||
/** @} end of ctrl_trackbar_styles */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_trackbar_msgs Messages of trackbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def TBM_SETRANGE
|
||||
* \brief Sets the range of minimum and maximum logical positions for the
|
||||
* slider in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETRANGE
|
||||
* int min;
|
||||
* int max;
|
||||
*
|
||||
* wParam = (WPARAM)min;
|
||||
* lParam = (LPARAM)max;
|
||||
* \endcode
|
||||
*
|
||||
* \param min Minimum position for the slider.
|
||||
* \param max Maximum position for the slider.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETRANGE 0xF090
|
||||
|
||||
/**
|
||||
* \def TBM_GETMIN
|
||||
* \brief Gets the minimum logical position for the slider.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETMIN
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The minimum logical position for the slider.
|
||||
*/
|
||||
#define TBM_GETMIN 0xF091
|
||||
|
||||
/**
|
||||
* \def TBM_SETPOS
|
||||
* \brief Sets the current logical position of the slider.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETPOS
|
||||
* int pos;
|
||||
*
|
||||
* wParam = (WPARAM)pos;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param pos New logical position of the slider.
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define TBM_SETPOS 0xF092
|
||||
|
||||
/**
|
||||
* \def TBM_GETPOS
|
||||
* \brief Gets the current logical position of the slider.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETPOS
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current logical position of the slider.
|
||||
*/
|
||||
#define TBM_GETPOS 0xF093
|
||||
|
||||
/**
|
||||
* \def TBM_SETLINESIZE
|
||||
* \brief Sets the number of logical positions moved in response to keyboard
|
||||
* input from the arrow keys.
|
||||
*
|
||||
* Sets the number of logical positions the trackbar's slider moves in response
|
||||
* to keyboard input from the arrow keys. The logical positions are the integer
|
||||
* increments in the trackbar's range of minimum to maximum slider positions.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETLINESIZE
|
||||
* int linesize;
|
||||
*
|
||||
* wParam = (WPARAM)linesize;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param linesize New line size.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETLINESIZE 0xF094
|
||||
|
||||
/**
|
||||
* \def TBM_GETLINESIZE
|
||||
* \brief Gets the number of logical positions moved in response to keyboard
|
||||
* input from the arrow keys.
|
||||
*
|
||||
* Gets the number of logical positions the trackbar's slider moves in response
|
||||
* to keyboard input from the arrow keys. The logical positions are the integer
|
||||
* increments in the trackbar's range of minimum to maximum slider positions.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETLINESIZE
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current line size.
|
||||
*/
|
||||
#define TBM_GETLINESIZE 0xF095
|
||||
|
||||
/**
|
||||
* \def TBM_SETPAGESIZE
|
||||
* \brief Sets the number of logical positions moved in response to keyboard
|
||||
* input from page keys..
|
||||
*
|
||||
* Sets the number of logical positions the trackbar's slider moves in response
|
||||
* to keyboard input form page keys, such as PAGE DOWN or PAGE UP keys. The
|
||||
* logical positions are the integer increments in the trackbar's range of
|
||||
* minimum to maximum slider positions.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETPAGESIZE
|
||||
* int pagesize;
|
||||
*
|
||||
* wParam = (WPARAM)pagesize;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param pagesize New page size.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETPAGESIZE 0xF096
|
||||
|
||||
/**
|
||||
* \def TBM_GETPAGESIZE
|
||||
* \brief Gets the number of logical positions moved in response to keyboard
|
||||
* input from page keys..
|
||||
*
|
||||
* Gets the number of logical positions the trackbar's slider moves in response
|
||||
* to keyboard input form page keys, such as PAGE DOWN or PAGE UP keys. The
|
||||
* logical positions are the integer increments in the trackbar's range of
|
||||
* minimum to maximum slider positions.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETPAGESIZE
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current page size.
|
||||
*/
|
||||
#define TBM_GETPAGESIZE 0xF097
|
||||
|
||||
/**
|
||||
* \def TBM_SETTIP
|
||||
* \brief Sets the start and end tip strings.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETTIP
|
||||
* char* starttip;
|
||||
* char* endtip;
|
||||
*
|
||||
* wParam = (WPARAM)starttip;
|
||||
* lParam = (LPARAM)endtip;
|
||||
* \endcode
|
||||
*
|
||||
* \param starttip New start tip string.
|
||||
* \param endtip New end tip tip string.
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define TBM_SETTIP 0xF098
|
||||
|
||||
/**
|
||||
* \def TBM_GETTIP
|
||||
* \brief Gets the start and end tip strings.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETTIP
|
||||
* char starttip [TBLEN_TIP + 1];
|
||||
* char endtip [TBLEN_TIP + 1];
|
||||
*
|
||||
* wParam = (WPARAM)starttip;
|
||||
* lParam = (LPARAM)endtip;
|
||||
* \endcode
|
||||
*
|
||||
* \param starttip Buffer receives the start tip string. It should
|
||||
* be length enough to save (TBLEN_TIP + 1) characters.
|
||||
* \param endtip Buffer receives the end tip string. It should
|
||||
* be length enough to save (TBLEN_TIP + 1) characters.
|
||||
*
|
||||
* \return Always be zero.
|
||||
*/
|
||||
#define TBM_GETTIP 0xF09A
|
||||
|
||||
/**
|
||||
* \def TBM_SETTICKFREQ
|
||||
* \brief Sets the interval frequency for tick marks in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETTICKFREQ
|
||||
* int tickfreq;
|
||||
*
|
||||
* wParam = (WPARAM)tickfreq;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param tickfreq New interval frequency for tick marks in a trackbar.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETTICKFREQ 0xF09B
|
||||
|
||||
/**
|
||||
* \def TBM_GETTICKFREQ
|
||||
* \brief Gets the interval frequency for tick marks in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETTICKFREQ
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current interval frequency for tick marks in a trackbar.
|
||||
*/
|
||||
#define TBM_GETTICKFREQ 0xF09C
|
||||
|
||||
/**
|
||||
* \def TBM_SETMIN
|
||||
* \brief Sets the minimum logical position for the slider in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETMIN
|
||||
* int min;
|
||||
*
|
||||
* wParam = (WPARAM)min;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param min The new minimum logical position for the slider in a trackbar.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETMIN 0xF09D
|
||||
|
||||
/**
|
||||
* \def TBM_SETMAX
|
||||
* \brief Sets the maximum logical position for the slider in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_SETMAX
|
||||
* int max;
|
||||
*
|
||||
* wParam = (WPARAM)max;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \param min The new maximum logical position for the slider in a trackbar.
|
||||
*
|
||||
* \return Zero on success; otherwise -1.
|
||||
*/
|
||||
#define TBM_SETMAX 0xF09E
|
||||
|
||||
/**
|
||||
* \def TBM_GETMAX
|
||||
* \brief Gets the maximum logical position for the slider in a trackbar.
|
||||
*
|
||||
* \code
|
||||
* TBM_GETMAX
|
||||
*
|
||||
* wParam = 0;
|
||||
* lParam = 0;
|
||||
* \endcode
|
||||
*
|
||||
* \return The current maximum logical position for the slider in a trackbar.
|
||||
*/
|
||||
#define TBM_GETMAX 0xF09F
|
||||
|
||||
#define TBR_MSGMAX 0xF010
|
||||
|
||||
/** @} end of ctrl_trackbar_msgs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_trackbar_ncs Notification codes of trackbar control
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \def TBN_REACHMIN
|
||||
* \brief Notifies that the slider has reached the minimum position.
|
||||
*/
|
||||
#define TBN_REACHMIN 1
|
||||
|
||||
/**
|
||||
* \def TBN_REACHMAX
|
||||
* \brief Notifies that the slider has reached the maximum position.
|
||||
*/
|
||||
#define TBN_REACHMAX 2
|
||||
|
||||
/**
|
||||
* \def TBN_CHANGE
|
||||
* \brief Notifies that the position of the slider has changed.
|
||||
*/
|
||||
#define TBN_CHANGE 3
|
||||
|
||||
/**
|
||||
* \def TBN_STARTDRAG
|
||||
* \brief Notifies that the user start to drag the slider.
|
||||
*/
|
||||
#define TBN_STARTDRAG 4
|
||||
|
||||
/**
|
||||
* \def TBN_STOPDRAG
|
||||
* \brief Notifies that the user stop to drag the slider.
|
||||
*/
|
||||
#define TBN_STOPDRAG 5
|
||||
|
||||
/** @} end of ctrl_trackbar_ncs */
|
||||
|
||||
/**
|
||||
* \defgroup ctrl_trackbar_render_state state for renderer
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* \def LFRDR_TBS_PRESSED
|
||||
* \brief indicate left button down
|
||||
*/
|
||||
#define LFRDR_TBS_PRESSED 0x0100L
|
||||
|
||||
/**
|
||||
* \def LFRDR_TBS_HILITE
|
||||
* \brief indicate mouse is in region of thumb of trackbar
|
||||
*/
|
||||
#define LFRDR_TBS_HILITE 0x0200L
|
||||
|
||||
/** @} end of ctrl_trackbar_render_state */
|
||||
|
||||
/** @} end of ctrl_trackbar */
|
||||
|
||||
/** @} end of controls */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGUI_CTRL_TRACKBAR */
|
||||
|
||||
537
include/ctrl/treeview.h
Normal file
537
include/ctrl/treeview.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user