⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 framewin_private.h

📁 一个在430单片机上移植UCGUI的例子
💻 H
字号:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI is protected by international copyright laws. Knowledge of the
*              source code may not be used to write a similar product. This file may
*              only be used in accordance with a license and should not be redistributed
*              in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File        : FRAMEWIN_Private.h
Purpose     : FRAMEWIN private header file
--------------------END-OF-HEADER-------------------------------------
*/

#ifndef FRAMEWIN_PRIVATE_H
#define FRAMEWIN_PRIVATE_H

#include "WM.h"
#include "FRAMEWIN.h"
#include "WIDGET.h"

#if GUI_WINSUPPORT

/*********************************************************************
*
*         Object definition
*
**********************************************************************
*/

typedef struct {
  WIDGET Widget;
  GUI_COLOR aBarColor[2];
  GUI_COLOR aTextColor[2];
  WM_CALLBACK* cb;
  WM_HWIN hClient;
  WM_HWIN hText;
  const GUI_FONT GUI_UNI_PTR * pFont;
  GUI_COLOR ClientColor;
  GUI_RECT rRestore;
  I16 BorderSize;
  I16 IBorderSize;
  I16 TextAlign;
  I16 TitleHeight;                 /* 0 means calc automatically */
  U16 Flags;
  WM_HWIN hFocussedChild;          /* Handle to focussed child .. default none (0) */
  WM_DIALOG_STATUS* pDialogStatus;
} FRAMEWIN_Obj;

/*********************************************************************
*
*         Types
*
**********************************************************************
*/

typedef struct {
  I16 TitleHeight;
  GUI_RECT rClient;
  GUI_RECT rTitleText;
} POSITIONS;

/*********************************************************************
*
*              Macros for internal use
*
**********************************************************************
*/

#define FRAMEWIN_H2P(h) (FRAMEWIN_Obj*) GUI_ALLOC_h2p(h)

/*********************************************************************
*
*        public data (internal defaults)
*
**********************************************************************
*/

extern const GUI_FONT GUI_UNI_PTR * FRAMEWIN__pDefaultFont;
extern GUI_COLOR       FRAMEWIN__aDefaultBarColor[2];
extern GUI_COLOR       FRAMEWIN__aDefaultTextColor[2];
extern GUI_COLOR       FRAMEWIN__DefaultClientColor;
extern I16             FRAMEWIN__DefaultTitleHeight;
extern I16             FRAMEWIN__DefaultBorderSize;
extern I16             FRAMEWIN__DefaultIBorderSize;

/*********************************************************************
*
*        public functions (internal)
*
**********************************************************************
*/

void            FRAMEWIN__CalcPositions   (FRAMEWIN_Obj* pObj, POSITIONS* pPos);
int             FRAMEWIN__CalcTitleHeight (FRAMEWIN_Obj* pObj);
void            FRAMEWIN__UpdatePositions (FRAMEWIN_Obj* pObj);
void            FRAMEWIN__UpdateButtons   (FRAMEWIN_Obj* pObj, int OldHeight);

/*********************************************************************
*
*        public functions
*
**********************************************************************
*/

const GUI_FONT GUI_UNI_PTR * FRAMEWIN_GetFont          (FRAMEWIN_Handle hObj);
int             FRAMEWIN_GetTitleHeight   (FRAMEWIN_Handle hObj);
void            FRAMEWIN_MinButtonSetState(WM_HWIN hButton, int State);
void            FRAMEWIN_MaxButtonSetState(WM_HWIN hButton, int State);

#endif   /* GUI_WINSUPPORT */
#endif   /* FRAMEWIN_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -