FrameWin.h
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:4k
源码类别:

uCOS

开发平台:

C/C++

  1. /*
  2. *********************************************************************************************************
  3. *                                                uC/GUI
  4. *                        Universal graphic software for embedded applications
  5. *
  6. *                       (c) Copyright 2002, Micrium Inc., Weston, FL
  7. *                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
  8. *
  9. *              礐/GUI is protected by international copyright laws. Knowledge of the
  10. *              source code may not be used to write a similar product. This file may
  11. *              only be used in accordance with a license and should not be redistributed
  12. *              in any way. We appreciate your understanding and fairness.
  13. *
  14. ----------------------------------------------------------------------
  15. File        : FrameWin.H
  16. Purpose     : Frame window include
  17. --------------------END-OF-HEADER-------------------------------------
  18. */
  19. #ifndef FRAMEWIN_H
  20. #define FRAMEWIN_H
  21. #include "WM.H"
  22. #if GUI_WINSUPPORT
  23. #include "Dialog.h"      /* Req. for Create indirect data structure */
  24. /************************************************************
  25. *
  26. *       #defines
  27. *
  28. *************************************************************
  29. */
  30. /************************************************************
  31. *
  32. *       Create / Status flags
  33. */
  34. #define FRAMEWIN_CF_MOVEABLE   (1<<4)
  35. #define FRAMEWIN_SF_MOVEABLE   (1<<4)
  36. /*
  37.       *************************************************************
  38.       *                                                           *
  39.       *                         Types                             *
  40.       *                                                           *
  41.       *************************************************************
  42. */
  43. typedef WM_HMEM FRAMEWIN_Handle;
  44. /*
  45.       *************************************************************
  46.       *                                                           *
  47.       *                 Standard member functions                 *
  48.       *                                                           *
  49.       *************************************************************
  50. */
  51. #define FRAMEWIN_EnableMemdev(hObj)  WM_EnableMemdev(hObj)
  52. #define FRAMEWIN_DisableMemdev(hObj) WM_DisableMemdev(hObj)
  53. #define FRAMEWIN_Delete(hObj)        WM_DeleteWindow(hObj)
  54. #define FRAMEWIN_Paint(hObj)         WM_Paint(hObj)
  55. #define FRAMEWIN_Invalidate(hObj)    WM_InvalidateWindow(hObj)
  56. /*
  57.       *************************************************************
  58.       *                                                           *
  59.       *                 Member functions                          *
  60.       *                                                           *
  61.       *************************************************************
  62. */
  63. FRAMEWIN_Handle FRAMEWIN_Create       (const char* pTitle, WM_CALLBACK* cb, int Flags,
  64.                                        int x0, int y0, int xsize, int ysize);
  65. FRAMEWIN_Handle FRAMEWIN_CreateAsChild(int x0, int y0, int xsize, int ysize, WM_HWIN hParent,
  66.                                        const char* pText, WM_CALLBACK* cb, int Flags);
  67. void          FRAMEWIN_SetFont        (FRAMEWIN_Handle pObj, const GUI_FONT* pFont);
  68. void          FRAMEWIN_SetBarColor    (FRAMEWIN_Handle pObj, int index, GUI_COLOR color);
  69. void          FRAMEWIN_SetTextColor   (FRAMEWIN_Handle pObj, GUI_COLOR color);
  70. void          FRAMEWIN_SetText        (FRAMEWIN_Handle pObj, const char* s);
  71. void          FRAMEWIN_SetTextAlign   (FRAMEWIN_Handle pObj, int Align);
  72. void          FRAMEWIN_SetTextPos     (FRAMEWIN_Handle pObj, int XOff, int YOff);
  73. void          FRAMEWIN_SetActive      (FRAMEWIN_Handle hObj, int State);
  74. void          FRAMEWIN_SetClientColor (FRAMEWIN_Handle hObj, GUI_COLOR Color);
  75. /*
  76.       *************************************************************
  77.       *
  78.       *                 Global functions
  79.       *
  80.       *************************************************************
  81. */
  82. void            FRAMEWIN_SetDefaultFont       (const GUI_FONT* pFont);
  83. const GUI_FONT* FRAMEWIN_GetDefaultFont       (void);
  84. void            FRAMEWIN_SetDefaultBarColor   (int Index, GUI_COLOR Color);
  85. int             FRAMEWIN_GetDefaultCaptionSize(void);
  86. void            FRAMEWIN_SetDefaultCaptionSize(int DefaultCaptionSize);
  87. int             FRAMEWIN_GetDefaultBorderSize (void);
  88. void            FRAMEWIN_SetDefaultBorderSize (int DefaultBorderSize);
  89. #endif
  90. #endif   /* FRAMEWIN_H */