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_Private.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH & Co. KG * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.38 - 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 NXP Semiconductors USA, Inc. whose 00019 registered office is situated at 411 E. Plumeria Drive, San Jose, 00020 CA 95134, USA solely for the purposes of creating libraries for 00021 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and 00022 distributed under the terms and conditions of the NXP 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 00030 Licensor: SEGGER Microcontroller Systems LLC 00031 Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA 00032 Licensed SEGGER software: emWin 00033 License number: GUI-00186 00034 License model: emWin License Agreement, dated August 20th 2011 00035 Licensed product: - 00036 Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 00037 Licensed number of seats: - 00038 ---------------------------------------------------------------------- 00039 File : SCROLLBAR_Private.h 00040 Purpose : SCROLLBAR internal header file 00041 ---------------------------END-OF-HEADER------------------------------ 00042 */ 00043 00044 #ifndef SCROLLBAR_PRIVATE_H 00045 #define SCROLLBAR_PRIVATE_H 00046 00047 #include "SCROLLBAR.h" 00048 #include "WIDGET.h" 00049 #include "GUI_Debug.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 /********************************************************************* 00054 * 00055 * Defines 00056 * 00057 ********************************************************************** 00058 */ 00059 #define PRESSED_STATE_NONE 0 00060 #define PRESSED_STATE_RIGHT 1 00061 #define PRESSED_STATE_LEFT 2 00062 #define PRESSED_STATE_THUMB 3 00063 00064 /********************************************************************* 00065 * 00066 * Private config defaults 00067 * 00068 ********************************************************************** 00069 */ 00070 00071 /* Define colors */ 00072 #ifndef SCROLLBAR_COLOR_SHAFT_DEFAULT 00073 #define SCROLLBAR_COLOR_SHAFT_DEFAULT GUI_GRAY 00074 #endif 00075 00076 #ifndef SCROLLBAR_COLOR_ARROW_DEFAULT 00077 #define SCROLLBAR_COLOR_ARROW_DEFAULT GUI_BLACK 00078 #endif 00079 00080 #ifndef SCROLLBAR_COLOR_THUMB_DEFAULT 00081 #define SCROLLBAR_COLOR_THUMB_DEFAULT GUI_GRAY_C0 00082 #endif 00083 00084 #ifndef SCROLLBAR_THUMB_SIZE_MIN_DEFAULT 00085 #define SCROLLBAR_THUMB_SIZE_MIN_DEFAULT 4 00086 #endif 00087 00088 #ifndef SCROLLBAR_DEFAULT_WIDTH 00089 #if WIDGET_USE_SCHEME_SMALL 00090 #define SCROLLBAR_DEFAULT_WIDTH 11 00091 #elif WIDGET_USE_SCHEME_MEDIUM 00092 #define SCROLLBAR_DEFAULT_WIDTH 16 00093 #elif WIDGET_USE_SCHEME_LARGE 00094 #define SCROLLBAR_DEFAULT_WIDTH 22 00095 #endif 00096 #endif 00097 00098 #define SCROLLBAR_TIMER_ID 1234 00099 00100 /********************************************************************* 00101 * 00102 * Module internal data 00103 * 00104 ********************************************************************** 00105 */ 00106 extern GUI_COLOR SCROLLBAR__aDefaultBkColor[2]; 00107 extern GUI_COLOR SCROLLBAR__aDefaultColor[2]; 00108 extern I16 SCROLLBAR__DefaultWidth; 00109 extern I16 SCROLLBAR__ThumbSizeMin; 00110 00111 /********************************************************************* 00112 * 00113 * Object definition 00114 * 00115 ********************************************************************** 00116 */ 00117 typedef struct { 00118 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00119 } SCROLLBAR_SKIN_PRIVATE; 00120 00121 typedef struct { 00122 GUI_COLOR aColor[3]; 00123 SCROLLBAR_SKIN_PRIVATE SkinPrivate; 00124 } SCROLLBAR_PROPS; 00125 00126 typedef struct { 00127 int x0_LeftArrow; 00128 int x1_LeftArrow; 00129 int x0_Thumb; 00130 int x1_Thumb; 00131 int x0_RightArrow; 00132 int x1_RightArrow; 00133 int x1; 00134 int xSizeMoveable; 00135 int ThumbSize; 00136 } SCROLLBAR_POSITIONS; 00137 00138 typedef struct SCROLLBAR_OBJ SCROLLBAR_OBJ; 00139 00140 struct SCROLLBAR_OBJ { 00141 WIDGET Widget; 00142 SCROLLBAR_PROPS Props; 00143 WIDGET_SKIN const * pWidgetSkin; 00144 void (* pfCalcPositions)(SCROLLBAR_Handle hObj, SCROLLBAR_POSITIONS * pPos); 00145 int NumItems, v, PageSize; 00146 int State; 00147 int TimerStep; 00148 int TouchPos; 00149 WM_HMEM hTimer; 00150 }; 00151 00152 /********************************************************************* 00153 * 00154 * Private macros 00155 * 00156 ********************************************************************** 00157 */ 00158 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00159 #define SCROLLBAR_INIT_ID(p) (p->Widget.DebugId = SCROLLBAR_ID) 00160 #else 00161 #define SCROLLBAR_INIT_ID(p) 00162 #endif 00163 00164 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00165 SCROLLBAR_OBJ * SCROLLBAR_LockH(SCROLLBAR_Handle h); 00166 #define SCROLLBAR_LOCK_H(h) SCROLLBAR_LockH(h) 00167 #else 00168 #define SCROLLBAR_LOCK_H(h) (SCROLLBAR_OBJ *)GUI_LOCK_H(h) 00169 #endif 00170 00171 /********************************************************************* 00172 * 00173 * Private functions 00174 * 00175 ********************************************************************** 00176 */ 00177 void SCROLLBAR__InvalidatePartner(SCROLLBAR_Handle hObj); 00178 void SCROLLBAR__Rect2VRect (const WIDGET * pWidget, GUI_RECT * pRect); 00179 00180 /********************************************************************* 00181 * 00182 * Private data 00183 * 00184 ********************************************************************** 00185 */ 00186 extern SCROLLBAR_PROPS SCROLLBAR__DefaultProps; 00187 00188 extern const WIDGET_SKIN SCROLLBAR__SkinClassic; 00189 extern WIDGET_SKIN SCROLLBAR__Skin; 00190 00191 extern WIDGET_SKIN const * SCROLLBAR__pSkinDefault; 00192 00193 #endif /* GUI_WINSUPPORT */ 00194 #endif /* Avoid multiple inclusion */
Generated on Wed Jul 20 2022 15:03:45 by
