mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-02-06 12:01:39 +08:00
Update release
This commit is contained in:
@@ -439,7 +439,7 @@ namespace gaclib_controls
|
||||
NEXT_NODE:;
|
||||
}
|
||||
|
||||
auto view = dynamic_cast<tree::INodeItemView*>(treeViewDom->GetItemProvider()->RequestView(tree::INodeItemView::Identifier));
|
||||
auto view = dynamic_cast<tree::INodeItemView*>(treeViewDom->GetItemProvider()->RequestView(WString::Unmanaged(tree::INodeItemView::Identifier)));
|
||||
vint index = view->CalculateNodeVisibilityIndex(treeNode.Obj());
|
||||
treeViewDom->SetSelected(index, true);
|
||||
treeViewDom->EnsureItemVisible(index);
|
||||
|
||||
5376
Import/GacUI.cpp
5376
Import/GacUI.cpp
File diff suppressed because it is too large
Load Diff
2917
Import/GacUI.h
2917
Import/GacUI.h
File diff suppressed because it is too large
Load Diff
@@ -1966,14 +1966,14 @@ Type Declaration (Extra)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ColumnSplitters)
|
||||
END_CLASS_MEMBER(ListViewColumnItemArranger)
|
||||
|
||||
BEGIN_CLASS_MEMBER(ListViewColumnItemArranger::IColumnItemViewCallback)
|
||||
BEGIN_CLASS_MEMBER(IColumnItemViewCallback)
|
||||
CLASS_MEMBER_METHOD(OnColumnRebuilt, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(OnColumnChanged, {L"needToRefreshItems"})
|
||||
END_CLASS_MEMBER(ListViewColumnItemArranger::IColumnItemViewCallback)
|
||||
END_CLASS_MEMBER(IColumnItemViewCallback)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER(ListViewColumnItemArranger::IColumnItemView)
|
||||
BEGIN_INTERFACE_MEMBER(IColumnItemView)
|
||||
CLASS_MEMBER_BASE(IDescriptable)
|
||||
INTERFACE_IDENTIFIER(vl::presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)
|
||||
INTERFACE_IDENTIFIER(vl::presentation::controls::list::IColumnItemView)
|
||||
|
||||
CLASS_MEMBER_METHOD(AttachCallback, {L"value"})
|
||||
CLASS_MEMBER_METHOD(DetachCallback, {L"value"})
|
||||
@@ -1981,7 +1981,7 @@ Type Declaration (Extra)
|
||||
CLASS_MEMBER_METHOD(SetColumnSize, {L"index" _ L"value"})
|
||||
CLASS_MEMBER_METHOD(GetDropdownPopup, {L"index"})
|
||||
CLASS_MEMBER_METHOD(GetSortingState, {L"index"})
|
||||
END_INTERFACE_MEMBER(ListViewColumnItemArranger::IColumnItemView)
|
||||
END_INTERFACE_MEMBER(IColumnItemView)
|
||||
|
||||
BEGIN_CLASS_MEMBER(ListViewItem)
|
||||
CLASS_MEMBER_CONSTRUCTOR(Ptr<ListViewItem>(), NO_PARAMETER)
|
||||
@@ -2009,7 +2009,7 @@ Type Declaration (Extra)
|
||||
BEGIN_CLASS_MEMBER(ListViewItemProvider)
|
||||
CLASS_MEMBER_BASE(list::IItemProvider)
|
||||
CLASS_MEMBER_BASE(IListViewItemView)
|
||||
CLASS_MEMBER_BASE(ListViewColumnItemArranger::IColumnItemView)
|
||||
CLASS_MEMBER_BASE(IColumnItemView)
|
||||
END_CLASS_MEMBER(ListViewItemProvider)
|
||||
|
||||
BEGIN_ENUM_ITEM(ListViewView)
|
||||
@@ -2377,30 +2377,30 @@ Type Declaration (Extra)
|
||||
BEGIN_CLASS_MEMBER(DataProvider)
|
||||
CLASS_MEMBER_BASE(ItemProviderBase)
|
||||
CLASS_MEMBER_BASE(IListViewItemView)
|
||||
CLASS_MEMBER_BASE(ListViewColumnItemArranger::IColumnItemView)
|
||||
CLASS_MEMBER_BASE(IColumnItemView)
|
||||
CLASS_MEMBER_BASE(IDataGridView)
|
||||
CLASS_MEMBER_BASE(IDataProcessorCallback)
|
||||
END_CLASS_MEMBER(DataProvider)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableTextList::ItemSource)
|
||||
BEGIN_CLASS_MEMBER(TextItemBindableProvider)
|
||||
CLASS_MEMBER_BASE(ItemProviderBase)
|
||||
CLASS_MEMBER_BASE(ITextItemView)
|
||||
END_CLASS_MEMBER(GuiBindableTextList::ItemSource)
|
||||
END_CLASS_MEMBER(TextItemBindableProvider)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableListView::ItemSource)
|
||||
BEGIN_CLASS_MEMBER(ListViewItemBindableProvider)
|
||||
CLASS_MEMBER_BASE(ItemProviderBase)
|
||||
CLASS_MEMBER_BASE(IListViewItemView)
|
||||
CLASS_MEMBER_BASE(ListViewColumnItemArranger::IColumnItemView)
|
||||
END_CLASS_MEMBER(GuiBindableListView::ItemSource)
|
||||
CLASS_MEMBER_BASE(IColumnItemView)
|
||||
END_CLASS_MEMBER(ListViewItemBindableProvider)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableTreeView::ItemSourceNode)
|
||||
BEGIN_CLASS_MEMBER(TreeViewItemBindableNode)
|
||||
CLASS_MEMBER_BASE(INodeProvider)
|
||||
END_CLASS_MEMBER(GuiBindableTreeView::ItemSourceNode)
|
||||
END_CLASS_MEMBER(TreeViewItemBindableNode)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableTreeView::ItemSource)
|
||||
BEGIN_CLASS_MEMBER(TreeViewItemBindableRootProvider)
|
||||
CLASS_MEMBER_BASE(NodeRootProviderBase)
|
||||
CLASS_MEMBER_BASE(ITreeViewItemView)
|
||||
END_CLASS_MEMBER(GuiBindableTreeView::ItemSource)
|
||||
END_CLASS_MEMBER(TreeViewItemBindableRootProvider)
|
||||
|
||||
/***********************************************************************
|
||||
Type Declaration (Class)
|
||||
@@ -3358,6 +3358,7 @@ Type Declaration (Class)
|
||||
CLASS_MEMBER_PROPERTY_FAST(ParagraphPadding)
|
||||
CLASS_MEMBER_PROPERTY_FAST(WrapLine)
|
||||
CLASS_MEMBER_PROPERTY_FAST(PasswordChar)
|
||||
CLASS_MEMBER_PROPERTY_FAST(ParagraphRecycle)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretBegin)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretEnd)
|
||||
CLASS_MEMBER_PROPERTY_FAST(CaretVisible)
|
||||
|
||||
@@ -386,9 +386,9 @@ Type List (Controls)
|
||||
F(presentation::controls::list::TextItemProvider)\
|
||||
F(presentation::controls::TextListView)\
|
||||
F(presentation::controls::list::IListViewItemView)\
|
||||
F(presentation::controls::list::IColumnItemViewCallback)\
|
||||
F(presentation::controls::list::IColumnItemView)\
|
||||
F(presentation::controls::list::ListViewColumnItemArranger)\
|
||||
F(presentation::controls::list::ListViewColumnItemArranger::IColumnItemViewCallback)\
|
||||
F(presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)\
|
||||
F(presentation::controls::list::ListViewItem)\
|
||||
F(presentation::controls::list::ListViewColumn)\
|
||||
F(presentation::controls::ListViewView)\
|
||||
@@ -440,10 +440,10 @@ Type List (Controls)
|
||||
F(presentation::controls::list::DataReverseSorter)\
|
||||
F(presentation::controls::list::DataColumn)\
|
||||
F(presentation::controls::list::DataProvider)\
|
||||
F(presentation::controls::GuiBindableTextList::ItemSource)\
|
||||
F(presentation::controls::GuiBindableListView::ItemSource)\
|
||||
F(presentation::controls::GuiBindableTreeView::ItemSourceNode)\
|
||||
F(presentation::controls::GuiBindableTreeView::ItemSource)\
|
||||
F(presentation::controls::TextItemBindableProvider)\
|
||||
F(presentation::controls::ListViewItemBindableProvider)\
|
||||
F(presentation::controls::TreeViewItemBindableNode)\
|
||||
F(presentation::controls::TreeViewItemBindableRootProvider)\
|
||||
|
||||
#define GUIREFLECTIONCONTROLS_CLASS_TYPELIST(F)\
|
||||
F(presentation::controls::GuiControl)\
|
||||
@@ -967,14 +967,14 @@ Interface Proxy (Controls)
|
||||
}
|
||||
END_INTERFACE_PROXY(presentation::controls::list::IListViewItemView)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::controls::list::IColumnItemView)
|
||||
|
||||
bool AttachCallback(presentation::controls::list::ListViewColumnItemArranger::IColumnItemViewCallback* value)override
|
||||
bool AttachCallback(presentation::controls::list::IColumnItemViewCallback* value)override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(AttachCallback, value);
|
||||
}
|
||||
|
||||
bool DetachCallback(presentation::controls::list::ListViewColumnItemArranger::IColumnItemViewCallback* value)override
|
||||
bool DetachCallback(presentation::controls::list::IColumnItemViewCallback* value)override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(DetachCallback, value);
|
||||
}
|
||||
@@ -998,7 +998,7 @@ Interface Proxy (Controls)
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(GetSortingState, index);
|
||||
}
|
||||
END_INTERFACE_PROXY(presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)
|
||||
END_INTERFACE_PROXY(presentation::controls::list::IColumnItemView)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::controls::tree::INodeProvider)
|
||||
|
||||
|
||||
131
Import/Vlpp.cpp
131
Import/Vlpp.cpp
@@ -1374,8 +1374,107 @@ Licensed under https://github.com/vczh-libraries/License
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
#ifdef VCZH_GCC
|
||||
#define _wcsnicmp wcsncasecmp
|
||||
#endif
|
||||
|
||||
namespace vl
|
||||
{
|
||||
|
||||
/***********************************************************************
|
||||
MatchWildcardNaive
|
||||
***********************************************************************/
|
||||
|
||||
static vint WildcardNextToken(const wchar_t*& wildcard)
|
||||
{
|
||||
wchar_t c = *wildcard;
|
||||
if (c == L'\0')
|
||||
{
|
||||
return -3;
|
||||
}
|
||||
else if (c == L'?')
|
||||
{
|
||||
wildcard++;
|
||||
return -2;
|
||||
}
|
||||
else if (c == L'*')
|
||||
{
|
||||
vint questionCount = 0;
|
||||
while (true)
|
||||
{
|
||||
if (c == L'?')
|
||||
{
|
||||
questionCount++;
|
||||
}
|
||||
else if (c != L'*')
|
||||
{
|
||||
break;
|
||||
}
|
||||
c = *++wildcard;
|
||||
}
|
||||
return questionCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (c != L'\0' && c != L'?' && c != L'*')
|
||||
{
|
||||
c = *++wildcard;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
bool MatchWildcardNaive(const wchar_t* wildcard, const wchar_t* text, bool caseSensitive)
|
||||
{
|
||||
#define ERROR_MESSAGE_PREFIX L"vl::MatchWildcardNaive(const wchar_t*, const wchar_t*, bool)#"
|
||||
CHECK_ERROR(wildcard != nullptr, ERROR_MESSAGE_PREFIX L"wildcard cannot be nullptr");
|
||||
CHECK_ERROR(text != nullptr, ERROR_MESSAGE_PREFIX L"text cannot be nullptr");
|
||||
|
||||
while (true)
|
||||
{
|
||||
const wchar_t* tokenStart = wildcard;
|
||||
vint tokenType = WildcardNextToken(wildcard);
|
||||
|
||||
switch (tokenType)
|
||||
{
|
||||
case -3:
|
||||
return *text == L'\0';
|
||||
case -2:
|
||||
if (*text == L'\0') return false;
|
||||
text++;
|
||||
break;
|
||||
case -1:
|
||||
{
|
||||
vint literalLen = wildcard - tokenStart;
|
||||
vint cmpResult = caseSensitive
|
||||
? wcsncmp(tokenStart, text, literalLen)
|
||||
: _wcsnicmp(tokenStart, text, literalLen);
|
||||
if (cmpResult != 0) return false;
|
||||
text += literalLen;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
vint minSkip = tokenType;
|
||||
for (vint i = 0; i < minSkip; i++)
|
||||
{
|
||||
if (*text++ == L'\0') return false;
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (MatchWildcardNaive(wildcard, text, caseSensitive))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (*text++ == L'\0') return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef ERROR_MESSAGE_PREFIX
|
||||
}
|
||||
|
||||
namespace unittest
|
||||
{
|
||||
using namespace vl::console;
|
||||
@@ -1643,26 +1742,28 @@ UnitTest
|
||||
if (_Fs.Count() > 0)
|
||||
{
|
||||
skipped = true;
|
||||
for (auto fileName : From(_Fs))
|
||||
|
||||
// Extract the filename from the full path
|
||||
const char* fullPath = current->fileName;
|
||||
const char* fileNameStart = fullPath;
|
||||
for (const char* p = fullPath; *p != '\0'; p++)
|
||||
{
|
||||
if (current->fileName == fileName)
|
||||
if (*p == '/' || *p == '\\')
|
||||
{
|
||||
fileNameStart = p + 1;
|
||||
}
|
||||
}
|
||||
auto currentFileName = atow(AString::Unmanaged(fileNameStart));
|
||||
|
||||
// Check if any wildcard pattern matches the filename
|
||||
for (auto pattern : From(_Fs))
|
||||
{
|
||||
auto widePattern = atow(pattern);
|
||||
if (MatchWildcardNaive(widePattern.Buffer(), currentFileName.Buffer(), false))
|
||||
{
|
||||
skipped = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
vint len = (vint)strlen(current->fileName);
|
||||
if (len > fileName.Length())
|
||||
{
|
||||
char delimiter = current->fileName[len - fileName.Length() - 1];
|
||||
if ((delimiter == L'/' || delimiter == L'\\') && current->fileName + (len - fileName.Length()) == fileName)
|
||||
{
|
||||
skipped = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9526,6 +9526,8 @@ Licensed under https://github.com/vczh-libraries/License
|
||||
|
||||
namespace vl
|
||||
{
|
||||
extern bool MatchWildcardNaive(const wchar_t* wildcard, const wchar_t* text, bool caseSensitive);
|
||||
|
||||
namespace unittest
|
||||
{
|
||||
using UnitTestFileProc = void(*)();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user