├── .gitignore
├── DuilibFormwork
├── Debug
│ ├── DuilibFormwork.exe
│ └── MainWnd.xml
├── DuilibFormwork.sln
└── DuilibFormwork
│ ├── CMainWnd.cpp
│ ├── CMainWnd.h
│ ├── Duilib
│ ├── Control
│ │ ├── UIActiveX.h
│ │ ├── UIButton.h
│ │ ├── UICheckBox.h
│ │ ├── UICombo.h
│ │ ├── UIDateTime.h
│ │ ├── UIEdit.h
│ │ ├── UIFlash.h
│ │ ├── UIGifAnim.h
│ │ ├── UILabel.h
│ │ ├── UIList.h
│ │ ├── UIOption.h
│ │ ├── UIProgress.h
│ │ ├── UIRichEdit.h
│ │ ├── UIScrollBar.h
│ │ ├── UISlider.h
│ │ ├── UIText.h
│ │ ├── UITreeView.h
│ │ └── UIWebBrowser.h
│ ├── Core
│ │ ├── UIBase.h
│ │ ├── UIContainer.h
│ │ ├── UIControl.h
│ │ ├── UIDefine.h
│ │ ├── UIDlgBuilder.h
│ │ ├── UIManager.h
│ │ ├── UIMarkup.h
│ │ └── UIRender.h
│ ├── Layout
│ │ ├── UIChildLayout.h
│ │ ├── UIHorizontalLayout.h
│ │ ├── UITabLayout.h
│ │ ├── UITileLayout.h
│ │ └── UIVerticalLayout.h
│ ├── StdAfx.h
│ ├── UIlib.h
│ ├── Utils
│ │ ├── FlashEventHandler.h
│ │ ├── UIDelegate.h
│ │ ├── Utils.h
│ │ ├── WebBrowserEventHandler.h
│ │ ├── WinImplBase.h
│ │ ├── WndShadow.h
│ │ ├── downloadmgr.h
│ │ └── stb_image.h
│ ├── dll
│ │ ├── DuiLib.dll
│ │ ├── DuiLib_d.dll
│ │ ├── DuiLib_u.dll
│ │ └── DuiLib_ud.dll
│ └── lib
│ │ ├── DuiLib.lib
│ │ ├── DuiLib_Static.lib
│ │ ├── DuiLib_Static_d.lib
│ │ ├── DuiLib_Static_u.lib
│ │ ├── DuiLib_Static_ud.lib
│ │ ├── DuiLib_d.lib
│ │ ├── DuiLib_u.lib
│ │ └── DuiLib_ud.lib
│ ├── DuilibBase.h
│ ├── DuilibFormwork.vcxproj
│ ├── DuilibFormwork.vcxproj.filters
│ ├── DuilibFormwork.vcxproj.user
│ ├── main.cpp
│ └── 配置环境.txt
├── DuilibMinDemo
├── Debug
│ ├── DuiLib_ud.dll
│ ├── DuilibMinDemo.exe
│ ├── DuilibMinDemo.ilk
│ ├── DuilibMinDemo.pdb
│ └── duilib.xml
├── DuilibMinDemo.sln
└── DuilibMinDemo
│ ├── Debug
│ ├── DuilibMinDemo.exe.recipe
│ ├── DuilibMinDemo.log
│ ├── DuilibMinDemo.tlog
│ │ ├── CL.command.1.tlog
│ │ ├── CL.read.1.tlog
│ │ ├── CL.write.1.tlog
│ │ ├── DuilibMinDemo.lastbuildstate
│ │ ├── link.command.1.tlog
│ │ ├── link.read.1.tlog
│ │ └── link.write.1.tlog
│ ├── vc142.idb
│ └── vc142.pdb
│ ├── DuiLib.dll
│ ├── DuiLib_d.dll
│ ├── DuiLib_u.dll
│ ├── DuiLib_ud.dll
│ ├── DuilibMinDemo.vcxproj
│ ├── DuilibMinDemo.vcxproj.filters
│ ├── DuilibMinDemo.vcxproj.user
│ └── main.cpp
├── DuilibMinDemoStatic
├── Debug
│ ├── DuilibMinDemoStatic.exe
│ └── duilib.xml
├── DuilibMinDemoStatic.sln
└── DuilibMinDemoStatic
│ ├── DuiLib_Static_ud.lib
│ ├── DuilibMinDemoStatic.vcxproj
│ ├── DuilibMinDemoStatic.vcxproj.filters
│ ├── DuilibMinDemoStatic.vcxproj.user
│ └── main.cpp
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | !*.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | !*.lib
28 |
29 | # Executables
30 | !*.exe
31 | *.out
32 | *.app
33 |
--------------------------------------------------------------------------------
/DuilibFormwork/Debug/DuilibFormwork.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/Debug/DuilibFormwork.exe
--------------------------------------------------------------------------------
/DuilibFormwork/Debug/MainWnd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30804.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DuilibFormwork", "DuilibFormwork\DuilibFormwork.vcxproj", "{CEEC7ACF-962C-4D1C-A642-55F650E2387F}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Debug|x64.ActiveCfg = Debug|x64
17 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Debug|x64.Build.0 = Debug|x64
18 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Debug|x86.ActiveCfg = Debug|Win32
19 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Debug|x86.Build.0 = Debug|Win32
20 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Release|x64.ActiveCfg = Release|x64
21 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Release|x64.Build.0 = Release|x64
22 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Release|x86.ActiveCfg = Release|Win32
23 | {CEEC7ACF-962C-4D1C-A642-55F650E2387F}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {A7D10E27-A3B5-428A-A83B-1AE05FEDD16E}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/CMainWnd.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/CMainWnd.cpp
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/CMainWnd.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "DuilibBase.h"
3 |
4 | #define TIMER_ID_TEST (1)
5 |
6 | class CMainWnd : public WindowImplBase
7 | {
8 | public:
9 | virtual LPCTSTR GetWindowClassName() const { return _T("MainWnd"); }
10 | virtual CDuiString GetSkinFile() { return _T("MainWnd.xml"); }
11 | virtual CDuiString GetSkinFolder() { return _T(""); }
12 |
13 | virtual LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
14 | virtual LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
15 |
16 | virtual void Notify(TNotifyUI& msg);
17 | };
18 |
19 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIActiveX.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIACTIVEX_H__
2 | #define __UIACTIVEX_H__
3 |
4 | #pragma once
5 |
6 | struct IOleObject;
7 |
8 |
9 | namespace DuiLib {
10 | /////////////////////////////////////////////////////////////////////////////////////
11 | //
12 |
13 | class CActiveXCtrl;
14 |
15 | template< class T >
16 | class CSafeRelease
17 | {
18 | public:
19 | CSafeRelease(T* p) : m_p(p) { };
20 | ~CSafeRelease() { if( m_p != NULL ) m_p->Release(); };
21 | T* Detach() { T* t = m_p; m_p = NULL; return t; };
22 | T* m_p;
23 | };
24 |
25 | /////////////////////////////////////////////////////////////////////////////////////
26 | //
27 |
28 | class DUILIB_API CActiveXUI : public CControlUI, public IMessageFilterUI
29 | {
30 | friend class CActiveXCtrl;
31 | public:
32 | CActiveXUI();
33 | virtual ~CActiveXUI();
34 |
35 | LPCTSTR GetClass() const;
36 | LPVOID GetInterface(LPCTSTR pstrName);
37 | UINT GetControlFlags() const;
38 | HWND GetNativeWindow() const;
39 |
40 | bool IsDelayCreate() const;
41 | void SetDelayCreate(bool bDelayCreate = true);
42 |
43 | bool CreateControl(const CLSID clsid);
44 | bool CreateControl(LPCTSTR pstrCLSID);
45 | HRESULT GetControl(const IID iid, LPVOID* ppRet);
46 | CLSID GetClisd() const;
47 | CDuiString GetModuleName() const;
48 | void SetModuleName(LPCTSTR pstrText);
49 |
50 | void SetVisible(bool bVisible = true);
51 | void SetInternVisible(bool bVisible = true);
52 | void SetPos(RECT rc, bool bNeedInvalidate = true);
53 | void Move(SIZE szOffset, bool bNeedInvalidate = true);
54 | bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl);
55 |
56 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
57 |
58 | LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
59 |
60 | protected:
61 | virtual void ReleaseControl();
62 | virtual bool DoCreateControl();
63 |
64 | protected:
65 | CLSID m_clsid;
66 | CDuiString m_sModuleName;
67 | bool m_bCreated;
68 | bool m_bDelayCreate;
69 | IOleObject* m_pUnk;
70 | CActiveXCtrl* m_pControl;
71 | HWND m_hwndHost;
72 | };
73 |
74 | } // namespace DuiLib
75 |
76 | #endif // __UIACTIVEX_H__
77 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIButton.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIButton.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UICheckBox.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UICheckBox.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UICombo.h:
--------------------------------------------------------------------------------
1 | #ifndef __UICOMBO_H__
2 | #define __UICOMBO_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 | /////////////////////////////////////////////////////////////////////////////////////
8 | //
9 |
10 | class CComboWnd;
11 |
12 | class DUILIB_API CComboUI : public CContainerUI, public IListOwnerUI
13 | {
14 | friend class CComboWnd;
15 | public:
16 | CComboUI();
17 |
18 | LPCTSTR GetClass() const;
19 | LPVOID GetInterface(LPCTSTR pstrName);
20 |
21 | void DoInit();
22 | UINT GetControlFlags() const;
23 |
24 | CDuiString GetText() const;
25 | void SetEnabled(bool bEnable = true);
26 |
27 | CDuiString GetDropBoxAttributeList();
28 | void SetDropBoxAttributeList(LPCTSTR pstrList);
29 | SIZE GetDropBoxSize() const;
30 | void SetDropBoxSize(SIZE szDropBox);
31 |
32 | int GetCurSel() const;
33 | bool GetSelectCloseFlag();
34 | void SetSelectCloseFlag(bool flag);
35 | bool SelectItem(int iIndex, bool bTakeFocus = false, bool bTriggerEvent=true);
36 | bool ExpandItem(int iIndex, bool bExpand = true);
37 | int GetExpandedItem() const;
38 |
39 | bool SetItemIndex(CControlUI* pControl, int iNewIndex);
40 | bool SetMultiItemIndex(CControlUI* pStartControl, int iCount, int iNewStartIndex);
41 | bool Add(CControlUI* pControl);
42 | bool AddAt(CControlUI* pControl, int iIndex);
43 | bool Remove(CControlUI* pControl, bool bDoNotDestroy=false);
44 | bool RemoveAt(int iIndex, bool bDoNotDestroy=false);
45 | void RemoveAll();
46 |
47 | bool Activate();
48 |
49 | bool GetShowText() const;
50 | void SetShowText(bool flag);
51 | RECT GetTextPadding() const;
52 | void SetTextPadding(RECT rc);
53 | LPCTSTR GetNormalImage() const;
54 | void SetNormalImage(LPCTSTR pStrImage);
55 | LPCTSTR GetHotImage() const;
56 | void SetHotImage(LPCTSTR pStrImage);
57 | LPCTSTR GetPushedImage() const;
58 | void SetPushedImage(LPCTSTR pStrImage);
59 | LPCTSTR GetFocusedImage() const;
60 | void SetFocusedImage(LPCTSTR pStrImage);
61 | LPCTSTR GetDisabledImage() const;
62 | void SetDisabledImage(LPCTSTR pStrImage);
63 |
64 | TListInfoUI* GetListInfo();
65 | UINT GetItemFixedHeight();
66 | void SetItemFixedHeight(UINT nHeight);
67 | int GetItemFont(int index);
68 | void SetItemFont(int index);
69 | UINT GetItemTextStyle();
70 | void SetItemTextStyle(UINT uStyle);
71 | RECT GetItemTextPadding() const;
72 | void SetItemTextPadding(RECT rc);
73 | DWORD GetItemTextColor() const;
74 | void SetItemTextColor(DWORD dwTextColor);
75 | DWORD GetItemBkColor() const;
76 | void SetItemBkColor(DWORD dwBkColor);
77 | LPCTSTR GetItemBkImage() const;
78 | void SetItemBkImage(LPCTSTR pStrImage);
79 | bool IsAlternateBk() const;
80 | void SetAlternateBk(bool bAlternateBk);
81 | DWORD GetSelectedItemTextColor() const;
82 | void SetSelectedItemTextColor(DWORD dwTextColor);
83 | DWORD GetSelectedItemBkColor() const;
84 | void SetSelectedItemBkColor(DWORD dwBkColor);
85 | LPCTSTR GetSelectedItemImage() const;
86 | void SetSelectedItemImage(LPCTSTR pStrImage);
87 | DWORD GetHotItemTextColor() const;
88 | void SetHotItemTextColor(DWORD dwTextColor);
89 | DWORD GetHotItemBkColor() const;
90 | void SetHotItemBkColor(DWORD dwBkColor);
91 | LPCTSTR GetHotItemImage() const;
92 | void SetHotItemImage(LPCTSTR pStrImage);
93 | DWORD GetDisabledItemTextColor() const;
94 | void SetDisabledItemTextColor(DWORD dwTextColor);
95 | DWORD GetDisabledItemBkColor() const;
96 | void SetDisabledItemBkColor(DWORD dwBkColor);
97 | LPCTSTR GetDisabledItemImage() const;
98 | void SetDisabledItemImage(LPCTSTR pStrImage);
99 | int GetItemHLineSize() const;
100 | void SetItemHLineSize(int iSize);
101 | DWORD GetItemHLineColor() const;
102 | void SetItemHLineColor(DWORD dwLineColor);
103 | int GetItemVLineSize() const;
104 | void SetItemVLineSize(int iSize);
105 | DWORD GetItemVLineColor() const;
106 | void SetItemVLineColor(DWORD dwLineColor);
107 | bool IsItemShowHtml();
108 | void SetItemShowHtml(bool bShowHtml = true);
109 |
110 | SIZE EstimateSize(SIZE szAvailable);
111 | void SetPos(RECT rc, bool bNeedInvalidate = true);
112 | void Move(SIZE szOffset, bool bNeedInvalidate = true);
113 | void DoEvent(TEventUI& event);
114 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
115 |
116 | bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl);
117 | void PaintText(HDC hDC);
118 | void PaintStatusImage(HDC hDC);
119 |
120 | protected:
121 | CComboWnd* m_pWindow;
122 |
123 | int m_iCurSel;
124 | bool m_bShowText;
125 | bool m_bSelectCloseFlag;
126 | RECT m_rcTextPadding;
127 | CDuiString m_sDropBoxAttributes;
128 | SIZE m_szDropBox;
129 | UINT m_uButtonState;
130 |
131 | TDrawInfo m_diNormal;
132 | TDrawInfo m_diHot;
133 | TDrawInfo m_diPushed;
134 | TDrawInfo m_diFocused;
135 | TDrawInfo m_diDisabled;
136 |
137 | TListInfoUI m_ListInfo;
138 | };
139 |
140 | } // namespace DuiLib
141 |
142 | #endif // __UICOMBO_H__
143 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIDateTime.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIDateTime.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIEdit.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIEDIT_H__
2 | #define __UIEDIT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class CEditWnd;
9 |
10 | class DUILIB_API CEditUI : public CLabelUI
11 | {
12 | friend class CEditWnd;
13 | public:
14 | CEditUI();
15 |
16 | LPCTSTR GetClass() const;
17 | LPVOID GetInterface(LPCTSTR pstrName);
18 | UINT GetControlFlags() const;
19 | HWND GetNativeWindow() const;
20 |
21 | void SetEnabled(bool bEnable = true);
22 | void SetText(LPCTSTR pstrText);
23 | void SetMaxChar(UINT uMax);
24 | UINT GetMaxChar();
25 | void SetReadOnly(bool bReadOnly);
26 | bool IsReadOnly() const;
27 | void SetPasswordMode(bool bPasswordMode);
28 | bool IsPasswordMode() const;
29 | void SetPasswordChar(TCHAR cPasswordChar);
30 | TCHAR GetPasswordChar() const;
31 | bool IsAutoSelAll();
32 | void SetAutoSelAll(bool bAutoSelAll);
33 | void SetNumberOnly(bool bNumberOnly);
34 | bool IsNumberOnly() const;
35 | int GetWindowStyls() const;
36 | HWND GetNativeEditHWND() const;
37 |
38 | LPCTSTR GetNormalImage();
39 | void SetNormalImage(LPCTSTR pStrImage);
40 | LPCTSTR GetHotImage();
41 | void SetHotImage(LPCTSTR pStrImage);
42 | LPCTSTR GetFocusedImage();
43 | void SetFocusedImage(LPCTSTR pStrImage);
44 | LPCTSTR GetDisabledImage();
45 | void SetDisabledImage(LPCTSTR pStrImage);
46 | void SetNativeEditBkColor(DWORD dwBkColor);
47 | DWORD GetNativeEditBkColor() const;
48 |
49 | void SetSel(long nStartChar, long nEndChar);
50 | void SetSelAll();
51 | void SetReplaceSel(LPCTSTR lpszReplace);
52 |
53 | void SetPos(RECT rc, bool bNeedInvalidate = true);
54 | void Move(SIZE szOffset, bool bNeedInvalidate = true);
55 | void SetVisible(bool bVisible = true);
56 | void SetInternVisible(bool bVisible = true);
57 | SIZE EstimateSize(SIZE szAvailable);
58 | void DoEvent(TEventUI& event);
59 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
60 |
61 | void PaintStatusImage(HDC hDC);
62 | void PaintText(HDC hDC);
63 |
64 | protected:
65 | CEditWnd* m_pWindow;
66 |
67 | UINT m_uMaxChar;
68 | bool m_bReadOnly;
69 | bool m_bPasswordMode;
70 | bool m_bAutoSelAll;
71 | TCHAR m_cPasswordChar;
72 | UINT m_uButtonState;
73 | DWORD m_dwEditbkColor;
74 | int m_iWindowStyls;
75 |
76 | TDrawInfo m_diNormal;
77 | TDrawInfo m_diHot;
78 | TDrawInfo m_diFocused;
79 | TDrawInfo m_diDisabled;
80 | };
81 | }
82 | #endif // __UIEDIT_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIFlash.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIFlash.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIGifAnim.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIGifAnim.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UILabel.h:
--------------------------------------------------------------------------------
1 | #ifndef __UILABEL_H__
2 | #define __UILABEL_H__
3 |
4 | #pragma once
5 |
6 | #define _USE_GDIPLUS 1
7 |
8 | #ifdef _USE_GDIPLUS
9 | #include
10 | #pragma comment( lib, "GdiPlus.lib" )
11 | // UMU: DO NOT use "using namespace" in .h file
12 | //using namespace Gdiplus;
13 | class DUILIB_API Gdiplus::RectF;
14 | struct DUILIB_API Gdiplus::GdiplusStartupInput;
15 |
16 | using Gdiplus::RectF;
17 | using Gdiplus::GdiplusStartupInput;
18 | #endif
19 |
20 |
21 | namespace DuiLib
22 | {
23 | class DUILIB_API CLabelUI : public CControlUI
24 | {
25 | public:
26 | CLabelUI();
27 | ~CLabelUI();
28 |
29 | LPCTSTR GetClass() const;
30 | LPVOID GetInterface(LPCTSTR pstrName);
31 |
32 | void SetFixedWidth(int cx);
33 | void SetFixedHeight(int cy);
34 | void SetText(LPCTSTR pstrText);
35 |
36 | void SetTextStyle(UINT uStyle);
37 | UINT GetTextStyle() const;
38 | bool IsMultiLine();
39 | void SetMultiLine(bool bMultiLine = true);
40 | void SetTextColor(DWORD dwTextColor);
41 | DWORD GetTextColor() const;
42 | void SetDisabledTextColor(DWORD dwTextColor);
43 | DWORD GetDisabledTextColor() const;
44 | void SetFont(int index);
45 | int GetFont() const;
46 | RECT GetTextPadding() const;
47 | void SetTextPadding(RECT rc);
48 | bool IsShowHtml();
49 | void SetShowHtml(bool bShowHtml = true);
50 |
51 | SIZE EstimateSize(SIZE szAvailable);
52 | void DoEvent(TEventUI& event);
53 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
54 |
55 | void PaintText(HDC hDC);
56 |
57 | #ifdef _USE_GDIPLUS
58 | void SetEnabledEffect(bool _EnabledEffect);
59 | bool GetEnabledEffect();
60 | void SetEnabledLuminous(bool bEnableLuminous);
61 | bool GetEnabledLuminous();
62 | void SetLuminousFuzzy(float fFuzzy);
63 | float GetLuminousFuzzy();
64 | void SetGradientLength(int _GradientLength);
65 | int GetGradientLength();
66 | void SetShadowOffset(int _offset,int _angle);
67 | RectF GetShadowOffset();
68 | void SetTextColor1(DWORD _TextColor1);
69 | DWORD GetTextColor1();
70 | void SetTextShadowColorA(DWORD _TextShadowColorA);
71 | DWORD GetTextShadowColorA();
72 | void SetTextShadowColorB(DWORD _TextShadowColorB);
73 | DWORD GetTextShadowColorB();
74 | void SetStrokeColor(DWORD _StrokeColor);
75 | DWORD GetStrokeColor();
76 | void SetGradientAngle(int _SetGradientAngle);
77 | int GetGradientAngle();
78 | void SetEnabledStroke(bool _EnabledStroke);
79 | bool GetEnabledStroke();
80 | void SetEnabledShadow(bool _EnabledShadowe);
81 | bool GetEnabledShadow();
82 | #endif
83 |
84 | protected:
85 | LPWSTR m_pWideText;
86 | DWORD m_dwTextColor;
87 | DWORD m_dwDisabledTextColor;
88 | int m_iFont;
89 | UINT m_uTextStyle;
90 | RECT m_rcTextPadding;
91 | bool m_bShowHtml;
92 | SIZE m_szAvailableLast;
93 | SIZE m_cxyFixedLast;
94 | bool m_bNeedEstimateSize;
95 |
96 | float m_fLuminousFuzzy;
97 | int m_GradientLength;
98 | int m_GradientAngle;
99 | bool m_EnableEffect;
100 | bool m_bEnableLuminous;
101 | bool m_EnabledStroke;
102 | bool m_EnabledShadow;
103 | DWORD m_dwTextColor1;
104 | DWORD m_dwTextShadowColorA;
105 | DWORD m_dwTextShadowColorB;
106 | DWORD m_dwStrokeColor;
107 | RectF m_ShadowOffset;
108 | ULONG_PTR m_gdiplusToken;
109 | #ifdef _USE_GDIPLUS
110 | GdiplusStartupInput m_gdiplusStartupInput;
111 | #endif
112 | };
113 | }
114 |
115 | #endif // __UILABEL_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIList.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIList.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIOption.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIOPTION_H__
2 | #define __UIOPTION_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API COptionUI : public CButtonUI
9 | {
10 | public:
11 | COptionUI();
12 | ~COptionUI();
13 |
14 | LPCTSTR GetClass() const;
15 | LPVOID GetInterface(LPCTSTR pstrName);
16 |
17 | void SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);
18 |
19 | bool Activate();
20 | void SetEnabled(bool bEnable = true);
21 |
22 | LPCTSTR GetSelectedImage();
23 | void SetSelectedImage(LPCTSTR pStrImage);
24 |
25 | LPCTSTR GetSelectedHotImage();
26 | void SetSelectedHotImage(LPCTSTR pStrImage);
27 |
28 | void SetSelectedTextColor(DWORD dwTextColor);
29 | DWORD GetSelectedTextColor();
30 |
31 | void SetSelectedBkColor(DWORD dwBkColor);
32 | DWORD GetSelectedBkColor();
33 | DUI_DEPRECATED DWORD GetSelectBkColor(); // deprecated, use GetSelectedBkColor instead
34 |
35 | LPCTSTR GetForeImage();
36 | void SetForeImage(LPCTSTR pStrImage);
37 |
38 | LPCTSTR GetGroup() const;
39 | void SetGroup(LPCTSTR pStrGroupName = NULL);
40 | bool IsSelected() const;
41 | virtual void Selected(bool bSelected, bool bTriggerEvent=true);
42 |
43 | SIZE EstimateSize(SIZE szAvailable);
44 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
45 |
46 | void PaintStatusImage(HDC hDC);
47 | void PaintText(HDC hDC);
48 |
49 | protected:
50 | bool m_bSelected;
51 | CDuiString m_sGroupName;
52 |
53 | DWORD m_dwSelectedBkColor;
54 | DWORD m_dwSelectedTextColor;
55 |
56 | TDrawInfo m_diSelected;
57 | TDrawInfo m_diSelectedHot;
58 | TDrawInfo m_diFore;
59 | };
60 |
61 | } // namespace DuiLib
62 |
63 | #endif // __UIOPTION_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIProgress.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIPROGRESS_H__
2 | #define __UIPROGRESS_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CProgressUI : public CLabelUI
9 | {
10 | public:
11 | CProgressUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 |
16 | bool IsHorizontal();
17 | void SetHorizontal(bool bHorizontal = true);
18 | int GetMinValue() const;
19 | void SetMinValue(int nMin);
20 | int GetMaxValue() const;
21 | void SetMaxValue(int nMax);
22 | int GetValue() const;
23 | void SetValue(int nValue);
24 | LPCTSTR GetForeImage() const;
25 | void SetForeImage(LPCTSTR pStrImage);
26 |
27 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
28 | void PaintStatusImage(HDC hDC);
29 |
30 | protected:
31 | bool m_bHorizontal;
32 | int m_nMax;
33 | int m_nMin;
34 | int m_nValue;
35 |
36 | TDrawInfo m_diFore;
37 | };
38 |
39 | } // namespace DuiLib
40 |
41 | #endif // __UIPROGRESS_H__
42 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIRichEdit.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIRichEdit.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIScrollBar.h:
--------------------------------------------------------------------------------
1 | #ifndef __UISCROLLBAR_H__
2 | #define __UISCROLLBAR_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CScrollBarUI : public CControlUI
9 | {
10 | public:
11 | CScrollBarUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 |
16 | CContainerUI* GetOwner() const;
17 | void SetOwner(CContainerUI* pOwner);
18 |
19 | void SetVisible(bool bVisible = true);
20 | void SetEnabled(bool bEnable = true);
21 | void SetFocus();
22 |
23 | bool IsHorizontal();
24 | void SetHorizontal(bool bHorizontal = true);
25 | int GetScrollRange() const;
26 | void SetScrollRange(int nRange);
27 | int GetScrollPos() const;
28 | void SetScrollPos(int nPos, bool bTriggerEvent=true);
29 | int GetLineSize() const;
30 | void SetLineSize(int nSize);
31 | int GetScrollUnit() const;
32 | void SetScrollUnit(int iUnit);
33 |
34 | bool GetShowButton1();
35 | void SetShowButton1(bool bShow);
36 | DWORD GetButton1Color() const;
37 | void SetButton1Color(DWORD dwColor);
38 | LPCTSTR GetButton1NormalImage();
39 | void SetButton1NormalImage(LPCTSTR pStrImage);
40 | LPCTSTR GetButton1HotImage();
41 | void SetButton1HotImage(LPCTSTR pStrImage);
42 | LPCTSTR GetButton1PushedImage();
43 | void SetButton1PushedImage(LPCTSTR pStrImage);
44 | LPCTSTR GetButton1DisabledImage();
45 | void SetButton1DisabledImage(LPCTSTR pStrImage);
46 |
47 | bool GetShowButton2();
48 | void SetShowButton2(bool bShow);
49 | DWORD GetButton2Color() const;
50 | void SetButton2Color(DWORD dwColor);
51 | LPCTSTR GetButton2NormalImage();
52 | void SetButton2NormalImage(LPCTSTR pStrImage);
53 | LPCTSTR GetButton2HotImage();
54 | void SetButton2HotImage(LPCTSTR pStrImage);
55 | LPCTSTR GetButton2PushedImage();
56 | void SetButton2PushedImage(LPCTSTR pStrImage);
57 | LPCTSTR GetButton2DisabledImage();
58 | void SetButton2DisabledImage(LPCTSTR pStrImage);
59 |
60 | DWORD GetThumbColor() const;
61 | void SetThumbColor(DWORD dwColor);
62 | LPCTSTR GetThumbNormalImage();
63 | void SetThumbNormalImage(LPCTSTR pStrImage);
64 | LPCTSTR GetThumbHotImage();
65 | void SetThumbHotImage(LPCTSTR pStrImage);
66 | LPCTSTR GetThumbPushedImage();
67 | void SetThumbPushedImage(LPCTSTR pStrImage);
68 | LPCTSTR GetThumbDisabledImage();
69 | void SetThumbDisabledImage(LPCTSTR pStrImage);
70 |
71 | LPCTSTR GetRailNormalImage();
72 | void SetRailNormalImage(LPCTSTR pStrImage);
73 | LPCTSTR GetRailHotImage();
74 | void SetRailHotImage(LPCTSTR pStrImage);
75 | LPCTSTR GetRailPushedImage();
76 | void SetRailPushedImage(LPCTSTR pStrImage);
77 | LPCTSTR GetRailDisabledImage();
78 | void SetRailDisabledImage(LPCTSTR pStrImage);
79 |
80 | LPCTSTR GetBkNormalImage();
81 | void SetBkNormalImage(LPCTSTR pStrImage);
82 | LPCTSTR GetBkHotImage();
83 | void SetBkHotImage(LPCTSTR pStrImage);
84 | LPCTSTR GetBkPushedImage();
85 | void SetBkPushedImage(LPCTSTR pStrImage);
86 | LPCTSTR GetBkDisabledImage();
87 | void SetBkDisabledImage(LPCTSTR pStrImage);
88 |
89 | void SetPos(RECT rc, bool bNeedInvalidate = true);
90 | void DoEvent(TEventUI& event);
91 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
92 |
93 | bool DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl);
94 |
95 | void PaintBk(HDC hDC);
96 | void PaintButton1(HDC hDC);
97 | void PaintButton2(HDC hDC);
98 | void PaintThumb(HDC hDC);
99 | void PaintRail(HDC hDC);
100 |
101 | protected:
102 |
103 | enum
104 | {
105 | DEFAULT_SCROLLBAR_SIZE = 16,
106 | DEFAULT_TIMERID = 10,
107 | };
108 |
109 | bool m_bHorizontal;
110 | int m_nRange;
111 | int m_nScrollPos;
112 | int m_nLineSize;
113 | int m_nScrollUnit;
114 | CContainerUI* m_pOwner;
115 | POINT ptLastMouse;
116 | int m_nLastScrollPos;
117 | int m_nLastScrollOffset;
118 | int m_nScrollRepeatDelay;
119 |
120 | TDrawInfo m_diBkNormal;
121 | TDrawInfo m_diBkHot;
122 | TDrawInfo m_diBkPushed;
123 | TDrawInfo m_diBkDisabled;
124 |
125 | bool m_bShowButton1;
126 | RECT m_rcButton1;
127 | UINT m_uButton1State;
128 | DWORD m_dwButton1Color;
129 | TDrawInfo m_diButton1Normal;
130 | TDrawInfo m_diButton1Hot;
131 | TDrawInfo m_diButton1Pushed;
132 | TDrawInfo m_diButton1Disabled;
133 |
134 | bool m_bShowButton2;
135 | RECT m_rcButton2;
136 | UINT m_uButton2State;
137 | DWORD m_dwButton2Color;
138 | TDrawInfo m_diButton2Normal;
139 | TDrawInfo m_diButton2Hot;
140 | TDrawInfo m_diButton2Pushed;
141 | TDrawInfo m_diButton2Disabled;
142 |
143 | RECT m_rcThumb;
144 | UINT m_uThumbState;
145 | DWORD m_dwThumbColor;
146 | TDrawInfo m_diThumbNormal;
147 | TDrawInfo m_diThumbHot;
148 | TDrawInfo m_diThumbPushed;
149 | TDrawInfo m_diThumbDisabled;
150 |
151 | TDrawInfo m_diRailNormal;
152 | TDrawInfo m_diRailHot;
153 | TDrawInfo m_diRailPushed;
154 | TDrawInfo m_diRailDisabled;
155 | };
156 | }
157 |
158 | #endif // __UISCROLLBAR_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UISlider.h:
--------------------------------------------------------------------------------
1 | #ifndef __UISLIDER_H__
2 | #define __UISLIDER_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CSliderUI : public CProgressUI
9 | {
10 | public:
11 | CSliderUI();
12 |
13 | LPCTSTR GetClass() const;
14 | UINT GetControlFlags() const;
15 | LPVOID GetInterface(LPCTSTR pstrName);
16 |
17 | void SetEnabled(bool bEnable = true);
18 |
19 | int GetChangeStep();
20 | void SetChangeStep(int step);
21 | void SetThumbSize(SIZE szXY);
22 | RECT GetThumbRect() const;
23 | bool IsImmMode() const;
24 | void SetImmMode(bool bImmMode);
25 | LPCTSTR GetThumbImage() const;
26 | void SetThumbImage(LPCTSTR pStrImage);
27 | LPCTSTR GetThumbHotImage() const;
28 | void SetThumbHotImage(LPCTSTR pStrImage);
29 | LPCTSTR GetThumbPushedImage() const;
30 | void SetThumbPushedImage(LPCTSTR pStrImage);
31 |
32 | void DoEvent(TEventUI& event);
33 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
34 | void PaintStatusImage(HDC hDC);
35 |
36 | protected:
37 | SIZE m_szThumb;
38 | UINT m_uButtonState;
39 | int m_nStep;
40 | bool m_bImmMode;
41 |
42 | TDrawInfo m_diThumb;
43 | TDrawInfo m_diThumbHot;
44 | TDrawInfo m_diThumbPushed;
45 | };
46 | }
47 |
48 | #endif // __UISLIDER_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIText.h:
--------------------------------------------------------------------------------
1 | #ifndef __UITEXT_H__
2 | #define __UITEXT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CTextUI : public CLabelUI
9 | {
10 | public:
11 | CTextUI();
12 | ~CTextUI();
13 |
14 | LPCTSTR GetClass() const;
15 | UINT GetControlFlags() const;
16 | LPVOID GetInterface(LPCTSTR pstrName);
17 |
18 | CDuiString* GetLinkContent(int iIndex);
19 |
20 | void DoEvent(TEventUI& event);
21 |
22 | void PaintText(HDC hDC);
23 |
24 | protected:
25 | enum { MAX_LINK = 8 };
26 | int m_nLinks;
27 | RECT m_rcLinks[MAX_LINK];
28 | CDuiString m_sLinks[MAX_LINK];
29 | int m_nHoverLink;
30 | };
31 |
32 | } // namespace DuiLib
33 |
34 | #endif //__UITEXT_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UITreeView.h:
--------------------------------------------------------------------------------
1 | #ifndef __UITREEVIEW_H__
2 | #define __UITREEVIEW_H__
3 |
4 | #include
5 | using namespace std;
6 |
7 | #pragma once
8 |
9 | namespace DuiLib
10 | {
11 | class CTreeViewUI;
12 | class CCheckBoxUI;
13 | class CLabelUI;
14 | class COptionUI;
15 |
16 | class DUILIB_API CTreeNodeUI : public CListContainerElementUI
17 | {
18 | public:
19 | CTreeNodeUI(CTreeNodeUI* _ParentNode = NULL);
20 | ~CTreeNodeUI(void);
21 |
22 | public:
23 | LPCTSTR GetClass() const;
24 | LPVOID GetInterface(LPCTSTR pstrName);
25 | void DoEvent(TEventUI& event);
26 | void Invalidate();
27 | bool Select(bool bSelect = true, bool bTriggerEvent=true);
28 |
29 | bool Add(CControlUI* _pTreeNodeUI);
30 | bool AddAt(CControlUI* pControl, int iIndex);
31 |
32 | void SetVisibleTag(bool _IsVisible);
33 | bool GetVisibleTag();
34 | void SetItemText(LPCTSTR pstrValue);
35 | CDuiString GetItemText();
36 | void CheckBoxSelected(bool _Selected);
37 | bool IsCheckBoxSelected() const;
38 | bool IsHasChild() const;
39 | long GetTreeLevel() const;
40 | bool AddChildNode(CTreeNodeUI* _pTreeNodeUI);
41 | bool RemoveAt(CTreeNodeUI* _pTreeNodeUI);
42 | void SetParentNode(CTreeNodeUI* _pParentTreeNode);
43 | CTreeNodeUI* GetParentNode();
44 | long GetCountChild();
45 | void SetTreeView(CTreeViewUI* _CTreeViewUI);
46 | CTreeViewUI* GetTreeView();
47 | CTreeNodeUI* GetChildNode(int _nIndex);
48 | void SetVisibleFolderBtn(bool _IsVisibled);
49 | bool GetVisibleFolderBtn();
50 | void SetVisibleCheckBtn(bool _IsVisibled);
51 | bool GetVisibleCheckBtn();
52 | void SetItemTextColor(DWORD _dwItemTextColor);
53 | DWORD GetItemTextColor() const;
54 | void SetItemHotTextColor(DWORD _dwItemHotTextColor);
55 | DWORD GetItemHotTextColor() const;
56 | void SetSelItemTextColor(DWORD _dwSelItemTextColor);
57 | DWORD GetSelItemTextColor() const;
58 | void SetSelItemHotTextColor(DWORD _dwSelHotItemTextColor);
59 | DWORD GetSelItemHotTextColor() const;
60 |
61 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
62 |
63 | CDuiPtrArray GetTreeNodes();
64 |
65 | int GetTreeIndex();
66 | int GetNodeIndex();
67 |
68 | private:
69 | CTreeNodeUI* GetLastNode();
70 | CTreeNodeUI* CalLocation(CTreeNodeUI* _pTreeNodeUI);
71 | public:
72 | CHorizontalLayoutUI* GetTreeNodeHoriznotal() const {return pHoriz;};
73 | CCheckBoxUI* GetFolderButton() const {return pFolderButton;};
74 | CLabelUI* GetDottedLine() const {return pDottedLine;};
75 | CCheckBoxUI* GetCheckBox() const {return pCheckBox;};
76 | COptionUI* GetItemButton() const {return pItemButton;};
77 |
78 | private:
79 | long m_iTreeLavel;
80 | bool m_bIsVisable;
81 | bool m_bIsCheckBox;
82 | DWORD m_dwItemTextColor;
83 | DWORD m_dwItemHotTextColor;
84 | DWORD m_dwSelItemTextColor;
85 | DWORD m_dwSelItemHotTextColor;
86 |
87 | CTreeViewUI* pTreeView;
88 | CHorizontalLayoutUI* pHoriz;
89 | CCheckBoxUI* pFolderButton;
90 | CLabelUI* pDottedLine;
91 | CCheckBoxUI* pCheckBox;
92 | COptionUI* pItemButton;
93 |
94 | CTreeNodeUI* pParentTreeNode;
95 |
96 | CDuiPtrArray mTreeNodes;
97 | };
98 |
99 | class DUILIB_API CTreeViewUI : public CListUI,public INotifyUI
100 | {
101 | public:
102 | CTreeViewUI(void);
103 | ~CTreeViewUI(void);
104 |
105 | public:
106 | virtual LPCTSTR GetClass() const;
107 | virtual LPVOID GetInterface(LPCTSTR pstrName);
108 | virtual bool Add(CControlUI* pControl);
109 | virtual bool AddAt(CControlUI* pControl, int iIndex);
110 | virtual bool Remove(CControlUI* pControl, bool bDoNotDestroy=false);
111 | virtual bool RemoveAt(int iIndex, bool bDoNotDestroy=false);
112 | virtual void RemoveAll();
113 |
114 | long AddAt(CTreeNodeUI* pControl, int iIndex);
115 | bool AddAt(CTreeNodeUI* pControl,CTreeNodeUI* _IndexNode);
116 |
117 | virtual bool OnCheckBoxChanged(void* param);
118 | virtual bool OnFolderChanged(void* param);
119 | virtual bool OnDBClickItem(void* param);
120 | virtual bool SetItemCheckBox(bool _Selected,CTreeNodeUI* _TreeNode = NULL);
121 | virtual void SetItemExpand(bool _Expanded,CTreeNodeUI* _TreeNode = NULL);
122 | virtual void Notify(TNotifyUI& msg);
123 | virtual void SetVisibleFolderBtn(bool _IsVisibled);
124 | virtual bool GetVisibleFolderBtn();
125 | virtual void SetVisibleCheckBtn(bool _IsVisibled);
126 | virtual bool GetVisibleCheckBtn();
127 | virtual void SetItemMinWidth(UINT _ItemMinWidth);
128 | virtual UINT GetItemMinWidth();
129 | virtual void SetItemTextColor(DWORD _dwItemTextColor);
130 | virtual void SetItemHotTextColor(DWORD _dwItemHotTextColor);
131 | virtual void SetSelItemTextColor(DWORD _dwSelItemTextColor);
132 | virtual void SetSelItemHotTextColor(DWORD _dwSelHotItemTextColor);
133 |
134 | virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
135 | private:
136 | UINT m_uItemMinWidth;
137 | bool m_bVisibleFolderBtn;
138 | bool m_bVisibleCheckBtn;
139 | };
140 | }
141 |
142 |
143 | #endif // __UITREEVIEW_H__
144 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Control/UIWebBrowser.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Control/UIWebBrowser.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIBase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Core/UIBase.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIContainer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Core/UIContainer.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIControl.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Core/UIControl.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIDefine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Core/UIDefine.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIDlgBuilder.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIDLGBUILDER_H__
2 | #define __UIDLGBUILDER_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 |
8 | class IDialogBuilderCallback
9 | {
10 | public:
11 | virtual CControlUI* CreateControl(LPCTSTR pstrClass) = 0;
12 | };
13 |
14 |
15 | class DUILIB_API CDialogBuilder
16 | {
17 | public:
18 | CDialogBuilder();
19 | CControlUI* Create(STRINGorID xml, LPCTSTR type = NULL, IDialogBuilderCallback* pCallback = NULL,
20 | CPaintManagerUI* pManager = NULL, CControlUI* pParent = NULL);
21 | CControlUI* Create(IDialogBuilderCallback* pCallback = NULL, CPaintManagerUI* pManager = NULL,
22 | CControlUI* pParent = NULL);
23 |
24 | CMarkup* GetMarkup();
25 |
26 | void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;
27 | void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;
28 | private:
29 | CControlUI* _Parse(CMarkupNode* parent, CControlUI* pParent = NULL, CPaintManagerUI* pManager = NULL);
30 |
31 | CMarkup m_xml;
32 | IDialogBuilderCallback* m_pCallback;
33 | LPCTSTR m_pstrtype;
34 | };
35 |
36 | } // namespace DuiLib
37 |
38 | #endif // __UIDLGBUILDER_H__
39 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIManager.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIMANAGER_H__
2 | #define __UIMANAGER_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 | /////////////////////////////////////////////////////////////////////////////////////
8 | //
9 |
10 | class CControlUI;
11 |
12 |
13 | /////////////////////////////////////////////////////////////////////////////////////
14 | //
15 |
16 | typedef enum EVENTTYPE_UI
17 | {
18 | UIEVENT__FIRST = 1,
19 | UIEVENT__KEYBEGIN,
20 | UIEVENT_KEYDOWN,
21 | UIEVENT_KEYUP,
22 | UIEVENT_CHAR,
23 | UIEVENT_SYSKEY,
24 | UIEVENT__KEYEND,
25 | UIEVENT__MOUSEBEGIN,
26 | UIEVENT_MOUSEMOVE,
27 | UIEVENT_MOUSELEAVE,
28 | UIEVENT_MOUSEENTER,
29 | UIEVENT_MOUSEHOVER,
30 | UIEVENT_BUTTONDOWN,
31 | UIEVENT_BUTTONUP,
32 | UIEVENT_RBUTTONDOWN,
33 | UIEVENT_DBLCLICK,
34 | UIEVENT_CONTEXTMENU,
35 | UIEVENT_SCROLLWHEEL,
36 | UIEVENT__MOUSEEND,
37 | UIEVENT_KILLFOCUS,
38 | UIEVENT_SETFOCUS,
39 | UIEVENT_WINDOWSIZE,
40 | UIEVENT_SETCURSOR,
41 | UIEVENT_TIMER,
42 | UIEVENT_NOTIFY,
43 | UIEVENT_COMMAND,
44 | UIEVENT__LAST,
45 | };
46 |
47 | /////////////////////////////////////////////////////////////////////////////////////
48 | //
49 |
50 | // Flags for CControlUI::GetControlFlags()
51 | #define UIFLAG_TABSTOP 0x00000001
52 | #define UIFLAG_SETCURSOR 0x00000002
53 | #define UIFLAG_WANTRETURN 0x00000004
54 |
55 | // Flags for FindControl()
56 | #define UIFIND_ALL 0x00000000
57 | #define UIFIND_VISIBLE 0x00000001
58 | #define UIFIND_ENABLED 0x00000002
59 | #define UIFIND_HITTEST 0x00000004
60 | #define UIFIND_UPDATETEST 0x00000008
61 | #define UIFIND_TOP_FIRST 0x00000010
62 | #define UIFIND_ME_FIRST 0x80000000
63 |
64 | // Flags for the CDialogLayout stretching
65 | #define UISTRETCH_NEWGROUP 0x00000001
66 | #define UISTRETCH_NEWLINE 0x00000002
67 | #define UISTRETCH_MOVE_X 0x00000004
68 | #define UISTRETCH_MOVE_Y 0x00000008
69 | #define UISTRETCH_SIZE_X 0x00000010
70 | #define UISTRETCH_SIZE_Y 0x00000020
71 |
72 | // Flags used for controlling the paint
73 | #define UISTATE_FOCUSED 0x00000001
74 | #define UISTATE_SELECTED 0x00000002
75 | #define UISTATE_DISABLED 0x00000004
76 | #define UISTATE_HOT 0x00000008
77 | #define UISTATE_PUSHED 0x00000010
78 | #define UISTATE_READONLY 0x00000020
79 | #define UISTATE_CAPTURED 0x00000040
80 |
81 |
82 |
83 | /////////////////////////////////////////////////////////////////////////////////////
84 | //
85 |
86 | typedef struct DUILIB_API tagTFontInfo
87 | {
88 | HFONT hFont;
89 | CDuiString sFontName;
90 | int iSize;
91 | bool bBold;
92 | bool bUnderline;
93 | bool bItalic;
94 | TEXTMETRIC tm;
95 | } TFontInfo;
96 |
97 | typedef struct DUILIB_API tagTImageInfo
98 | {
99 | HBITMAP hBitmap;
100 | LPBYTE pBits;
101 | LPBYTE pSrcBits;
102 | int nX;
103 | int nY;
104 | bool bAlpha;
105 | bool bUseHSL;
106 | CDuiString sResType;
107 | DWORD dwMask;
108 | } TImageInfo;
109 |
110 | typedef struct DUILIB_API tagTDrawInfo
111 | {
112 | tagTDrawInfo();
113 | tagTDrawInfo(LPCTSTR lpsz);
114 | void Clear();
115 | CDuiString sDrawString;
116 | CDuiString sImageName;
117 | bool bLoaded;
118 | const TImageInfo* pImageInfo;
119 | RECT rcDestOffset;
120 | RECT rcBmpPart;
121 | RECT rcScale9;
122 | BYTE uFade;
123 | bool bHole;
124 | bool bTiledX;
125 | bool bTiledY;
126 | } TDrawInfo;
127 |
128 | typedef struct DUILIB_API tagTPercentInfo
129 | {
130 | double left;
131 | double top;
132 | double right;
133 | double bottom;
134 | } TPercentInfo;
135 |
136 | typedef struct DUILIB_API tagTResInfo
137 | {
138 | DWORD m_dwDefaultDisabledColor;
139 | DWORD m_dwDefaultFontColor;
140 | DWORD m_dwDefaultLinkFontColor;
141 | DWORD m_dwDefaultLinkHoverFontColor;
142 | DWORD m_dwDefaultSelectedBkColor;
143 | TFontInfo m_DefaultFontInfo;
144 | CDuiStringPtrMap m_CustomFonts;
145 | CDuiStringPtrMap m_ImageHash;
146 | CDuiStringPtrMap m_AttrHash;
147 | CDuiStringPtrMap m_MultiLanguageHash;
148 | } TResInfo;
149 |
150 | // Structure for notifications from the system
151 | // to the control implementation.
152 | typedef struct DUILIB_API tagTEventUI
153 | {
154 | int Type;
155 | CControlUI* pSender;
156 | DWORD dwTimestamp;
157 | POINT ptMouse;
158 | TCHAR chKey;
159 | WORD wKeyState;
160 | WPARAM wParam;
161 | LPARAM lParam;
162 | } TEventUI;
163 |
164 | // Listener interface
165 | class DUILIB_API INotifyUI
166 | {
167 | public:
168 | virtual void Notify(TNotifyUI& msg) = 0;
169 | };
170 |
171 | // MessageFilter interface
172 | class DUILIB_API IMessageFilterUI
173 | {
174 | public:
175 | virtual LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled) = 0;
176 | };
177 |
178 | class DUILIB_API ITranslateAccelerator
179 | {
180 | public:
181 | virtual LRESULT TranslateAccelerator(MSG *pMsg) = 0;
182 | };
183 |
184 |
185 | /////////////////////////////////////////////////////////////////////////////////////
186 | //
187 | typedef CControlUI* (*LPCREATECONTROL)(LPCTSTR pstrType);
188 |
189 |
190 | class DUILIB_API CPaintManagerUI
191 | {
192 | public:
193 | CPaintManagerUI();
194 | ~CPaintManagerUI();
195 |
196 | public:
197 | void Init(HWND hWnd, LPCTSTR pstrName = NULL);
198 | bool IsUpdateNeeded() const;
199 | void NeedUpdate();
200 | void Invalidate();
201 | void Invalidate(RECT& rcItem);
202 |
203 | LPCTSTR GetName() const;
204 | HDC GetPaintDC() const;
205 | HBITMAP GetPaintOffscreenBitmap();
206 | HWND GetPaintWindow() const;
207 | HWND GetTooltipWindow() const;
208 | int GetTooltipWindowWidth() const;
209 | void SetTooltipWindowWidth(int iWidth);
210 | int GetHoverTime() const;
211 | void SetHoverTime(int iTime);
212 |
213 | POINT GetMousePos() const;
214 | SIZE GetClientSize() const;
215 | SIZE GetInitSize();
216 | void SetInitSize(int cx, int cy);
217 | RECT& GetSizeBox();
218 | void SetSizeBox(RECT& rcSizeBox);
219 | RECT& GetCaptionRect();
220 | void SetCaptionRect(RECT& rcCaption);
221 | SIZE GetRoundCorner() const;
222 | void SetRoundCorner(int cx, int cy);
223 | SIZE GetMinInfo() const;
224 | void SetMinInfo(int cx, int cy);
225 | SIZE GetMaxInfo() const;
226 | void SetMaxInfo(int cx, int cy);
227 | bool IsShowUpdateRect() const;
228 | void SetShowUpdateRect(bool show);
229 | bool IsNoActivate();
230 | void SetNoActivate(bool bNoActivate);
231 |
232 | BYTE GetOpacity() const;
233 | void SetOpacity(BYTE nOpacity);
234 |
235 | bool IsLayered();
236 | void SetLayered(bool bLayered);
237 | RECT& GetLayeredInset();
238 | void SetLayeredInset(RECT& rcLayeredInset);
239 | BYTE GetLayeredOpacity();
240 | void SetLayeredOpacity(BYTE nOpacity);
241 | LPCTSTR GetLayeredImage();
242 | void SetLayeredImage(LPCTSTR pstrImage);
243 |
244 | static HINSTANCE GetInstance();
245 | static CDuiString GetInstancePath();
246 | static CDuiString GetCurrentPath();
247 | static HINSTANCE GetResourceDll();
248 | static const CDuiString& GetResourcePath();
249 | static const CDuiString& GetResourceZip();
250 | static bool IsCachedResourceZip();
251 | static HANDLE GetResourceZipHandle();
252 | static void SetInstance(HINSTANCE hInst);
253 | static void SetCurrentPath(LPCTSTR pStrPath);
254 | static void SetResourceDll(HINSTANCE hInst);
255 | static void SetResourcePath(LPCTSTR pStrPath);
256 | static void SetResourceZip(LPVOID pVoid, unsigned int len);
257 | static void SetResourceZip(LPCTSTR pstrZip, bool bCachedResourceZip = false);
258 | static bool GetHSL(short* H, short* S, short* L);
259 | static void SetHSL(bool bUseHSL, short H, short S, short L); // H:0~360, S:0~200, L:0~200
260 | static void ReloadSkin();
261 | static CPaintManagerUI* GetPaintManager(LPCTSTR pstrName);
262 | static CDuiPtrArray* GetPaintManagers();
263 | static bool LoadPlugin(LPCTSTR pstrModuleName);
264 | static CDuiPtrArray* GetPlugins();
265 |
266 | bool IsForceUseSharedRes() const;
267 | void SetForceUseSharedRes(bool bForce);
268 |
269 | DWORD GetDefaultDisabledColor() const;
270 | void SetDefaultDisabledColor(DWORD dwColor, bool bShared = false);
271 | DWORD GetDefaultFontColor() const;
272 | void SetDefaultFontColor(DWORD dwColor, bool bShared = false);
273 | DWORD GetDefaultLinkFontColor() const;
274 | void SetDefaultLinkFontColor(DWORD dwColor, bool bShared = false);
275 | DWORD GetDefaultLinkHoverFontColor() const;
276 | void SetDefaultLinkHoverFontColor(DWORD dwColor, bool bShared = false);
277 | DWORD GetDefaultSelectedBkColor() const;
278 | void SetDefaultSelectedBkColor(DWORD dwColor, bool bShared = false);
279 |
280 | TFontInfo* GetDefaultFontInfo();
281 | void SetDefaultFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);
282 | DWORD GetCustomFontCount(bool bShared = false) const;
283 | HFONT AddFont(int id, LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);
284 | HFONT GetFont(int id);
285 | HFONT GetFont(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic);
286 | int GetFontIndex(HFONT hFont, bool bShared = false);
287 | int GetFontIndex(LPCTSTR pStrFontName, int nSize, bool bBold, bool bUnderline, bool bItalic, bool bShared = false);
288 | void RemoveFont(HFONT hFont, bool bShared = false);
289 | void RemoveFont(int id, bool bShared = false);
290 | void RemoveAllFonts(bool bShared = false);
291 | TFontInfo* GetFontInfo(int id);
292 | TFontInfo* GetFontInfo(HFONT hFont);
293 |
294 | const TImageInfo* GetImage(LPCTSTR bitmap);
295 | const TImageInfo* GetImageEx(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0, bool bUseHSL = false);
296 | const TImageInfo* AddImage(LPCTSTR bitmap, LPCTSTR type = NULL, DWORD mask = 0, bool bUseHSL = false, bool bShared = false);
297 | const TImageInfo* AddImage(LPCTSTR bitmap, HBITMAP hBitmap, int iWidth, int iHeight, bool bAlpha, bool bShared = false);
298 | void RemoveImage(LPCTSTR bitmap, bool bShared = false);
299 | void RemoveAllImages(bool bShared = false);
300 | static void ReloadSharedImages();
301 | void ReloadImages();
302 |
303 | void AddDefaultAttributeList(LPCTSTR pStrControlName, LPCTSTR pStrControlAttrList, bool bShared = false);
304 | LPCTSTR GetDefaultAttributeList(LPCTSTR pStrControlName) const;
305 | bool RemoveDefaultAttributeList(LPCTSTR pStrControlName, bool bShared = false);
306 | void RemoveAllDefaultAttributeList(bool bShared = false);
307 |
308 | void AddWindowCustomAttribute(LPCTSTR pstrName, LPCTSTR pstrAttr);
309 | LPCTSTR GetWindowCustomAttribute(LPCTSTR pstrName) const;
310 | bool RemoveWindowCustomAttribute(LPCTSTR pstrName);
311 | void RemoveAllWindowCustomAttribute();
312 |
313 | CDuiString GetWindowAttribute(LPCTSTR pstrName);
314 | void SetWindowAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
315 | CDuiString GetWindowAttributeList(bool bIgnoreDefault = true);
316 | void SetWindowAttributeList(LPCTSTR pstrList);
317 | bool RemoveWindowAttribute(LPCTSTR pstrName);
318 |
319 | CDuiString GetWindowXML();
320 |
321 | static void AddMultiLanguageString(int id, LPCTSTR pStrMultiLanguage);
322 | static LPCTSTR GetMultiLanguageString(int id);
323 | static bool RemoveMultiLanguageString(int id);
324 | static void RemoveAllMultiLanguageString();
325 | static void ProcessMultiLanguageTokens(CDuiString& pStrMultiLanguage);
326 |
327 | bool AttachDialog(CControlUI* pControl);
328 | bool InitControls(CControlUI* pControl, CControlUI* pParent = NULL);
329 | bool RenameControl(CControlUI* pControl, LPCTSTR pstrName);
330 | void ReapObjects(CControlUI* pControl);
331 |
332 | bool AddOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl);
333 | CDuiPtrArray* GetOptionGroup(LPCTSTR pStrGroupName);
334 | void RemoveOptionGroup(LPCTSTR pStrGroupName, CControlUI* pControl);
335 | void RemoveAllOptionGroups();
336 |
337 | CControlUI* GetFocus() const;
338 | void SetFocus(CControlUI* pControl, bool bFocusWnd=true);
339 | void SetFocusNeeded(CControlUI* pControl);
340 |
341 | bool SetNextTabControl(bool bForward = true);
342 |
343 | bool SetTimer(CControlUI* pControl, UINT nTimerID, UINT uElapse);
344 | bool KillTimer(CControlUI* pControl, UINT nTimerID);
345 | void KillTimer(CControlUI* pControl);
346 | void RemoveAllTimers();
347 |
348 | void SetCapture();
349 | void ReleaseCapture();
350 | bool IsCaptured();
351 |
352 | bool IsPainting();
353 | void SetPainting(bool bIsPainting);
354 |
355 | bool AddNotifier(INotifyUI* pControl);
356 | bool RemoveNotifier(INotifyUI* pControl);
357 | void SendNotify(TNotifyUI& Msg, bool bAsync = false, bool bEnableRepeat = true);
358 | void SendNotify(CControlUI* pControl, LPCTSTR pstrMessage, WPARAM wParam = 0, LPARAM lParam = 0, bool bAsync = false, bool bEnableRepeat = true);
359 |
360 | bool AddPreMessageFilter(IMessageFilterUI* pFilter);
361 | bool RemovePreMessageFilter(IMessageFilterUI* pFilter);
362 |
363 | bool AddMessageFilter(IMessageFilterUI* pFilter);
364 | bool RemoveMessageFilter(IMessageFilterUI* pFilter);
365 |
366 | int GetPostPaintCount() const;
367 | bool AddPostPaint(CControlUI* pControl);
368 | bool RemovePostPaint(CControlUI* pControl);
369 | bool SetPostPaintIndex(CControlUI* pControl, int iIndex);
370 |
371 | int GetNativeWindowCount() const;
372 | RECT GetNativeWindowRect(HWND hChildWnd);
373 | bool AddNativeWindow(CControlUI* pControl, HWND hChildWnd);
374 | bool RemoveNativeWindow(HWND hChildWnd);
375 |
376 | void AddDelayedCleanup(CControlUI* pControl);
377 | void AddMouseLeaveNeeded(CControlUI* pControl);
378 | bool RemoveMouseLeaveNeeded(CControlUI* pControl);
379 |
380 | bool AddTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator);
381 | bool RemoveTranslateAccelerator(ITranslateAccelerator *pTranslateAccelerator);
382 | bool TranslateAccelerator(LPMSG pMsg);
383 |
384 | CControlUI* GetRoot() const;
385 | CControlUI* FindControl(POINT pt) const;
386 | CControlUI* FindControl(LPCTSTR pstrName) const;
387 | CControlUI* FindSubControlByPoint(CControlUI* pParent, POINT pt) const;
388 | CControlUI* FindSubControlByName(CControlUI* pParent, LPCTSTR pstrName) const;
389 | CControlUI* FindSubControlByClass(CControlUI* pParent, LPCTSTR pstrClass, int iIndex = 0);
390 | CDuiPtrArray* FindSubControlsByClass(CControlUI* pParent, LPCTSTR pstrClass);
391 |
392 | static int MessageLoop();
393 | static bool TranslateMessage(const LPMSG pMsg);
394 | static void Term();
395 |
396 | bool MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lRes);
397 | bool PreMessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lRes);
398 | void UsedVirtualWnd(bool bUsed);
399 |
400 | private:
401 | CDuiPtrArray* GetFoundControls();
402 | static CControlUI* CALLBACK __FindControlFromNameHash(CControlUI* pThis, LPVOID pData);
403 | static CControlUI* CALLBACK __FindControlFromCount(CControlUI* pThis, LPVOID pData);
404 | static CControlUI* CALLBACK __FindControlFromPoint(CControlUI* pThis, LPVOID pData);
405 | static CControlUI* CALLBACK __FindControlFromTab(CControlUI* pThis, LPVOID pData);
406 | static CControlUI* CALLBACK __FindControlFromShortcut(CControlUI* pThis, LPVOID pData);
407 | static CControlUI* CALLBACK __FindControlFromName(CControlUI* pThis, LPVOID pData);
408 | static CControlUI* CALLBACK __FindControlFromClass(CControlUI* pThis, LPVOID pData);
409 | static CControlUI* CALLBACK __FindControlsFromClass(CControlUI* pThis, LPVOID pData);
410 | static CControlUI* CALLBACK __FindControlsFromUpdate(CControlUI* pThis, LPVOID pData);
411 |
412 | static void AdjustSharedImagesHSL();
413 | void AdjustImagesHSL();
414 | void PostAsyncNotify();
415 |
416 | private:
417 | CDuiString m_sName;
418 | HWND m_hWndPaint;
419 | HDC m_hDcPaint;
420 | HDC m_hDcOffscreen;
421 | HDC m_hDcBackground;
422 | HBITMAP m_hbmpOffscreen;
423 | COLORREF* m_pOffscreenBits;
424 | HBITMAP m_hbmpBackground;
425 | COLORREF* m_pBackgroundBits;
426 | int m_iTooltipWidth;
427 | int m_iLastTooltipWidth;
428 | HWND m_hwndTooltip;
429 | TOOLINFO m_ToolTip;
430 | int m_iHoverTime;
431 | bool m_bNoActivate;
432 | bool m_bShowUpdateRect;
433 | //
434 | CControlUI* m_pRoot;
435 | CControlUI* m_pFocus;
436 | CControlUI* m_pEventHover;
437 | CControlUI* m_pEventClick;
438 | CControlUI* m_pEventKey;
439 | CControlUI* m_pLastToolTip;
440 | //
441 | POINT m_ptLastMousePos;
442 | SIZE m_szMinWindow;
443 | SIZE m_szMaxWindow;
444 | SIZE m_szInitWindowSize;
445 | RECT m_rcSizeBox;
446 | SIZE m_szRoundCorner;
447 | RECT m_rcCaption;
448 | UINT m_uTimerID;
449 | bool m_bFirstLayout;
450 | bool m_bUpdateNeeded;
451 | bool m_bFocusNeeded;
452 | bool m_bOffscreenPaint;
453 |
454 | BYTE m_nOpacity;
455 | bool m_bLayered;
456 | RECT m_rcLayeredInset;
457 | bool m_bLayeredChanged;
458 | RECT m_rcLayeredUpdate;
459 | TDrawInfo m_diLayered;
460 |
461 | bool m_bMouseTracking;
462 | bool m_bMouseCapture;
463 | bool m_bIsPainting;
464 | bool m_bUsedVirtualWnd;
465 | bool m_bAsyncNotifyPosted;
466 |
467 | //
468 | CDuiPtrArray m_aNotifiers;
469 | CDuiPtrArray m_aTimers;
470 | CDuiPtrArray m_aPreMessageFilters;
471 | CDuiPtrArray m_aMessageFilters;
472 | CDuiPtrArray m_aPostPaintControls;
473 | CDuiPtrArray m_aNativeWindow;
474 | CDuiPtrArray m_aNativeWindowControl;
475 | CDuiPtrArray m_aDelayedCleanup;
476 | CDuiPtrArray m_aAsyncNotify;
477 | CDuiPtrArray m_aFoundControls;
478 | CDuiPtrArray m_aNeedMouseLeaveNeeded;
479 | CDuiStringPtrMap m_mNameHash;
480 | CDuiStringPtrMap m_mWindowAttrHash;
481 | CDuiStringPtrMap m_mOptionGroup;
482 |
483 | //
484 | bool m_bForceUseSharedRes;
485 | TResInfo m_ResInfo;
486 |
487 | //
488 | static HINSTANCE m_hResourceInstance;
489 | static CDuiString m_pStrResourcePath;
490 | static CDuiString m_pStrResourceZip;
491 | static HANDLE m_hResourceZip;
492 |
493 | static bool m_bCachedResourceZip;
494 | static TResInfo m_SharedResInfo;
495 | static HINSTANCE m_hInstance;
496 | static bool m_bUseHSL;
497 | static short m_H;
498 | static short m_S;
499 | static short m_L;
500 | static CDuiPtrArray m_aPreMessages;
501 | static CDuiPtrArray m_aPlugins;
502 |
503 | public:
504 | CDuiPtrArray m_aTranslateAccelerator;
505 | };
506 |
507 | } // namespace DuiLib
508 |
509 | #endif // __UIMANAGER_H__
510 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIMarkup.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIMARKUP_H__
2 | #define __UIMARKUP_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 |
8 | enum
9 | {
10 | XMLFILE_ENCODING_UTF8 = 0,
11 | XMLFILE_ENCODING_UNICODE = 1,
12 | XMLFILE_ENCODING_ASNI = 2,
13 | };
14 |
15 | class CMarkup;
16 | class CMarkupNode;
17 |
18 |
19 | class DUILIB_API CMarkup
20 | {
21 | friend class CMarkupNode;
22 | public:
23 | CMarkup(LPCTSTR pstrXML = NULL);
24 | ~CMarkup();
25 |
26 | bool Load(LPCTSTR pstrXML);
27 | bool LoadFromMem(BYTE* pByte, DWORD dwSize, int encoding = XMLFILE_ENCODING_UTF8);
28 | bool LoadFromFile(LPCTSTR pstrFilename, int encoding = XMLFILE_ENCODING_UTF8);
29 | void Release();
30 | bool IsValid() const;
31 |
32 | void SetPreserveWhitespace(bool bPreserve = true);
33 | void GetLastErrorMessage(LPTSTR pstrMessage, SIZE_T cchMax) const;
34 | void GetLastErrorLocation(LPTSTR pstrSource, SIZE_T cchMax) const;
35 |
36 | CMarkupNode GetRoot();
37 |
38 | private:
39 | typedef struct tagXMLELEMENT
40 | {
41 | ULONG iStart;
42 | ULONG iChild;
43 | ULONG iNext;
44 | ULONG iParent;
45 | ULONG iData;
46 | } XMLELEMENT;
47 |
48 | LPTSTR m_pstrXML;
49 | XMLELEMENT* m_pElements;
50 | ULONG m_nElements;
51 | ULONG m_nReservedElements;
52 | TCHAR m_szErrorMsg[100];
53 | TCHAR m_szErrorXML[50];
54 | bool m_bPreserveWhitespace;
55 |
56 | private:
57 | bool _Parse();
58 | bool _Parse(LPTSTR& pstrText, ULONG iParent);
59 | XMLELEMENT* _ReserveElement();
60 | inline void _SkipWhitespace(LPTSTR& pstr) const;
61 | inline void _SkipWhitespace(LPCTSTR& pstr) const;
62 | inline void _SkipIdentifier(LPTSTR& pstr) const;
63 | inline void _SkipIdentifier(LPCTSTR& pstr) const;
64 | bool _ParseData(LPTSTR& pstrText, LPTSTR& pstrData, char cEnd);
65 | void _ParseMetaChar(LPTSTR& pstrText, LPTSTR& pstrDest);
66 | bool _ParseAttributes(LPTSTR& pstrText);
67 | bool _Failed(LPCTSTR pstrError, LPCTSTR pstrLocation = NULL);
68 | };
69 |
70 |
71 | class DUILIB_API CMarkupNode
72 | {
73 | friend class CMarkup;
74 | private:
75 | CMarkupNode();
76 | CMarkupNode(CMarkup* pOwner, int iPos);
77 |
78 | public:
79 | bool IsValid() const;
80 |
81 | CMarkupNode GetParent();
82 | CMarkupNode GetSibling();
83 | CMarkupNode GetChild();
84 | CMarkupNode GetChild(LPCTSTR pstrName);
85 |
86 | bool HasSiblings() const;
87 | bool HasChildren() const;
88 | LPCTSTR GetName() const;
89 | LPCTSTR GetValue() const;
90 |
91 | bool HasAttributes();
92 | bool HasAttribute(LPCTSTR pstrName);
93 | int GetAttributeCount();
94 | LPCTSTR GetAttributeName(int iIndex);
95 | LPCTSTR GetAttributeValue(int iIndex);
96 | LPCTSTR GetAttributeValue(LPCTSTR pstrName);
97 | bool GetAttributeValue(int iIndex, LPTSTR pstrValue, SIZE_T cchMax);
98 | bool GetAttributeValue(LPCTSTR pstrName, LPTSTR pstrValue, SIZE_T cchMax);
99 |
100 | private:
101 | void _MapAttributes();
102 |
103 | enum { MAX_XML_ATTRIBUTES = 64 };
104 |
105 | typedef struct
106 | {
107 | ULONG iName;
108 | ULONG iValue;
109 | } XMLATTRIBUTE;
110 |
111 | int m_iPos;
112 | int m_nAttributes;
113 | XMLATTRIBUTE m_aAttributes[MAX_XML_ATTRIBUTES];
114 | CMarkup* m_pOwner;
115 | };
116 |
117 | } // namespace DuiLib
118 |
119 | #endif // __UIMARKUP_H__
120 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Core/UIRender.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Core/UIRender.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Layout/UIChildLayout.h:
--------------------------------------------------------------------------------
1 | #ifndef __UICHILDLAYOUT_H__
2 | #define __UICHILDLAYOUT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CChildLayoutUI : public CContainerUI
9 | {
10 | public:
11 | CChildLayoutUI();
12 |
13 | void Init();
14 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
15 | void SetChildLayoutXML(CDuiString pXML);
16 | CDuiString GetChildLayoutXML();
17 | virtual LPVOID GetInterface(LPCTSTR pstrName);
18 | virtual LPCTSTR GetClass() const;
19 |
20 | private:
21 | CDuiString m_pstrXMLFile;
22 | };
23 | } // namespace DuiLib
24 | #endif // __UICHILDLAYOUT_H__
25 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Layout/UIHorizontalLayout.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIHORIZONTALLAYOUT_H__
2 | #define __UIHORIZONTALLAYOUT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CHorizontalLayoutUI : public CContainerUI
9 | {
10 | public:
11 | CHorizontalLayoutUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 | UINT GetControlFlags() const;
16 |
17 | void SetSepWidth(int iWidth);
18 | int GetSepWidth() const;
19 | void SetSepImmMode(bool bImmediately);
20 | bool IsSepImmMode() const;
21 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
22 | void DoEvent(TEventUI& event);
23 |
24 | void SetPos(RECT rc, bool bNeedInvalidate = true);
25 | void DoPostPaint(HDC hDC, const RECT& rcPaint);
26 |
27 | RECT GetThumbRect(bool bUseNew = false) const;
28 |
29 | protected:
30 | int m_iSepWidth;
31 | UINT m_uButtonState;
32 | POINT m_ptLastMouse;
33 | RECT m_rcNewPos;
34 | bool m_bImmMode;
35 | };
36 | }
37 | #endif // __UIHORIZONTALLAYOUT_H__
38 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Layout/UITabLayout.h:
--------------------------------------------------------------------------------
1 | #ifndef __UITABLAYOUT_H__
2 | #define __UITABLAYOUT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CTabLayoutUI : public CContainerUI
9 | {
10 | public:
11 | CTabLayoutUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 |
16 | bool Add(CControlUI* pControl);
17 | bool AddAt(CControlUI* pControl, int iIndex);
18 | bool Remove(CControlUI* pControl, bool bDoNotDestroy=false);
19 | void RemoveAll();
20 | int GetCurSel() const;
21 | bool SelectItem(int iIndex, bool bTriggerEvent=true);
22 | bool SelectItem(CControlUI* pControl, bool bTriggerEvent=true);
23 |
24 | void SetPos(RECT rc, bool bNeedInvalidate = true);
25 |
26 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
27 |
28 | protected:
29 | int m_iCurSel;
30 | };
31 | }
32 | #endif // __UITABLAYOUT_H__
33 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Layout/UITileLayout.h:
--------------------------------------------------------------------------------
1 | #ifndef __UITILELAYOUT_H__
2 | #define __UITILELAYOUT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CTileLayoutUI : public CContainerUI
9 | {
10 | public:
11 | CTileLayoutUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 |
16 | void SetPos(RECT rc, bool bNeedInvalidate = true);
17 |
18 | int GetFixedColumns() const;
19 | void SetFixedColumns(int iColums);
20 | int GetChildVPadding() const;
21 | void SetChildVPadding(int iPadding);
22 |
23 | SIZE GetItemSize() const;
24 | void SetItemSize(SIZE szSize);
25 | int GetColumns() const;
26 | int GetRows() const;
27 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
28 |
29 | protected:
30 | SIZE m_szItem;
31 | int m_nColumns;
32 | int m_nRows;
33 |
34 | int m_nColumnsFixed;
35 | int m_iChildVPadding;
36 | bool m_bIgnoreItemPadding;
37 | };
38 | }
39 | #endif // __UITILELAYOUT_H__
40 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Layout/UIVerticalLayout.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIVERTICALLAYOUT_H__
2 | #define __UIVERTICALLAYOUT_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | class DUILIB_API CVerticalLayoutUI : public CContainerUI
9 | {
10 | public:
11 | CVerticalLayoutUI();
12 |
13 | LPCTSTR GetClass() const;
14 | LPVOID GetInterface(LPCTSTR pstrName);
15 | UINT GetControlFlags() const;
16 |
17 | void SetSepHeight(int iHeight);
18 | int GetSepHeight() const;
19 | void SetSepImmMode(bool bImmediately);
20 | bool IsSepImmMode() const;
21 | void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
22 | void DoEvent(TEventUI& event);
23 |
24 | void SetPos(RECT rc, bool bNeedInvalidate = true);
25 | void DoPostPaint(HDC hDC, const RECT& rcPaint);
26 |
27 | RECT GetThumbRect(bool bUseNew = false) const;
28 |
29 | protected:
30 | int m_iSepHeight;
31 | UINT m_uButtonState;
32 | POINT m_ptLastMouse;
33 | RECT m_rcNewPos;
34 | bool m_bImmMode;
35 | };
36 | }
37 | #endif // __UIVERTICALLAYOUT_H__
38 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/StdAfx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/StdAfx.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/UIlib.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010-2011, duilib develop team(www.duilib.com).
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or
5 | // without modification, are permitted provided that the
6 | // following conditions are met.
7 | //
8 | // Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | //
11 | // Redistributions in binary form must reproduce the above
12 | // copyright notice, this list of conditions and the following
13 | // disclaimer in the documentation and/or other materials
14 | // provided with the distribution.
15 | //
16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
17 | // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifdef UILIB_STATIC
31 | # define DUILIB_API
32 | #else
33 | # if defined(UILIB_EXPORTS)
34 | # if defined(_MSC_VER)
35 | # define DUILIB_API __declspec(dllexport)
36 | # else
37 | # define DUILIB_API
38 | # endif
39 | # else
40 | # if defined(_MSC_VER)
41 | # define DUILIB_API __declspec(dllimport)
42 | # else
43 | # define DUILIB_API
44 | # endif
45 | # endif
46 | #endif
47 |
48 | #define UILIB_COMDAT __declspec(selectany)
49 |
50 | #if defined _M_IX86
51 | # pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
52 | #elif defined _M_IA64
53 | # pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
54 | #elif defined _M_X64
55 | # pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
56 | #else
57 | # pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
58 | #endif
59 |
60 | #include
61 | #include
62 | #include
63 | #include
64 | #include
65 | #include
66 | #include
67 | #include
68 | #include
69 | #include
70 |
71 | #include "Utils/Utils.h"
72 | #include "Utils/UIDelegate.h"
73 | #include "Core/UIDefine.h"
74 | #include "Core/UIManager.h"
75 | #include "Core/UIBase.h"
76 | #include "Core/UIControl.h"
77 | #include "Core/UIContainer.h"
78 | #include "Core/UIMarkup.h"
79 | #include "Core/UIDlgBuilder.h"
80 | #include "Core/UIRender.h"
81 | #include "Utils/WinImplBase.h"
82 | #include "Utils/WndShadow.h"
83 |
84 | #include "Layout/UIVerticalLayout.h"
85 | #include "Layout/UIHorizontalLayout.h"
86 | #include "Layout/UITileLayout.h"
87 | #include "Layout/UITabLayout.h"
88 | #include "Layout/UIChildLayout.h"
89 |
90 | #include "Control/UIList.h"
91 | #include "Control/UICombo.h"
92 | #include "Control/UIScrollBar.h"
93 | #include "Control/UITreeView.h"
94 |
95 | #include "Control/UILabel.h"
96 | #include "Control/UIText.h"
97 | #include "Control/UIEdit.h"
98 |
99 | #include "Control/UIButton.h"
100 | #include "Control/UIOption.h"
101 | #include "Control/UICheckBox.h"
102 |
103 | #include "Control/UIProgress.h"
104 | #include "Control/UISlider.h"
105 |
106 | #include "Control/UIRichEdit.h"
107 | #include "Control/UIDateTime.h"
108 |
109 | #include "Control/UIActiveX.h"
110 | #include "Control/UIWebBrowser.h"
111 | #include "Control/UIGifAnim.h"
112 | //#include "Control/UIFlash.h"
113 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/FlashEventHandler.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Utils/FlashEventHandler.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/UIDelegate.h:
--------------------------------------------------------------------------------
1 | #ifndef __UIDELEGATE_H__
2 | #define __UIDELEGATE_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib {
7 |
8 | class DUILIB_API CDelegateBase
9 | {
10 | public:
11 | CDelegateBase(void* pObject, void* pFn);
12 | CDelegateBase(const CDelegateBase& rhs);
13 | virtual ~CDelegateBase();
14 | bool Equals(const CDelegateBase& rhs) const;
15 | bool operator() (void* param);
16 | virtual CDelegateBase* Copy() const = 0; // add const for gcc
17 |
18 | protected:
19 | void* GetFn();
20 | void* GetObject();
21 | virtual bool Invoke(void* param) = 0;
22 |
23 | private:
24 | void* m_pObject;
25 | void* m_pFn;
26 | };
27 |
28 | class CDelegateStatic: public CDelegateBase
29 | {
30 | typedef bool (*Fn)(void*);
31 | public:
32 | CDelegateStatic(Fn pFn) : CDelegateBase(NULL, pFn) { }
33 | CDelegateStatic(const CDelegateStatic& rhs) : CDelegateBase(rhs) { }
34 | virtual CDelegateBase* Copy() const { return new CDelegateStatic(*this); }
35 |
36 | protected:
37 | virtual bool Invoke(void* param)
38 | {
39 | Fn pFn = (Fn)GetFn();
40 | return (*pFn)(param);
41 | }
42 | };
43 |
44 | template
45 | class CDelegate : public CDelegateBase
46 | {
47 | typedef bool (T::* Fn)(void*);
48 | public:
49 | CDelegate(O* pObj, Fn pFn) : CDelegateBase(pObj, *(void**)&pFn) { }
50 | CDelegate(const CDelegate& rhs) : CDelegateBase(rhs) { }
51 | virtual CDelegateBase* Copy() const { return new CDelegate(*this); }
52 |
53 | protected:
54 | virtual bool Invoke(void* param)
55 | {
56 | O* pObject = (O*) GetObject();
57 | union
58 | {
59 | void* ptr;
60 | Fn fn;
61 | } func = { GetFn() };
62 | return (pObject->*func.fn)(param);
63 | }
64 |
65 | private:
66 | Fn m_pFn;
67 | };
68 |
69 | template
70 | CDelegate MakeDelegate(O* pObject, bool (T::* pFn)(void*))
71 | {
72 | return CDelegate(pObject, pFn);
73 | }
74 |
75 | inline CDelegateStatic MakeDelegate(bool (*pFn)(void*))
76 | {
77 | return CDelegateStatic(pFn);
78 | }
79 |
80 | class DUILIB_API CEventSource
81 | {
82 | typedef bool (*FnType)(void*);
83 | public:
84 | ~CEventSource();
85 | operator bool();
86 | void operator+= (const CDelegateBase& d); // add const for gcc
87 | void operator+= (FnType pFn);
88 | void operator-= (const CDelegateBase& d);
89 | void operator-= (FnType pFn);
90 | bool operator() (void* param);
91 |
92 | protected:
93 | CDuiPtrArray m_aDelegates;
94 | };
95 |
96 | } // namespace DuiLib
97 |
98 | #endif // __UIDELEGATE_H__
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/Utils.h:
--------------------------------------------------------------------------------
1 | #ifndef __UTILS_H__
2 | #define __UTILS_H__
3 |
4 | #pragma once
5 |
6 | namespace DuiLib
7 | {
8 | /////////////////////////////////////////////////////////////////////////////////////
9 | //
10 |
11 | class DUILIB_API STRINGorID
12 | {
13 | public:
14 | STRINGorID(LPCTSTR lpString);
15 | STRINGorID(unsigned int nID);
16 |
17 | LPCTSTR m_lpstr;
18 | };
19 |
20 | /////////////////////////////////////////////////////////////////////////////////////
21 | //
22 | class CDuiString;
23 | class DUILIB_API CDuiPoint : public tagPOINT
24 | {
25 | public:
26 | CDuiPoint();
27 | CDuiPoint(const POINT& src);
28 | CDuiPoint(long x, long y);
29 | CDuiPoint(LPARAM lParam);
30 | CDuiPoint(LPCTSTR pstrValue);
31 | CDuiString ToString();
32 | };
33 |
34 | /////////////////////////////////////////////////////////////////////////////////////
35 | //
36 |
37 | class DUILIB_API CDuiSize : public tagSIZE
38 | {
39 | public:
40 | CDuiSize();
41 | CDuiSize(const SIZE& src);
42 | CDuiSize(const RECT rc);
43 | CDuiSize(long cx, long cy);
44 | CDuiSize(LPCTSTR pstrValue);
45 | CDuiString ToString();
46 | };
47 |
48 | /////////////////////////////////////////////////////////////////////////////////////
49 | //
50 |
51 | class DUILIB_API CDuiRect : public tagRECT
52 | {
53 | public:
54 | CDuiRect();
55 | CDuiRect(const RECT& src);
56 | CDuiRect(long iLeft, long iTop, long iRight, long iBottom);
57 | CDuiRect(LPCTSTR pstrValue);
58 | CDuiString ToString();
59 |
60 | int GetWidth() const;
61 | int GetHeight() const;
62 | void Empty();
63 | bool IsNull() const;
64 | void Join(const RECT& rc);
65 | void ResetOffset();
66 | void Normalize();
67 | void Offset(int cx, int cy);
68 | void Inflate(int cx, int cy);
69 | void Deflate(int cx, int cy);
70 | void Union(CDuiRect& rc);
71 | };
72 |
73 | /////////////////////////////////////////////////////////////////////////////////////
74 | //
75 |
76 | class DUILIB_API CDuiString
77 | {
78 | public:
79 | enum { MAX_LOCAL_STRING_LEN = 63 };
80 |
81 | CDuiString();
82 | CDuiString(const TCHAR ch);
83 | CDuiString(const CDuiString& src);
84 | CDuiString(LPCTSTR lpsz, int nLen = -1);
85 | ~CDuiString();
86 | CDuiString ToString();
87 |
88 | void Empty();
89 | int GetLength() const;
90 | bool IsEmpty() const;
91 | TCHAR GetAt(int nIndex) const;
92 | void Append(LPCTSTR pstr);
93 | void Assign(LPCTSTR pstr, int nLength = -1);
94 | LPCTSTR GetData() const;
95 |
96 | void SetAt(int nIndex, TCHAR ch);
97 | operator LPCTSTR() const;
98 |
99 | TCHAR operator[] (int nIndex) const;
100 | const CDuiString& operator=(const CDuiString& src);
101 | const CDuiString& operator=(const TCHAR ch);
102 | const CDuiString& operator=(LPCTSTR pstr);
103 | #ifdef _UNICODE
104 | const CDuiString& operator=(LPCSTR lpStr);
105 | const CDuiString& operator+=(LPCSTR lpStr);
106 | #else
107 | const CDuiString& operator=(LPCWSTR lpwStr);
108 | const CDuiString& operator+=(LPCWSTR lpwStr);
109 | #endif
110 | CDuiString operator+(const CDuiString& src) const;
111 | CDuiString operator+(LPCTSTR pstr) const;
112 | const CDuiString& operator+=(const CDuiString& src);
113 | const CDuiString& operator+=(LPCTSTR pstr);
114 | const CDuiString& operator+=(const TCHAR ch);
115 |
116 | bool operator == (LPCTSTR str) const;
117 | bool operator != (LPCTSTR str) const;
118 | bool operator <= (LPCTSTR str) const;
119 | bool operator < (LPCTSTR str) const;
120 | bool operator >= (LPCTSTR str) const;
121 | bool operator > (LPCTSTR str) const;
122 |
123 | int Compare(LPCTSTR pstr) const;
124 | int CompareNoCase(LPCTSTR pstr) const;
125 |
126 | void MakeUpper();
127 | void MakeLower();
128 |
129 | CDuiString Left(int nLength) const;
130 | CDuiString Mid(int iPos, int nLength = -1) const;
131 | CDuiString Right(int nLength) const;
132 |
133 | int Find(TCHAR ch, int iPos = 0) const;
134 | int Find(LPCTSTR pstr, int iPos = 0) const;
135 | int ReverseFind(TCHAR ch) const;
136 | int Replace(LPCTSTR pstrFrom, LPCTSTR pstrTo);
137 |
138 | int __cdecl Format(LPCTSTR pstrFormat, ...);
139 | int __cdecl SmallFormat(LPCTSTR pstrFormat, ...);
140 |
141 | protected:
142 | LPTSTR m_pstr;
143 | TCHAR m_szBuffer[MAX_LOCAL_STRING_LEN + 1];
144 | };
145 |
146 | /////////////////////////////////////////////////////////////////////////////////////
147 | //
148 |
149 | class DUILIB_API CDuiPtrArray
150 | {
151 | public:
152 | CDuiPtrArray(int iPreallocSize = 0);
153 | CDuiPtrArray(const CDuiPtrArray& src);
154 | ~CDuiPtrArray();
155 |
156 | void Empty();
157 | void Resize(int iSize);
158 | bool IsEmpty() const;
159 | int Find(LPVOID iIndex) const;
160 | bool Add(LPVOID pData);
161 | bool SetAt(int iIndex, LPVOID pData);
162 | bool InsertAt(int iIndex, LPVOID pData);
163 | bool Remove(int iIndex, int iCount = 1);
164 | int GetSize() const;
165 | LPVOID* GetData();
166 |
167 | LPVOID GetAt(int iIndex) const;
168 | LPVOID operator[] (int nIndex) const;
169 |
170 | protected:
171 | LPVOID* m_ppVoid;
172 | int m_nCount;
173 | int m_nAllocated;
174 | };
175 |
176 |
177 | /////////////////////////////////////////////////////////////////////////////////////
178 | //
179 |
180 | class DUILIB_API CDuiValArray
181 | {
182 | public:
183 | CDuiValArray(int iElementSize, int iPreallocSize = 0);
184 | ~CDuiValArray();
185 |
186 | void Empty();
187 | bool IsEmpty() const;
188 | bool Add(LPCVOID pData);
189 | bool Remove(int iIndex, int iCount = 1);
190 | int GetSize() const;
191 | LPVOID GetData();
192 |
193 | LPVOID GetAt(int iIndex) const;
194 | LPVOID operator[] (int nIndex) const;
195 |
196 | protected:
197 | LPBYTE m_pVoid;
198 | int m_iElementSize;
199 | int m_nCount;
200 | int m_nAllocated;
201 | };
202 |
203 | /////////////////////////////////////////////////////////////////////////////////////
204 | //
205 |
206 | struct TITEM;
207 | class DUILIB_API CDuiStringPtrMap
208 | {
209 | public:
210 | CDuiStringPtrMap(int nSize = 83);
211 | ~CDuiStringPtrMap();
212 |
213 | void Resize(int nSize = 83);
214 | LPVOID Find(LPCTSTR key, bool optimize = true) const;
215 | bool Insert(LPCTSTR key, LPVOID pData);
216 | LPVOID Set(LPCTSTR key, LPVOID pData);
217 | bool Remove(LPCTSTR key);
218 | void RemoveAll();
219 | int GetSize() const;
220 | LPCTSTR GetAt(int iIndex) const;
221 | LPCTSTR operator[] (int nIndex) const;
222 |
223 | protected:
224 | TITEM** m_aT;
225 | int m_nBuckets;
226 | int m_nCount;
227 | };
228 |
229 | /////////////////////////////////////////////////////////////////////////////////////
230 | //
231 |
232 | class DUILIB_API CWaitCursor
233 | {
234 | public:
235 | CWaitCursor();
236 | ~CWaitCursor();
237 |
238 | protected:
239 | HCURSOR m_hOrigCursor;
240 | };
241 |
242 | /////////////////////////////////////////////////////////////////////////////////////
243 | //
244 |
245 | class CVariant : public VARIANT
246 | {
247 | public:
248 | CVariant()
249 | {
250 | VariantInit(this);
251 | }
252 | CVariant(int i)
253 | {
254 | VariantInit(this);
255 | this->vt = VT_I4;
256 | this->intVal = i;
257 | }
258 | CVariant(float f)
259 | {
260 | VariantInit(this);
261 | this->vt = VT_R4;
262 | this->fltVal = f;
263 | }
264 | CVariant(LPOLESTR s)
265 | {
266 | VariantInit(this);
267 | this->vt = VT_BSTR;
268 | this->bstrVal = s;
269 | }
270 | CVariant(IDispatch *disp)
271 | {
272 | VariantInit(this);
273 | this->vt = VT_DISPATCH;
274 | this->pdispVal = disp;
275 | }
276 |
277 | ~CVariant()
278 | {
279 | VariantClear(this);
280 | }
281 | };
282 |
283 | }// namespace DuiLib
284 |
285 | #endif // __UTILS_H__
286 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/WebBrowserEventHandler.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Utils/WebBrowserEventHandler.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/WinImplBase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Utils/WinImplBase.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/WndShadow.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/Utils/WndShadow.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/downloadmgr.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma warning( disable: 4049 ) /* more than 64k source lines */
3 |
4 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */
5 |
6 |
7 | /* File created by MIDL compiler version 5.03.0279 */
8 | /* at Mon Jul 23 17:42:46 2001
9 | */
10 | /* Compiler settings for downloadmgr.idl:
11 | Oicf (OptLev=i2), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
12 | error checks: allocation ref bounds_check enum stub_data
13 | VC __declspec() decoration level:
14 | __declspec(uuid()), __declspec(selectany), __declspec(novtable)
15 | DECLSPEC_UUID(), MIDL_INTERFACE()
16 | */
17 | //@@MIDL_FILE_HEADING( )
18 |
19 |
20 | /* verify that the version is high enough to compile this file*/
21 | #ifndef __REQUIRED_RPCNDR_H_VERSION__
22 | #define __REQUIRED_RPCNDR_H_VERSION__ 440
23 | #endif
24 |
25 | #include "rpc.h"
26 | #include "rpcndr.h"
27 |
28 | #ifndef __RPCNDR_H_VERSION__
29 | #error this stub requires an updated version of
30 | #endif // __RPCNDR_H_VERSION__
31 |
32 | #ifndef COM_NO_WINDOWS_H
33 | #include "windows.h"
34 | #include "ole2.h"
35 | #endif /*COM_NO_WINDOWS_H*/
36 |
37 | #ifndef __downloadmgr_h__
38 | #define __downloadmgr_h__
39 |
40 | /* Forward Declarations */
41 |
42 | #ifndef __IDownloadManager_FWD_DEFINED__
43 | #define __IDownloadManager_FWD_DEFINED__
44 | typedef interface IDownloadManager IDownloadManager;
45 | #endif /* __IDownloadManager_FWD_DEFINED__ */
46 |
47 |
48 | /* header files for imported files */
49 | #include "unknwn.h"
50 | #include "ocidl.h"
51 |
52 | #ifdef __cplusplus
53 | extern "C"{
54 | #endif
55 |
56 | void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
57 | void __RPC_USER MIDL_user_free( void __RPC_FAR * );
58 |
59 | /* interface __MIDL_itf_downloadmgr_0000 */
60 | /* [local] */
61 |
62 | //=--------------------------------------------------------------------------=
63 | // downloadmgr.h
64 | //=--------------------------------------------------------------------------=
65 | // (C) Copyright 2000 Microsoft Corporation. All Rights Reserved.
66 | //
67 | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
68 | // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
69 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
70 | // PARTICULAR PURPOSE.
71 | //=--------------------------------------------------------------------------=
72 |
73 | #pragma comment(lib,"uuid.lib")
74 |
75 | //---------------------------------------------------------------------------=
76 | // Internet Explorer Download Manager Interfaces
77 |
78 | // --------------------------------------------------------------------------------
79 | // GUIDS
80 | // --------------------------------------------------------------------------------
81 | // {988934A4-064B-11D3-BB80-00104B35E7F9}
82 | DEFINE_GUID(IID_IDownloadManager, 0x988934a4, 0x064b, 0x11d3, 0xbb, 0x80, 0x0, 0x10, 0x4b, 0x35, 0xe7, 0xf9);
83 | #define SID_SDownloadManager IID_IDownloadManager
84 |
85 |
86 |
87 | extern RPC_IF_HANDLE __MIDL_itf_downloadmgr_0000_v0_0_c_ifspec;
88 | extern RPC_IF_HANDLE __MIDL_itf_downloadmgr_0000_v0_0_s_ifspec;
89 |
90 | #ifndef __IDownloadManager_INTERFACE_DEFINED__
91 | #define __IDownloadManager_INTERFACE_DEFINED__
92 |
93 | /* interface IDownloadManager */
94 | /* [local][unique][uuid][object][helpstring] */
95 |
96 |
97 | EXTERN_C const IID IID_IDownloadManager;
98 |
99 | #if defined(__cplusplus) && !defined(CINTERFACE)
100 |
101 | MIDL_INTERFACE("988934A4-064B-11D3-BB80-00104B35E7F9")
102 | IDownloadManager : public IUnknown
103 | {
104 | public:
105 | virtual HRESULT STDMETHODCALLTYPE Download(
106 | /* [in] */ IMoniker __RPC_FAR *pmk,
107 | /* [in] */ IBindCtx __RPC_FAR *pbc,
108 | /* [in] */ DWORD dwBindVerb,
109 | /* [in] */ LONG grfBINDF,
110 | /* [in] */ BINDINFO __RPC_FAR *pBindInfo,
111 | /* [in] */ LPCOLESTR pszHeaders,
112 | /* [in] */ LPCOLESTR pszRedir,
113 | /* [in] */ UINT uiCP) = 0;
114 |
115 | };
116 |
117 | #else /* C style interface */
118 |
119 | typedef struct IDownloadManagerVtbl
120 | {
121 | BEGIN_INTERFACE
122 |
123 | HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
124 | IDownloadManager __RPC_FAR * This,
125 | /* [in] */ REFIID riid,
126 | /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
127 |
128 | ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
129 | IDownloadManager __RPC_FAR * This);
130 |
131 | ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
132 | IDownloadManager __RPC_FAR * This);
133 |
134 | HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Download )(
135 | IDownloadManager __RPC_FAR * This,
136 | /* [in] */ IMoniker __RPC_FAR *pmk,
137 | /* [in] */ IBindCtx __RPC_FAR *pbc,
138 | /* [in] */ DWORD dwBindVerb,
139 | /* [in] */ LONG grfBINDF,
140 | /* [in] */ BINDINFO __RPC_FAR *pBindInfo,
141 | /* [in] */ LPCOLESTR pszHeaders,
142 | /* [in] */ LPCOLESTR pszRedir,
143 | /* [in] */ UINT uiCP);
144 |
145 | END_INTERFACE
146 | } IDownloadManagerVtbl;
147 |
148 | interface IDownloadManager
149 | {
150 | CONST_VTBL struct IDownloadManagerVtbl __RPC_FAR *lpVtbl;
151 | };
152 |
153 |
154 |
155 | #ifdef COBJMACROS
156 |
157 |
158 | #define IDownloadManager_QueryInterface(This,riid,ppvObject) \
159 | (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
160 |
161 | #define IDownloadManager_AddRef(This) \
162 | (This)->lpVtbl -> AddRef(This)
163 |
164 | #define IDownloadManager_Release(This) \
165 | (This)->lpVtbl -> Release(This)
166 |
167 |
168 | #define IDownloadManager_Download(This,pmk,pbc,dwBindVerb,grfBINDF,pBindInfo,pszHeaders,pszRedir,uiCP) \
169 | (This)->lpVtbl -> Download(This,pmk,pbc,dwBindVerb,grfBINDF,pBindInfo,pszHeaders,pszRedir,uiCP)
170 |
171 | #endif /* COBJMACROS */
172 |
173 |
174 | #endif /* C style interface */
175 |
176 |
177 |
178 | HRESULT STDMETHODCALLTYPE IDownloadManager_Download_Proxy(
179 | IDownloadManager __RPC_FAR * This,
180 | /* [in] */ IMoniker __RPC_FAR *pmk,
181 | /* [in] */ IBindCtx __RPC_FAR *pbc,
182 | /* [in] */ DWORD dwBindVerb,
183 | /* [in] */ LONG grfBINDF,
184 | /* [in] */ BINDINFO __RPC_FAR *pBindInfo,
185 | /* [in] */ LPCOLESTR pszHeaders,
186 | /* [in] */ LPCOLESTR pszRedir,
187 | /* [in] */ UINT uiCP);
188 |
189 |
190 | void __RPC_STUB IDownloadManager_Download_Stub(
191 | IRpcStubBuffer *This,
192 | IRpcChannelBuffer *_pRpcChannelBuffer,
193 | PRPC_MESSAGE _pRpcMessage,
194 | DWORD *_pdwStubPhase);
195 |
196 |
197 |
198 | #endif /* __IDownloadManager_INTERFACE_DEFINED__ */
199 |
200 |
201 | /* Additional Prototypes for ALL interfaces */
202 |
203 | /* end of Additional Prototypes */
204 |
205 | #ifdef __cplusplus
206 | }
207 | #endif
208 |
209 | #endif
210 |
211 |
212 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/Utils/stb_image.h:
--------------------------------------------------------------------------------
1 | #define STBI_NO_STDIO
2 | #define STBI_NO_WRITE
3 | #define STBI_NO_HDR
4 | /* stb_image - v2.05 - public domain image loader - http://nothings.org/stb_image.h
5 | no warranty implied; use at your own risk
6 |
7 | Do this:
8 | #define STB_IMAGE_IMPLEMENTATION
9 | before you include this file in *one* C or C++ file to create the implementation.
10 |
11 | // i.e. it should look like this:
12 | #include ...
13 | #include ...
14 | #include ...
15 | #define STB_IMAGE_IMPLEMENTATION
16 | #include "stb_image.h"
17 |
18 | You can #define STBI_ASSERT(x) before the #include to avoid using assert.h.
19 | And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free
20 |
21 |
22 | QUICK NOTES:
23 | Primarily of interest to game developers and other people who can
24 | avoid problematic images and only need the trivial interface
25 |
26 | JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib)
27 | PNG 1/2/4/8-bit-per-channel (16 bpc not supported)
28 |
29 | TGA (not sure what subset, if a subset)
30 | BMP non-1bpp, non-RLE
31 | PSD (composited view only, no extra channels)
32 |
33 | GIF (*comp always reports as 4-channel)
34 | HDR (radiance rgbE format)
35 | PIC (Softimage PIC)
36 | PNM (PPM and PGM binary only)
37 |
38 | - decode from memory or through FILE (define STBI_NO_STDIO to remove code)
39 | - decode from arbitrary I/O callbacks
40 | - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON)
41 |
42 | Full documentation under "DOCUMENTATION" below.
43 |
44 |
45 | Revision 2.00 release notes:
46 |
47 | - Progressive JPEG is now supported.
48 |
49 | - PPM and PGM binary formats are now supported, thanks to Ken Miller.
50 |
51 | - x86 platforms now make use of SSE2 SIMD instructions for
52 | JPEG decoding, and ARM platforms can use NEON SIMD if requested.
53 | This work was done by Fabian "ryg" Giesen. SSE2 is used by
54 | default, but NEON must be enabled explicitly; see docs.
55 |
56 | With other JPEG optimizations included in this version, we see
57 | 2x speedup on a JPEG on an x86 machine, and a 1.5x speedup
58 | on a JPEG on an ARM machine, relative to previous versions of this
59 | library. The same results will not obtain for all JPGs and for all
60 | x86/ARM machines. (Note that progressive JPEGs are significantly
61 | slower to decode than regular JPEGs.) This doesn't mean that this
62 | is the fastest JPEG decoder in the land; rather, it brings it
63 | closer to parity with standard libraries. If you want the fastest
64 | decode, look elsewhere. (See "Philosophy" section of docs below.)
65 |
66 | See final bullet items below for more info on SIMD.
67 |
68 | - Added STBI_MALLOC, STBI_REALLOC, and STBI_FREE macros for replacing
69 | the memory allocator. Unlike other STBI libraries, these macros don't
70 | support a context parameter, so if you need to pass a context in to
71 | the allocator, you'll have to store it in a global or a thread-local
72 | variable.
73 |
74 | - Split existing STBI_NO_HDR flag into two flags, STBI_NO_HDR and
75 | STBI_NO_LINEAR.
76 | STBI_NO_HDR: suppress implementation of .hdr reader format
77 | STBI_NO_LINEAR: suppress high-dynamic-range light-linear float API
78 |
79 | - You can suppress implementation of any of the decoders to reduce
80 | your code footprint by #defining one or more of the following
81 | symbols before creating the implementation.
82 |
83 | STBI_NO_JPEG
84 | STBI_NO_PNG
85 | STBI_NO_BMP
86 | STBI_NO_PSD
87 | STBI_NO_TGA
88 | STBI_NO_GIF
89 | STBI_NO_HDR
90 | STBI_NO_PIC
91 | STBI_NO_PNM (.ppm and .pgm)
92 |
93 | - You can request *only* certain decoders and suppress all other ones
94 | (this will be more forward-compatible, as addition of new decoders
95 | doesn't require you to disable them explicitly):
96 |
97 | STBI_ONLY_JPEG
98 | STBI_ONLY_PNG
99 | STBI_ONLY_BMP
100 | STBI_ONLY_PSD
101 | STBI_ONLY_TGA
102 | STBI_ONLY_GIF
103 | STBI_ONLY_HDR
104 | STBI_ONLY_PIC
105 | STBI_ONLY_PNM (.ppm and .pgm)
106 |
107 | Note that you can define multiples of these, and you will get all
108 | of them ("only x" and "only y" is interpreted to mean "only x&y").
109 |
110 | - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still
111 | want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB
112 |
113 | - Compilation of all SIMD code can be suppressed with
114 | #define STBI_NO_SIMD
115 | It should not be necessary to disable SIMD unless you have issues
116 | compiling (e.g. using an x86 compiler which doesn't support SSE
117 | intrinsics or that doesn't support the method used to detect
118 | SSE2 support at run-time), and even those can be reported as
119 | bugs so I can refine the built-in compile-time checking to be
120 | smarter.
121 |
122 | - The old STBI_SIMD system which allowed installing a user-defined
123 | IDCT etc. has been removed. If you need this, don't upgrade. My
124 | assumption is that almost nobody was doing this, and those who
125 | were will find the built-in SIMD more satisfactory anyway.
126 |
127 | - RGB values computed for JPEG images are slightly different from
128 | previous versions of stb_image. (This is due to using less
129 | integer precision in SIMD.) The C code has been adjusted so
130 | that the same RGB values will be computed regardless of whether
131 | SIMD support is available, so your app should always produce
132 | consistent results. But these results are slightly different from
133 | previous versions. (Specifically, about 3% of available YCbCr values
134 | will compute different RGB results from pre-1.49 versions by +-1;
135 | most of the deviating values are one smaller in the G channel.)
136 |
137 | - If you must produce consistent results with previous versions of
138 | stb_image, #define STBI_JPEG_OLD and you will get the same results
139 | you used to; however, you will not get the SIMD speedups for
140 | the YCbCr-to-RGB conversion step (although you should still see
141 | significant JPEG speedup from the other changes).
142 |
143 | Please note that STBI_JPEG_OLD is a temporary feature; it will be
144 | removed in future versions of the library. It is only intended for
145 | near-term back-compatibility use.
146 |
147 |
148 | Latest revision history:
149 | 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
150 | 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
151 | 2.03 (2015-04-12) additional corruption checking
152 | stbi_set_flip_vertically_on_load
153 | fix NEON support; fix mingw support
154 | 2.02 (2015-01-19) fix incorrect assert, fix warning
155 | 2.01 (2015-01-17) fix various warnings
156 | 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG
157 | 2.00 (2014-12-25) optimize JPEG, including x86 SSE2 & ARM NEON SIMD
158 | progressive JPEG
159 | PGM/PPM support
160 | STBI_MALLOC,STBI_REALLOC,STBI_FREE
161 | STBI_NO_*, STBI_ONLY_*
162 | GIF bugfix
163 | 1.48 (2014-12-14) fix incorrectly-named assert()
164 | 1.47 (2014-12-14) 1/2/4-bit PNG support (both grayscale and paletted)
165 | optimize PNG
166 | fix bug in interlaced PNG with user-specified channel count
167 |
168 | See end of file for full revision history.
169 |
170 |
171 | ============================ Contributors =========================
172 |
173 | Image formats Bug fixes & warning fixes
174 | Sean Barrett (jpeg, png, bmp) Marc LeBlanc
175 | Nicolas Schulz (hdr, psd) Christpher Lloyd
176 | Jonathan Dummer (tga) Dave Moore
177 | Jean-Marc Lienher (gif) Won Chun
178 | Tom Seddon (pic) the Horde3D community
179 | Thatcher Ulrich (psd) Janez Zemva
180 | Ken Miller (pgm, ppm) Jonathan Blow
181 | Laurent Gomila
182 | Aruelien Pocheville
183 | Extensions, features Ryamond Barbiero
184 | Jetro Lauha (stbi_info) David Woo
185 | Martin "SpartanJ" Golini (stbi_info) Martin Golini
186 | James "moose2000" Brown (iPhone PNG) Roy Eltham
187 | Ben "Disch" Wenger (io callbacks) Luke Graham
188 | Omar Cornut (1/2/4-bit PNG) Thomas Ruf
189 | Nicolas Guillemot (vertical flip) John Bartholomew
190 | Ken Hamada
191 | Optimizations & bugfixes Cort Stratton
192 | Fabian "ryg" Giesen Blazej Dariusz Roszkowski
193 | Arseny Kapoulkine Thibault Reuille
194 | Paul Du Bois
195 | Guillaume George
196 | If your name should be here but Jerry Jansson
197 | isn't, let Sean know. Hayaki Saito
198 | Johan Duparc
199 | Ronny Chevalier
200 | Michal Cichon
201 | Tero Hanninen
202 | Sergio Gonzalez
203 | Cass Everitt
204 | Engin Manap
205 | Martins Mozeiko
206 | Joseph Thomson
207 | Phil Jordan
208 |
209 | License:
210 | This software is in the public domain. Where that dedication is not
211 | recognized, you are granted a perpetual, irrevocable license to copy
212 | and modify this file however you want.
213 |
214 | */
215 |
216 | #ifndef STBI_INCLUDE_STB_IMAGE_H
217 | #define STBI_INCLUDE_STB_IMAGE_H
218 |
219 | // DOCUMENTATION
220 | //
221 | // Limitations:
222 | // - no 16-bit-per-channel PNG
223 | // - no 12-bit-per-channel JPEG
224 | // - no JPEGs with arithmetic coding
225 | // - no 1-bit BMP
226 | // - GIF always returns *comp=4
227 | //
228 | // Basic usage (see HDR discussion below for HDR usage):
229 | // int x,y,n;
230 | // unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
231 | // // ... process data if not NULL ...
232 | // // ... x = width, y = height, n = # 8-bit components per pixel ...
233 | // // ... replace '0' with '1'..'4' to force that many components per pixel
234 | // // ... but 'n' will always be the number that it would have been if you said 0
235 | // stbi_image_free(data)
236 | //
237 | // Standard parameters:
238 | // int *x -- outputs image width in pixels
239 | // int *y -- outputs image height in pixels
240 | // int *comp -- outputs # of image components in image file
241 | // int req_comp -- if non-zero, # of image components requested in result
242 | //
243 | // The return value from an image loader is an 'unsigned char *' which points
244 | // to the pixel data, or NULL on an allocation failure or if the image is
245 | // corrupt or invalid. The pixel data consists of *y scanlines of *x pixels,
246 | // with each pixel consisting of N interleaved 8-bit components; the first
247 | // pixel pointed to is top-left-most in the image. There is no padding between
248 | // image scanlines or between pixels, regardless of format. The number of
249 | // components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
250 | // If req_comp is non-zero, *comp has the number of components that _would_
251 | // have been output otherwise. E.g. if you set req_comp to 4, you will always
252 | // get RGBA output, but you can check *comp to see if it's trivially opaque
253 | // because e.g. there were only 3 channels in the source image.
254 | //
255 | // An output image with N components has the following components interleaved
256 | // in this order in each pixel:
257 | //
258 | // N=#comp components
259 | // 1 grey
260 | // 2 grey, alpha
261 | // 3 red, green, blue
262 | // 4 red, green, blue, alpha
263 | //
264 | // If image loading fails for any reason, the return value will be NULL,
265 | // and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
266 | // can be queried for an extremely brief, end-user unfriendly explanation
267 | // of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
268 | // compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
269 | // more user-friendly ones.
270 | //
271 | // Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
272 | //
273 | // ===========================================================================
274 | //
275 | // Philosophy
276 | //
277 | // stb libraries are designed with the following priorities:
278 | //
279 | // 1. easy to use
280 | // 2. easy to maintain
281 | // 3. good performance
282 | //
283 | // Sometimes I let "good performance" creep up in priority over "easy to maintain",
284 | // and for best performance I may provide less-easy-to-use APIs that give higher
285 | // performance, in addition to the easy to use ones. Nevertheless, it's important
286 | // to keep in mind that from the standpoint of you, a client of this library,
287 | // all you care about is #1 and #3, and stb libraries do not emphasize #3 above all.
288 | //
289 | // Some secondary priorities arise directly from the first two, some of which
290 | // make more explicit reasons why performance can't be emphasized.
291 | //
292 | // - Portable ("ease of use")
293 | // - Small footprint ("easy to maintain")
294 | // - No dependencies ("ease of use")
295 | //
296 | // ===========================================================================
297 | //
298 | // I/O callbacks
299 | //
300 | // I/O callbacks allow you to read from arbitrary sources, like packaged
301 | // files or some other source. Data read from callbacks are processed
302 | // through a small internal buffer (currently 128 bytes) to try to reduce
303 | // overhead.
304 | //
305 | // The three functions you must define are "read" (reads some bytes of data),
306 | // "skip" (skips some bytes of data), "eof" (reports if the stream is at the end).
307 | //
308 | // ===========================================================================
309 | //
310 | // SIMD support
311 | //
312 | // The JPEG decoder will try to automatically use SIMD kernels on x86 when
313 | // supported by the compiler. For ARM Neon support, you must explicitly
314 | // request it.
315 | //
316 | // (The old do-it-yourself SIMD API is no longer supported in the current
317 | // code.)
318 | //
319 | // On x86, SSE2 will automatically be used when available based on a run-time
320 | // test; if not, the generic C versions are used as a fall-back. On ARM targets,
321 | // the typical path is to have separate builds for NEON and non-NEON devices
322 | // (at least this is true for iOS and Android). Therefore, the NEON support is
323 | // toggled by a build flag: define STBI_NEON to get NEON loops.
324 | //
325 | // The output of the JPEG decoder is slightly different from versions where
326 | // SIMD support was introduced (that is, for versions before 1.49). The
327 | // difference is only +-1 in the 8-bit RGB channels, and only on a small
328 | // fraction of pixels. You can force the pre-1.49 behavior by defining
329 | // STBI_JPEG_OLD, but this will disable some of the SIMD decoding path
330 | // and hence cost some performance.
331 | //
332 | // If for some reason you do not want to use any of SIMD code, or if
333 | // you have issues compiling it, you can disable it entirely by
334 | // defining STBI_NO_SIMD.
335 | //
336 | // ===========================================================================
337 | //
338 | // HDR image support (disable by defining STBI_NO_HDR)
339 | //
340 | // stb_image now supports loading HDR images in general, and currently
341 | // the Radiance .HDR file format, although the support is provided
342 | // generically. You can still load any file through the existing interface;
343 | // if you attempt to load an HDR file, it will be automatically remapped to
344 | // LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
345 | // both of these constants can be reconfigured through this interface:
346 | //
347 | // stbi_hdr_to_ldr_gamma(2.2f);
348 | // stbi_hdr_to_ldr_scale(1.0f);
349 | //
350 | // (note, do not use _inverse_ constants; stbi_image will invert them
351 | // appropriately).
352 | //
353 | // Additionally, there is a new, parallel interface for loading files as
354 | // (linear) floats to preserve the full dynamic range:
355 | //
356 | // float *data = stbi_loadf(filename, &x, &y, &n, 0);
357 | //
358 | // If you load LDR images through this interface, those images will
359 | // be promoted to floating point values, run through the inverse of
360 | // constants corresponding to the above:
361 | //
362 | // stbi_ldr_to_hdr_scale(1.0f);
363 | // stbi_ldr_to_hdr_gamma(2.2f);
364 | //
365 | // Finally, given a filename (or an open file or memory block--see header
366 | // file for details) containing image data, you can query for the "most
367 | // appropriate" interface to use (that is, whether the image is HDR or
368 | // not), using:
369 | //
370 | // stbi_is_hdr(char *filename);
371 | //
372 | // ===========================================================================
373 | //
374 | // iPhone PNG support:
375 | //
376 | // By default we convert iphone-formatted PNGs back to RGB, even though
377 | // they are internally encoded differently. You can disable this conversion
378 | // by by calling stbi_convert_iphone_png_to_rgb(0), in which case
379 | // you will always just get the native iphone "format" through (which
380 | // is BGR stored in RGB).
381 | //
382 | // Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
383 | // pixel to remove any premultiplied alpha *only* if the image file explicitly
384 | // says there's premultiplied data (currently only happens in iPhone images,
385 | // and only if iPhone convert-to-rgb processing is on).
386 | //
387 |
388 |
389 | #ifndef STBI_NO_STDIO
390 | #include
391 | #endif // STBI_NO_STDIO
392 |
393 | #define STBI_VERSION 1
394 |
395 | enum
396 | {
397 | STBI_default = 0, // only used for req_comp
398 |
399 | STBI_grey = 1,
400 | STBI_grey_alpha = 2,
401 | STBI_rgb = 3,
402 | STBI_rgb_alpha = 4
403 | };
404 |
405 | typedef unsigned char stbi_uc;
406 |
407 | #ifdef __cplusplus
408 | extern "C" {
409 | #endif
410 |
411 | #ifdef STB_IMAGE_STATIC
412 | #define STBIDEF static
413 | #else
414 | #define STBIDEF extern
415 | #endif
416 |
417 | //////////////////////////////////////////////////////////////////////////////
418 | //
419 | // PRIMARY API - works on images of any type
420 | //
421 |
422 | //
423 | // load image by filename, open file, or memory buffer
424 | //
425 |
426 | typedef struct
427 | {
428 | int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read
429 | void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
430 | int (*eof) (void *user); // returns nonzero if we are at end of file/data
431 | } stbi_io_callbacks;
432 |
433 | STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp);
434 | STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *comp, int req_comp);
435 | STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *comp, int req_comp);
436 |
437 | #ifndef STBI_NO_STDIO
438 | STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
439 | // for stbi_load_from_file, file pointer is left pointing immediately after image
440 | #endif
441 |
442 | #ifndef STBI_NO_LINEAR
443 | STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp);
444 | STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
445 | STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
446 |
447 | #ifndef STBI_NO_STDIO
448 | STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
449 | #endif
450 | #endif
451 |
452 | #ifndef STBI_NO_HDR
453 | STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
454 | STBIDEF void stbi_hdr_to_ldr_scale(float scale);
455 | #endif
456 |
457 | #ifndef STBI_NO_LINEAR
458 | STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
459 | STBIDEF void stbi_ldr_to_hdr_scale(float scale);
460 | #endif // STBI_NO_HDR
461 |
462 | // stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
463 | STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
464 | STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);
465 | #ifndef STBI_NO_STDIO
466 | STBIDEF int stbi_is_hdr (char const *filename);
467 | STBIDEF int stbi_is_hdr_from_file(FILE *f);
468 | #endif // STBI_NO_STDIO
469 |
470 |
471 | // get a VERY brief reason for failure
472 | // NOT THREADSAFE
473 | STBIDEF const char *stbi_failure_reason (void);
474 |
475 | // free the loaded image -- this is just free()
476 | STBIDEF void stbi_image_free (void *retval_from_stbi_load);
477 |
478 | // get image dimensions & components without fully decoding
479 | STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
480 | STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
481 |
482 | #ifndef STBI_NO_STDIO
483 | STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp);
484 | STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
485 |
486 | #endif
487 |
488 |
489 |
490 | // for image formats that explicitly notate that they have premultiplied alpha,
491 | // we just return the colors as stored in the file. set this flag to force
492 | // unpremultiplication. results are undefined if the unpremultiply overflow.
493 | STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
494 |
495 | // indicate whether we should process iphone images back to canonical format,
496 | // or just pass them through "as-is"
497 | STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);
498 |
499 | // flip the image vertically, so the first pixel in the output array is the bottom left
500 | STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip);
501 |
502 | // ZLIB client - used by PNG, available for other purposes
503 |
504 | STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
505 | STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
506 | STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
507 | STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
508 |
509 | STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
510 | STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
511 |
512 |
513 | #ifdef __cplusplus
514 | }
515 | #endif
516 |
517 | //
518 | //
519 | //// end header file /////////////////////////////////////////////////////
520 | #endif // STBI_INCLUDE_STB_IMAGE_H
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib.dll
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_d.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_d.dll
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_u.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_u.dll
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_ud.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/dll/DuiLib_ud.dll
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_d.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_u.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_u.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_ud.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_Static_ud.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_d.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_u.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_u.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_ud.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/Duilib/lib/DuiLib_ud.lib
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/DuilibBase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/DuilibBase.h
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/DuilibFormwork.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | Win32Proj
24 | {ceec7acf-962c-4d1c-a642-55f650e2387f}
25 | DuilibFormwork
26 | 10.0
27 |
28 |
29 |
30 | Application
31 | true
32 | v142
33 | Unicode
34 |
35 |
36 | Application
37 | false
38 | v142
39 | true
40 | Unicode
41 |
42 |
43 | Application
44 | true
45 | v142
46 | Unicode
47 |
48 |
49 | Application
50 | false
51 | v142
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | true
75 | Duilib;$(IncludePath)
76 | Duilib\lib;$(LibraryPath)
77 |
78 |
79 | false
80 |
81 |
82 | true
83 |
84 |
85 | false
86 |
87 |
88 |
89 | Level3
90 | true
91 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
92 | true
93 | MultiThreadedDebug
94 |
95 |
96 | Windows
97 | true
98 |
99 |
100 |
101 |
102 | Level3
103 | true
104 | true
105 | true
106 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
107 | true
108 |
109 |
110 | Windows
111 | true
112 | true
113 | true
114 |
115 |
116 |
117 |
118 | Level3
119 | true
120 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
121 | true
122 |
123 |
124 | Windows
125 | true
126 |
127 |
128 |
129 |
130 | Level3
131 | true
132 | true
133 | true
134 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
135 | true
136 |
137 |
138 | Windows
139 | true
140 | true
141 | true
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/DuilibFormwork.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | 源文件
20 |
21 |
22 | 源文件
23 |
24 |
25 |
26 |
27 | 头文件
28 |
29 |
30 | 头文件
31 |
32 |
33 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/DuilibFormwork.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | WindowsLocalDebugger
7 | Duilib\dll
8 |
9 |
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/main.cpp
--------------------------------------------------------------------------------
/DuilibFormwork/DuilibFormwork/配置环境.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibFormwork/DuilibFormwork/配置环境.txt
--------------------------------------------------------------------------------
/DuilibMinDemo/Debug/DuiLib_ud.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/Debug/DuiLib_ud.dll
--------------------------------------------------------------------------------
/DuilibMinDemo/Debug/DuilibMinDemo.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/Debug/DuilibMinDemo.exe
--------------------------------------------------------------------------------
/DuilibMinDemo/Debug/DuilibMinDemo.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/Debug/DuilibMinDemo.ilk
--------------------------------------------------------------------------------
/DuilibMinDemo/Debug/DuilibMinDemo.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/Debug/DuilibMinDemo.pdb
--------------------------------------------------------------------------------
/DuilibMinDemo/Debug/duilib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30804.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DuilibMinDemo", "DuilibMinDemo\DuilibMinDemo.vcxproj", "{E0F66B81-4F9C-4F29-890A-78D58C32E747}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Debug|x64.ActiveCfg = Debug|x64
17 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Debug|x64.Build.0 = Debug|x64
18 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Debug|x86.ActiveCfg = Debug|Win32
19 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Debug|x86.Build.0 = Debug|Win32
20 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Release|x64.ActiveCfg = Release|x64
21 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Release|x64.Build.0 = Release|x64
22 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Release|x86.ActiveCfg = Release|Win32
23 | {E0F66B81-4F9C-4F29-890A-78D58C32E747}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {C43415FF-0711-4B6F-9CFF-C996D97AD569}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.exe.recipe:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | G:\Duilib\DuilibMinDemo\Debug\DuilibMinDemo.exe
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.log:
--------------------------------------------------------------------------------
1 | DuilibMinDemo.vcxproj -> G:\Duilib\DuilibMinDemo\Debug\DuilibMinDemo.exe
2 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.command.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.read.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/CL.write.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/DuilibMinDemo.lastbuildstate:
--------------------------------------------------------------------------------
1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29333:TargetPlatformVersion=10.0.18362.0:
2 | Debug|Win32|G:\Duilib\DuilibMinDemo\|
3 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.command.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.command.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.read.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/DuilibMinDemo.tlog/link.write.1.tlog
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/vc142.idb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/vc142.idb
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/Debug/vc142.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/Debug/vc142.pdb
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuiLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/DuiLib.dll
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuiLib_d.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/DuiLib_d.dll
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuiLib_u.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/DuiLib_u.dll
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuiLib_ud.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/DuiLib_ud.dll
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuilibMinDemo.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | Win32Proj
24 | {e0f66b81-4f9c-4f29-890a-78d58c32e747}
25 | DuilibMinDemo
26 | 10.0
27 |
28 |
29 |
30 | Application
31 | true
32 | v142
33 | Unicode
34 |
35 |
36 | Application
37 | false
38 | v142
39 | true
40 | Unicode
41 |
42 |
43 | Application
44 | true
45 | v142
46 | Unicode
47 |
48 |
49 | Application
50 | false
51 | v142
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | true
75 | G:\Duilib\duilib-master\DuiLib;G:\Duilib\duilib-master\DuiLib;$(IncludePath)
76 | G:\Duilib\duilib-master\lib;$(LibraryPath)
77 |
78 |
79 | false
80 | G:\Duilib\duilib-master\DuiLib;$(VC_IncludePath);$(WindowsSDK_IncludePath);
81 | G:\Duilib\duilib-master\lib;$(LibraryPath)
82 |
83 |
84 | true
85 |
86 |
87 | false
88 |
89 |
90 |
91 | Level3
92 | true
93 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
94 | true
95 |
96 |
97 | Windows
98 | true
99 |
100 |
101 |
102 |
103 | Level3
104 | true
105 | true
106 | true
107 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
108 | true
109 |
110 |
111 | Windows
112 | true
113 | true
114 | true
115 |
116 |
117 |
118 |
119 | Level3
120 | true
121 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
122 | true
123 |
124 |
125 | Windows
126 | true
127 |
128 |
129 |
130 |
131 | Level3
132 | true
133 | true
134 | true
135 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
136 | true
137 |
138 |
139 | Windows
140 | true
141 | true
142 | true
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuilibMinDemo.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | 源文件
20 |
21 |
22 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/DuilibMinDemo.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DuilibMinDemo/DuilibMinDemo/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemo/DuilibMinDemo/main.cpp
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/Debug/DuilibMinDemoStatic.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemoStatic/Debug/DuilibMinDemoStatic.exe
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/Debug/duilib.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30804.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DuilibMinDemoStatic", "DuilibMinDemoStatic\DuilibMinDemoStatic.vcxproj", "{7E392C3E-79C8-481C-A79C-72607562E2E4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Debug|x64.ActiveCfg = Debug|x64
17 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Debug|x64.Build.0 = Debug|x64
18 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Debug|x86.ActiveCfg = Debug|Win32
19 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Debug|x86.Build.0 = Debug|Win32
20 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Release|x64.ActiveCfg = Release|x64
21 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Release|x64.Build.0 = Release|x64
22 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Release|x86.ActiveCfg = Release|Win32
23 | {7E392C3E-79C8-481C-A79C-72607562E2E4}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {110E5DA3-4DA0-402A-969C-F7A058828371}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic/DuiLib_Static_ud.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemoStatic/DuilibMinDemoStatic/DuiLib_Static_ud.lib
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic/DuilibMinDemoStatic.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 16.0
23 | Win32Proj
24 | {7e392c3e-79c8-481c-a79c-72607562e2e4}
25 | DuilibMinDemoStatic
26 | 10.0
27 |
28 |
29 |
30 | Application
31 | true
32 | v142
33 | Unicode
34 |
35 |
36 | Application
37 | false
38 | v142
39 | true
40 | Unicode
41 |
42 |
43 | Application
44 | true
45 | v142
46 | Unicode
47 |
48 |
49 | Application
50 | false
51 | v142
52 | true
53 | Unicode
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | true
75 | G:\Duilib\duilib-master\DuiLib;$(IncludePath)
76 |
77 |
78 | false
79 | G:\Duilib\duilib-master\DuiLib;$(IncludePath)
80 |
81 |
82 | true
83 |
84 |
85 | false
86 |
87 |
88 |
89 | Level3
90 | true
91 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
92 | true
93 | MultiThreadedDebug
94 |
95 |
96 | Windows
97 | true
98 |
99 |
100 |
101 |
102 | Level3
103 | true
104 | true
105 | true
106 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
107 | true
108 | MultiThreadedDebug
109 |
110 |
111 | Windows
112 | true
113 | true
114 | true
115 |
116 |
117 |
118 |
119 | Level3
120 | true
121 | _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
122 | true
123 |
124 |
125 | Windows
126 | true
127 |
128 |
129 |
130 |
131 | Level3
132 | true
133 | true
134 | true
135 | NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
136 | true
137 |
138 |
139 | Windows
140 | true
141 | true
142 | true
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic/DuilibMinDemoStatic.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | 源文件
20 |
21 |
22 |
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic/DuilibMinDemoStatic.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DuilibMinDemoStatic/DuilibMinDemoStatic/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KongKong20/DuilibTutor/2c3fc7b10ee316db8a0e7921dcbb7e4197965882/DuilibMinDemoStatic/DuilibMinDemoStatic/main.cpp
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 KongKong20
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DuilibTutor
2 | Duilib 教程指南
3 |
4 | DuilibFormwork:Duilib模板
5 |
6 | DuilibMinDemo:调用Duilib动态库的Demo
7 |
8 | DuilibMinDemoStatic:调用Duilib静态库的Demo
9 |
10 | 博客地址:https://blog.csdn.net/weixin_42194433
11 |
12 | qq交流群:799142530
13 |
--------------------------------------------------------------------------------