Skip to content

Commit 58395c6

Browse files
committed
Sync class & file name DUIStatic --> DUILabel
1 parent 09e4eb5 commit 58395c6

File tree

10 files changed

+27
-24
lines changed

10 files changed

+27
-24
lines changed

DmMain/inc/Widgets/DMWidgetDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace DM
1818
{
1919
// ----------------------------------------------------
2020
// 内置窗口定义
21-
#define DUINAME_Static L"label" // DUI Static
21+
#define DUINAME_Label L"label" // DUI Label
2222
#define DUINAME_Group L"group" // DUI Group
2323
#define DUINAME_CheckBox L"checkbox" // DUI CheckBox
2424
#define DUINAME_Link L"link" // DUI Link

DmMain/inc/Widgets/DUIStatic.h renamed to DmMain/inc/Widgets/DUILabel.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Copyright (c) DuiMagic
33
// All rights reserved.
44
//
5-
// File Name: DUIStatic.h
6-
// File Des: 内置static实现
5+
// File Name: DUILabel.h
6+
// File Des: 内置Label实现
77
// File Summary:
88
// Cur Version: 1.0
99
// Author:
@@ -17,27 +17,27 @@
1717
namespace DMAttr
1818
{
1919
/// <summary>
20-
/// <see cref="DM::DUIStatic"/>的xml属性定义
20+
/// <see cref="DM::DUILabel"/>的xml属性定义
2121
/// </summary>
22-
class DUIStaticAttr:public DUIWindowAttr
22+
class DUILabelAttr:public DUIWindowAttr
2323
{
2424
public:
2525
static wchar_t* bool_bmultiLines; ///< 是否支持多行,示例:bmultiLines="1"
2626
static wchar_t* INT_lineinter; ///< 行间距,默认为5,示例:lineinter="5"
2727
};
28-
DMAttrValueInit(DUIStaticAttr,bool_bmultiLines)DMAttrValueInit(DUIStaticAttr,INT_lineinter)
28+
DMAttrValueInit(DUILabelAttr,bool_bmultiLines)DMAttrValueInit(DUILabelAttr,INT_lineinter)
2929
}
3030

3131
namespace DM
3232
{
3333
/// <summary>
34-
/// DUIStatic的内置实现
34+
/// DUILabel的内置实现
3535
/// </summary>
36-
class DM_EXPORT DUIStatic:public DUIWindow
36+
class DM_EXPORT DUILabel :public DUIWindow
3737
{
38-
DMDECLARE_CLASS_NAME(DUIStatic,DUINAME_Static,DMREG_Window);
38+
DMDECLARE_CLASS_NAME(DUILabel,DUINAME_Label,DMREG_Window);
3939
public:
40-
DUIStatic();
40+
DUILabel();
4141

4242
//---------------------------------------------------
4343
// Function Des: 重载DUIWindow
@@ -46,12 +46,15 @@ namespace DM
4646

4747
public:
4848
DM_BEGIN_ATTRIBUTES()
49-
DM_bool_ATTRIBUTE(DMAttr::DUIStaticAttr::bool_bmultiLines, m_bMultiLines, DM_ECODE_OK)
50-
DM_INT_ATTRIBUTE(DMAttr::DUIStaticAttr::INT_lineinter, m_nLineInter, DM_ECODE_OK)
49+
DM_bool_ATTRIBUTE(DMAttr::DUILabelAttr::bool_bmultiLines, m_bMultiLines, DM_ECODE_OK)
50+
DM_INT_ATTRIBUTE(DMAttr::DUILabelAttr::INT_lineinter, m_nLineInter, DM_ECODE_OK)
5151
DM_END_ATTRIBUTES()
5252
public:
5353
bool m_bMultiLines;
5454
int m_nLineInter;
5555
};
5656

57+
// [deprecated]
58+
typedef DUILabel DUIStatic;
59+
5760
}//namespace DM

DmMain/src/Modules/DMPluginImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "DUIListBox.h"
2323
#include "DUIListBoxEx.h"
2424
#include "DUIEdit.h"
25-
#include "DUIStatic.h"
25+
#include "DUILabel.h"
2626
#include "DUILink.h"
2727
#include "DUIComboBox.h"
2828
#include "DUIActiveX.h"
@@ -141,7 +141,7 @@ namespace DM
141141
iErr = g_pDMApp->Register(DMRegHelperT<DUIRichEdit>(),true);
142142
iErr = g_pDMApp->Register(DMRegHelperT<DUIEdit>(),true);
143143
new DUIEditHelper;// 和edit相关
144-
iErr = g_pDMApp->Register(DMRegHelperT<DUIStatic>(),true);
144+
iErr = g_pDMApp->Register(DMRegHelperT<DUILabel>(),true);
145145
iErr = g_pDMApp->Register(DMRegHelperT<DUILink>(),true);
146146
iErr = g_pDMApp->Register(DMRegHelperT<DUIComboBox>(),true);
147147
iErr = g_pDMApp->Register(DMRegHelperT<DUIGif>(),true);

DmMain/src/Widgets/DUIStatic.cpp renamed to DmMain/src/Widgets/DUILabel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#include "DmMainAfx.h"
2-
#include "DUIStatic.h"
2+
#include "DUILabel.h"
33

44
namespace DM
55
{
6-
DUIStatic::DUIStatic()
6+
DUILabel::DUILabel()
77
{
88
m_bMultiLines = false;
99
m_nLineInter = 5;
1010
m_pDUIXmlInfo->m_bMsgNoHandle = true;
1111
}
1212

13-
DMCode DUIStatic::DV_DrawText(IDMCanvas* pCanvas, LPCWSTR pszBuf,int cchText,LPRECT pRect,UINT uFormat)
13+
DMCode DUILabel::DV_DrawText(IDMCanvas* pCanvas, LPCWSTR pszBuf,int cchText,LPRECT pRect,UINT uFormat)
1414
{
1515
do
1616
{

Docs/TestData/DesignerRes/DMAttr.xml

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

Docs/TestData/DesignerRes/DMCls.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<duistyleattr />
3535
</window>
3636
<label>
37-
<duistaticattr />
37+
<duilabelattr />
3838
<duiwindowattr />
3939
<duistyleattr />
4040
</label>

Samples/DMDesigner/inc/DMDesignerAfx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "DUICheckBox.h"
2121
#include "DUIEdit.h"
2222
#include "DUIMenu.h"
23-
#include "DUIStatic.h"
23+
#include "DUILabel.h"
2424
#include "DUITabCtrl.h"
2525
#include "DUIFlowLayout.h"
2626
#include "DUIListBoxEx.h"

Samples/DMDesigner/src/Core/WidgetAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ void WidgetAttr::InitSpecialValue(CStringW& strValue, DMXmlInitAttrPtr pInitAttr
616616
{
617617
strInitValue = L"0";
618618
}
619-
if (0 == m_strList[0].CompareNoCase(L"DUIStaticAttr") && 0 == _wcsicmp(pInitAttr->m_pAttr->GetName(),L"bool_bmsgnohandle"))
619+
if (0 == m_strList[0].CompareNoCase(L"DUILabelAttr") && 0 == _wcsicmp(pInitAttr->m_pAttr->GetName(),L"bool_bmsgnohandle"))
620620
{
621621
strInitValue = L"1";
622622
}

Samples/QQDemo/inc/QQDemoAfx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ using namespace DM;
2626
#include "DUITreeCtrl.h"
2727
#include "DUIGif.h"
2828
#include "DMResFolderImpl.h"
29-
#include "DUIStatic.h"
29+
#include "DUILabel.h"
3030
#include "DMSpyTool.h"

Samples/TGPDemo/inc/TGPDemoAfx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ using namespace DM;
2525
#include "DUITreeCtrl.h"
2626
#include "DUIGif.h"
2727
#include "DMResFolderImpl.h"
28-
#include "DUIStatic.h"
28+
#include "DUILabel.h"
2929
#include "TGPMenu.h"

0 commit comments

Comments
 (0)