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

📄 window.h

📁 rtCell 实时微内核-具有下列功能: 1. 完全抢占的实时微内核结构
💻 H
字号:
/*
 *******************************************************************************
 *                      The real-time kernel "rtCell"                          *
 *              Copyright 2005 taowentao, allrights reserved.                  *
 * File : Window.h                                                             *
 * By   : taowentao     2006-09-02, 2007-05-12                                 *
 *******************************************************************************
 */

#if !defined(WINDOW_H)
#define WINDOW_H

#if !defined(WINS_H)
#include "giCell\Wins\include\Wins.h"
#endif

#if !defined(SCROLLBAR_H)
#include "giCell\Wins\include\Scrolbar.h"
#endif  

/*
 *******************************************************************************
 *                                                                             *
 *******************************************************************************
 */

typedef struct {
    VIEW *pView;
    COLOR BottonColor;
    CWORD Status;
} SYSBTN;

#define SYSBTN_FOCUSSED     (0x0001)
#define SYSBTN_MOUSE_ENTER  (0x0002)
#define SYSBTN_MOUSE_CATCH  (0x0004)

#define SYSBTN_MIN_BTN      (0x0008)
#define SYSBTN_MAX_BTN      (0x0010)
#define SYSBTN_CLOSE_BTN    (0x0020)

/*
 *******************************************************************************
 *                                                                             *
 *******************************************************************************
 */

typedef void (_cdecl_ *PCREATE)(VIEW *pParent); 

typedef struct {
    VIEW *pMainView;
    RECT  MaxRect; 
    COLOR BarColor[2];
    COLOR CaptionColor;
    COLOR ClientColor;
    PVIEWFUN pWinProc;
    VIEW *pClientView;
    VIEW *pFocussedView;    
    BYTE* pCaption;
    VIEW* pFocussedChild;
    SYSBTN *pCloseBtn, *pMaxBtn, *pMinBtn;
    SCROLLBAR *pVScrolbar, *pHScrolbar;
    RECT  WinRect;
    POINT ptCatch;
    CWORD Status;
    CWORD Styles;
} WINDOW;

#define WIN_FROM_MAINVIEW(p)   ((WINDOW *)OBJ_FROM_VIEW(p))
#define CLIENTVIEW_FROM_MAINVIEW(p)   ((WIN_FROM_MAINVIEW((p))->pClientView)) 
#define WIN_FROM_CLIENTVIEW(p)   (WIN_FROM_MAINVIEW((p)->pParent))

#define WIN_RESIZE_ZONE  (10)
/* window status */
#define WIN_FOCUSSED     (0x0001)
#define WIN_MOUSE_ENTER  (0x0002)
#define WIN_MOUSE_CATCH  (0x0004)
#define WIN_MOVE         (0x0008)

#define WIN_SIZE_LEFT    (0x0010)
#define WIN_SIZE_TOP     (0x0020)
#define WIN_SIZE_RIGHT   (0x0040)
#define WIN_SIZE_BOTTOM  (0x0080)
#define WIN_SIZE         (WIN_SIZE_LEFT|WIN_SIZE_TOP|WIN_SIZE_RIGHT|WIN_SIZE_BOTTOM)

#define WIN_MAX_SIZE     (0x0100)
#define WIN_MIN_SIZE     (0x0200)
#define WIN_CLIENT_RECT  (0x0400)
#define WIN_RESIZABLE    (0x0800)

/* window styles */
#define WIN_CLOSE_BTN    (0x0001)
#define WIN_MAX_BTN      (0x0002)
#define WIN_MIN_BTN      (0x0004)
#define WIN_HASTRANS     (0x0008)
#define WIN_STAYONTOP    (0x0010)
#define WIN_3D_CLIENT    (0x0020)
#define WIN_RESIZE       (0x0040)
#define WIN_CLIENT       (0x0080)
#define WIN_SCROLL       (0x0100)

/*
 *******************************************************************************
 *                                                                             *
 *******************************************************************************
 */

WINDOW* CreateWindowEx(int left, int top, int width, int height, VIEW* pParent,
                       BYTE* pCaption, PCREATE pOnCreate, WORD Style);
WINDOW* CreateWindow(int left, int top, int width, int height, VIEW* pParent,
                     BYTE* pCaption, PCREATE pOnCreate, WORD Style);
void SetWinMainViewFun(WINDOW *pWin, PVIEWFUN pFun);
void DeleteWindow(WINDOW *pWin);
void SetWindowProc(WINDOW *pWin, PVIEWFUN pWinProc);
void SetWindowVisible(WINDOW *pWin, const CBOOL setVisible);
void SetWindowStayOnTop(WINDOW *pWin, const CBOOL setStayOnTop);
void SetWindowTrans(WINDOW *pWin, const CBOOL setTrans);
void InformView(VIEW *pView, const VMSG *pMsg);
void SetFocussedView(VIEW *pView);
void * GetParentWin(VIEW *pView);

/*
 *******************************************************************************
 *                                                                             *
 *******************************************************************************
 */
#endif /* end of Window.h  */

⌨️ 快捷键说明

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