Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SCROLLBAR.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed to Cypress Semiconductor Corporation, 00019 whose registered office is situated at 198 Champion Ct. San Jose, CA 00020 95134 USA solely for the purposes of creating libraries for Cypress 00021 PSoC3 and PSoC5 processor-based devices, sublicensed and distributed 00022 under the terms and conditions of the Cypress End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 Licensor: SEGGER Microcontroller Systems LLC 00030 Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA 00031 Licensed SEGGER software: emWin 00032 License number: GUI-00319 00033 License model: Services and License Agreement, signed June 10th, 2009 00034 Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) 00035 ---------------------------------------------------------------------- 00036 Support and Update Agreement (SUA) 00037 SUA period: 2009-06-12 - 2022-07-27 00038 Contact to extend SUA: sales@segger.com 00039 ---------------------------------------------------------------------- 00040 File : SCROLLBAR.h 00041 Purpose : SCROLLBAR include 00042 --------------------END-OF-HEADER------------------------------------- 00043 */ 00044 00045 #ifndef SCROLLBAR_H 00046 #define SCROLLBAR_H 00047 00048 #include "WM.h" 00049 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00050 #include "WIDGET.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 #if defined(__cplusplus) 00055 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00056 #endif 00057 00058 /********************************************************************* 00059 * 00060 * Defines 00061 * 00062 ********************************************************************** 00063 */ 00064 #define SCROLLBAR_CI_THUMB 0 00065 #define SCROLLBAR_CI_SHAFT 1 00066 #define SCROLLBAR_CI_ARROW 2 00067 00068 /********************************************************************* 00069 * 00070 * States 00071 */ 00072 #define SCROLLBAR_STATE_PRESSED WIDGET_STATE_USER0 00073 00074 /********************************************************************* 00075 * 00076 * Create / Status flags 00077 */ 00078 #define SCROLLBAR_CF_VERTICAL WIDGET_CF_VERTICAL 00079 #define SCROLLBAR_CF_FOCUSABLE WIDGET_STATE_FOCUSABLE 00080 00081 #define SCROLLBAR_CF_FOCUSSABLE SCROLLBAR_CF_FOCUSABLE 00082 00083 /************************************************************ 00084 * 00085 * Skinning property indices 00086 */ 00087 #define SCROLLBAR_SKINFLEX_PI_PRESSED 0 00088 #define SCROLLBAR_SKINFLEX_PI_UNPRESSED 1 00089 00090 /********************************************************************* 00091 * 00092 * Public Types 00093 * 00094 ********************************************************************** 00095 */ 00096 typedef WM_HMEM SCROLLBAR_Handle; 00097 00098 typedef struct { 00099 GUI_COLOR aColorFrame[3]; 00100 GUI_COLOR aColorUpper[2]; 00101 GUI_COLOR aColorLower[2]; 00102 GUI_COLOR aColorShaft[2]; 00103 GUI_COLOR ColorArrow; 00104 GUI_COLOR ColorGrasp; 00105 } SCROLLBAR_SKINFLEX_PROPS; 00106 00107 typedef struct { 00108 int IsVertical; 00109 int State; 00110 } SCROLLBAR_SKINFLEX_INFO; 00111 00112 /********************************************************************* 00113 * 00114 * Create functions 00115 * 00116 ********************************************************************** 00117 */ 00118 SCROLLBAR_Handle SCROLLBAR_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int WinFlags, int SpecialFlags); 00119 SCROLLBAR_Handle SCROLLBAR_CreateAttached(WM_HWIN hParent, int SpecialFlags); 00120 SCROLLBAR_Handle SCROLLBAR_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00121 SCROLLBAR_Handle SCROLLBAR_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00122 SCROLLBAR_Handle SCROLLBAR_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00123 00124 /********************************************************************* 00125 * 00126 * The callback ... 00127 * 00128 * Do not call it directly ! It is only to be used from within an 00129 * overwritten callback. 00130 */ 00131 void SCROLLBAR_Callback(WM_MESSAGE * pMsg); 00132 00133 /********************************************************************* 00134 * 00135 * Member functions 00136 * 00137 ********************************************************************** 00138 */ 00139 00140 /* Methods changing properties */ 00141 00142 void SCROLLBAR_AddValue (SCROLLBAR_Handle hObj, int Add); 00143 void SCROLLBAR_Dec (SCROLLBAR_Handle hObj); 00144 void SCROLLBAR_Inc (SCROLLBAR_Handle hObj); 00145 int SCROLLBAR_GetUserData(SCROLLBAR_Handle hObj, void * pDest, int NumBytes); 00146 GUI_COLOR SCROLLBAR_SetColor (SCROLLBAR_Handle hObj, int Index, GUI_COLOR Color); 00147 void SCROLLBAR_SetNumItems(SCROLLBAR_Handle hObj, int NumItems); 00148 void SCROLLBAR_SetPageSize(SCROLLBAR_Handle hObj, int PageSize); 00149 void SCROLLBAR_SetValue (SCROLLBAR_Handle hObj, int v); 00150 int SCROLLBAR_SetWidth (SCROLLBAR_Handle hObj, int Width); 00151 void SCROLLBAR_SetState (SCROLLBAR_Handle hObj, const WM_SCROLL_STATE* pState); 00152 int SCROLLBAR_SetUserData(SCROLLBAR_Handle hObj, const void * pSrc, int NumBytes); 00153 00154 /********************************************************************* 00155 * 00156 * Member functions: Skinning 00157 * 00158 ********************************************************************** 00159 */ 00160 void SCROLLBAR_GetSkinFlexProps (SCROLLBAR_SKINFLEX_PROPS * pProps, int Index); 00161 void SCROLLBAR_SetSkinClassic (SCROLLBAR_Handle hObj); 00162 void SCROLLBAR_SetSkin (SCROLLBAR_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00163 int SCROLLBAR_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00164 void SCROLLBAR_SetSkinFlexProps (const SCROLLBAR_SKINFLEX_PROPS * pProps, int Index); 00165 void SCROLLBAR_SetDefaultSkinClassic(void); 00166 WIDGET_DRAW_ITEM_FUNC * SCROLLBAR_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00167 00168 #define SCROLLBAR_SKIN_FLEX SCROLLBAR_DrawSkinFlex 00169 00170 /********************************************************************* 00171 * 00172 * Managing default values 00173 * 00174 ********************************************************************** 00175 */ 00176 int SCROLLBAR_GetDefaultWidth(void); 00177 GUI_COLOR SCROLLBAR_SetDefaultColor(GUI_COLOR Color, unsigned int Index); /* Not yet documented */ 00178 int SCROLLBAR_SetDefaultWidth(int DefaultWidth); 00179 00180 /********************************************************************* 00181 * 00182 * Global functions 00183 * 00184 ********************************************************************** 00185 */ 00186 int SCROLLBAR_GetThumbSizeMin(void); 00187 int SCROLLBAR_SetThumbSizeMin(int ThumbSizeMin); 00188 00189 /********************************************************************* 00190 * 00191 * Query state 00192 * 00193 ********************************************************************** 00194 */ 00195 GUI_COLOR SCROLLBAR_GetColor (SCROLLBAR_Handle hObj, int Index); 00196 int SCROLLBAR_GetNumItems(SCROLLBAR_Handle hObj); 00197 int SCROLLBAR_GetPageSize(SCROLLBAR_Handle hObj); 00198 int SCROLLBAR_GetValue (SCROLLBAR_Handle hObj); 00199 00200 /********************************************************************* 00201 * 00202 * Macros for compatibility 00203 * 00204 ********************************************************************** 00205 */ 00206 #define SCROLLBAR_BKCOLOR0_DEFAULT SCROLLBAR_COLOR_ARROW_DEFAULT 00207 #define SCROLLBAR_BKCOLOR1_DEFAULT SCROLLBAR_COLOR_SHAFT_DEFAULT 00208 #define SCROLLBAR_COLOR0_DEFAULT SCROLLBAR_COLOR_THUMB_DEFAULT 00209 00210 #if defined(__cplusplus) 00211 } 00212 #endif 00213 00214 #endif // GUI_WINSUPPORT 00215 #endif // SCROLLBAR_H 00216 00217 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:43 by
