mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-02 07:26:40 +08:00
Update release
This commit is contained in:
+1169
-66
File diff suppressed because it is too large
Load Diff
+343
-54
@@ -8201,10 +8201,11 @@ namespace vl
|
||||
class GuiRepeatCompositionBase : public Object, public Description<GuiRepeatCompositionBase>
|
||||
{
|
||||
using ItemStyleProperty = TemplateProperty<templates::GuiTemplate>;
|
||||
using ItemSourceType = Ptr<reflection::description::IValueObservableList>;
|
||||
using IValueEnumerable = reflection::description::IValueEnumerable;
|
||||
using IValueList = reflection::description::IValueList;
|
||||
protected:
|
||||
ItemStyleProperty itemTemplate;
|
||||
ItemSourceType itemSource;
|
||||
Ptr<IValueList> itemSource;
|
||||
Ptr<EventHandler> itemChangedHandler;
|
||||
|
||||
virtual vint GetRepeatCompositionCount() = 0;
|
||||
@@ -8235,10 +8236,10 @@ namespace vl
|
||||
|
||||
/// <summary>Get the item source.</summary>
|
||||
/// <returns>The item source.</returns>
|
||||
ItemSourceType GetItemSource();
|
||||
Ptr<IValueEnumerable> GetItemSource();
|
||||
/// <summary>Set the item source.</summary>
|
||||
/// <param name="_itemSource">The item source. Null is acceptable if you want to clear all data.</param>
|
||||
void SetItemSource(ItemSourceType value);
|
||||
void SetItemSource(Ptr<IValueEnumerable> value);
|
||||
};
|
||||
|
||||
/// <summary>Bindable stack composition.</summary>
|
||||
@@ -8376,6 +8377,18 @@ namespace vl
|
||||
virtual void NotifyDateSelected() = 0;
|
||||
};
|
||||
|
||||
/// <summary>A command executor for the style controller to change the control state.</summary>
|
||||
class IRibbonGalleryCommandExecutor : public virtual IDescriptable, public Description<IRibbonGalleryCommandExecutor>
|
||||
{
|
||||
public:
|
||||
/// <summary>Called when the scroll up button is clicked.</summary>
|
||||
virtual void NotifyScrollUp() = 0;
|
||||
/// <summary>Called when the scroll down button is clicked.</summary>
|
||||
virtual void NotifyScrollDown() = 0;
|
||||
/// <summary>Called when the dropdown button is clicked.</summary>
|
||||
virtual void NotifyDropdown() = 0;
|
||||
};
|
||||
|
||||
class GuiInstanceRootObject;
|
||||
|
||||
/// <summary>
|
||||
@@ -8657,8 +8670,9 @@ namespace vl
|
||||
F(GuiRibbonGroupTemplate, GuiControlTemplate) \
|
||||
F(GuiRibbonButtonsTemplate, GuiControlTemplate) \
|
||||
F(GuiRibbonToolstripsTemplate, GuiControlTemplate) \
|
||||
F(GuiRibbonGalleryMenuTemplate, GuiMenuTemplate) \
|
||||
F(GuiRibbonToolstripMenuTemplate, GuiMenuTemplate) \
|
||||
F(GuiRibbonGalleryTemplate, GuiControlTemplate) \
|
||||
F(GuiRibbonGalleryListTemplate, GuiRibbonGalleryTemplate) \
|
||||
|
||||
#define GUI_ITEM_TEMPLATE_DECL(F)\
|
||||
F(GuiTextListItemTemplate, GuiListItemTemplate) \
|
||||
@@ -8857,13 +8871,20 @@ Control Template
|
||||
#define GuiRibbonToolstripsTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonToolstripsTemplate, TemplateProperty<GuiControlTemplate>, ToolbarTemplate, {})\
|
||||
|
||||
#define GuiRibbonGalleryTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonGalleryTemplate, TemplateProperty<GuiSelectableButtonTemplate>, BackgroundTemplate, {})\
|
||||
F(GuiRibbonGalleryTemplate, TemplateProperty<GuiRibbonGalleryMenuTemplate>, SubMenuTemplate, {})\
|
||||
#define GuiRibbonToolstripMenuTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonToolstripMenuTemplate, compositions::GuiGraphicsComposition*, ContentComposition, nullptr)\
|
||||
|
||||
#define GuiRibbonGalleryMenuTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonGalleryMenuTemplate, TemplateProperty<GuiSelectableButtonTemplate>, BackgroundTemplate, {})\
|
||||
F(GuiRibbonGalleryMenuTemplate, TemplateProperty<GuiControlTemplate>, HeaderTemplate, {})\
|
||||
#define GuiRibbonGalleryTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonGalleryTemplate, controls::IRibbonGalleryCommandExecutor*, Commands, nullptr)\
|
||||
F(GuiRibbonGalleryTemplate, bool, ScrollUpEnabled, true)\
|
||||
F(GuiRibbonGalleryTemplate, bool, ScrollDownEnabled, true)\
|
||||
|
||||
#define GuiRibbonGalleryListTemplate_PROPERTIES(F)\
|
||||
F(GuiRibbonGalleryListTemplate, TemplateProperty<GuiTextListTemplate>, ItemListTemplate, {})\
|
||||
F(GuiRibbonGalleryListTemplate, TemplateProperty<GuiRibbonToolstripMenuTemplate>, MenuTemplate, {})\
|
||||
F(GuiRibbonGalleryListTemplate, TemplateProperty<GuiControlTemplate>, HeaderTemplate, {})\
|
||||
F(GuiRibbonGalleryListTemplate, TemplateProperty<GuiSelectableButtonTemplate>, BackgroundTemplate, {})\
|
||||
F(GuiRibbonGalleryListTemplate, TemplateProperty<GuiScrollViewTemplate>, GroupContainerTemplate, {})\
|
||||
|
||||
/***********************************************************************
|
||||
Item Template
|
||||
@@ -9128,7 +9149,9 @@ namespace vl
|
||||
F(RibbonButtonsTemplate, RibbonButtons) \
|
||||
F(RibbonToolstripsTemplate, RibbonToolstrips) \
|
||||
F(RibbonGalleryTemplate, RibbonGallery) \
|
||||
F(RibbonGalleryMenuTemplate, RibbonGalleryMenu) \
|
||||
F(RibbonToolstripMenuTemplate, RibbonToolstripMenu) \
|
||||
F(RibbonGalleryListTemplate, RibbonGalleryList) \
|
||||
F(TextListTemplate, RibbonGalleryItemList) \
|
||||
F(ToolstripButtonTemplate, RibbonSmallButton) \
|
||||
F(ToolstripButtonTemplate, RibbonSmallDropdownButton) \
|
||||
F(ToolstripButtonTemplate, RibbonSmallSplitButton) \
|
||||
@@ -10699,6 +10722,12 @@ Scroll View
|
||||
/// <returns>The view bounds.</returns>
|
||||
Rect GetViewBounds();
|
||||
|
||||
/// <summary>Get the position of the left-top corner of the view bounds.</summary>
|
||||
/// <returns>The view position.</returns>
|
||||
Point GetViewPosition();
|
||||
/// <summary>Set the position of the left-top corner of the view bounds.</summary>
|
||||
void SetViewPosition(Point value);
|
||||
|
||||
/// <summary>Get the horizontal scroll control.</summary>
|
||||
/// <returns>The horizontal scroll control.</returns>
|
||||
GuiScroll* GetHorizontalScroll();
|
||||
@@ -11990,7 +12019,7 @@ Predefined ItemArranger
|
||||
vint pim_rowHeight = 0;
|
||||
|
||||
protected:
|
||||
vint rowHeight;
|
||||
vint rowHeight = 1;
|
||||
|
||||
virtual vint GetWidth();
|
||||
virtual vint GetYOffset();
|
||||
@@ -12018,7 +12047,7 @@ Predefined ItemArranger
|
||||
Size pim_itemSize;
|
||||
|
||||
protected:
|
||||
Size itemSize;
|
||||
Size itemSize{ 1,1 };
|
||||
|
||||
void CalculateRange(Size itemSize, Rect bounds, vint count, vint& start, vint& end);
|
||||
|
||||
@@ -17308,6 +17337,102 @@ GuiBindableTreeView
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\CONTROLS\TOOLSTRIPPACKAGE\GUIRIBBONIMPL.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Control System
|
||||
|
||||
Interfaces:
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PRESENTATION_CONTROLS_GUIRIBBONIMPL
|
||||
#define VCZH_PRESENTATION_CONTROLS_GUIRIBBONIMPL
|
||||
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace presentation
|
||||
{
|
||||
namespace controls
|
||||
{
|
||||
class GuiBindableRibbonGalleryList;
|
||||
|
||||
/***********************************************************************
|
||||
GalleryItemArranger
|
||||
***********************************************************************/
|
||||
|
||||
namespace ribbon_impl
|
||||
{
|
||||
class GalleryItemArranger : public list::RangedItemArrangerBase, public Description<GalleryItemArranger>
|
||||
{
|
||||
private:
|
||||
vint pim_itemWidth = 0;
|
||||
bool blockScrollUpdate = true;
|
||||
|
||||
protected:
|
||||
GuiBindableRibbonGalleryList* owner;
|
||||
vint itemWidth = 1;
|
||||
vint firstIndex = 0;
|
||||
|
||||
void BeginPlaceItem(bool forMoving, Rect newBounds, vint& newStartIndex)override;
|
||||
void PlaceItem(bool forMoving, vint index, ItemStyleRecord style, Rect viewBounds, Rect& bounds, Margin& alignmentToParent)override;
|
||||
bool IsItemOutOfViewBounds(vint index, ItemStyleRecord style, Rect bounds, Rect viewBounds)override;
|
||||
bool EndPlaceItem(bool forMoving, Rect newBounds, vint newStartIndex)override;
|
||||
void InvalidateItemSizeCache()override;
|
||||
Size OnCalculateTotalSize()override;
|
||||
public:
|
||||
GalleryItemArranger(GuiBindableRibbonGalleryList* _owner);
|
||||
~GalleryItemArranger();
|
||||
|
||||
vint FindItem(vint itemIndex, compositions::KeyDirection key)override;
|
||||
bool EnsureItemVisible(vint itemIndex)override;
|
||||
Size GetAdoptedSize(Size expectedSize)override;
|
||||
|
||||
void ScrollUp();
|
||||
void ScrollDown();
|
||||
void UnblockScrollUpdate();
|
||||
};
|
||||
|
||||
class GalleryResponsiveLayout : public compositions::GuiResponsiveCompositionBase, public Description<GalleryResponsiveLayout>
|
||||
{
|
||||
protected:
|
||||
vint minCount = 0;
|
||||
vint maxCount = 0;
|
||||
Size sizeOffset;
|
||||
vint itemCount = 0;
|
||||
vint itemWidth = 1;
|
||||
|
||||
void UpdateMinSize();
|
||||
public:
|
||||
GalleryResponsiveLayout();
|
||||
~GalleryResponsiveLayout();
|
||||
|
||||
vint GetMinCount();
|
||||
vint GetMaxCount();
|
||||
vint GetItemWidth();
|
||||
Size GetSizeOffset();
|
||||
|
||||
void SetMinCount(vint value);
|
||||
void SetMaxCount(vint value);
|
||||
void SetItemWidth(vint value);
|
||||
void SetSizeOffset(Size value);
|
||||
|
||||
vint GetLevelCount()override;
|
||||
vint GetCurrentLevel()override;
|
||||
bool LevelDown()override;
|
||||
bool LevelUp()override;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\CONTROLS\TOOLSTRIPPACKAGE\GUITOOLSTRIPCOMMAND.H
|
||||
***********************************************************************/
|
||||
@@ -17909,6 +18034,93 @@ Ribbon Toolstrips
|
||||
|
||||
/***********************************************************************
|
||||
Ribbon Gallery
|
||||
***********************************************************************/
|
||||
|
||||
class GuiRibbonGallery : public GuiControl, public Description<GuiRibbonGallery>
|
||||
{
|
||||
using ItemStyle = templates::GuiListItemTemplate;
|
||||
using ItemStyleProperty = TemplateProperty<templates::GuiListItemTemplate>;
|
||||
|
||||
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(RibbonGalleryTemplate, GuiControl)
|
||||
protected:
|
||||
class CommandExecutor : public Object, public IRibbonGalleryCommandExecutor
|
||||
{
|
||||
protected:
|
||||
GuiRibbonGallery* gallery;
|
||||
|
||||
public:
|
||||
CommandExecutor(GuiRibbonGallery* _gallery);
|
||||
~CommandExecutor();
|
||||
|
||||
void NotifyScrollUp()override;
|
||||
void NotifyScrollDown()override;
|
||||
void NotifyDropdown()override;
|
||||
};
|
||||
|
||||
bool scrollUpEnabled = true;
|
||||
bool scrollDownEnabled = true;
|
||||
Ptr<CommandExecutor> commandExecutor;
|
||||
|
||||
public:
|
||||
GuiRibbonGallery(theme::ThemeName themeName);
|
||||
~GuiRibbonGallery();
|
||||
|
||||
compositions::GuiNotifyEvent ScrollUpEnabledChanged;
|
||||
compositions::GuiNotifyEvent ScrollDownEnabledChanged;
|
||||
compositions::GuiNotifyEvent RequestedScrollUp;
|
||||
compositions::GuiNotifyEvent RequestedScrollDown;
|
||||
compositions::GuiNotifyEvent RequestedDropdown;
|
||||
|
||||
bool GetScrollUpEnabled();
|
||||
void SetScrollUpEnabled(bool value);
|
||||
|
||||
bool GetScrollDownEnabled();
|
||||
void SetScrollDownEnabled(bool value);
|
||||
};
|
||||
|
||||
class GuiRibbonToolstripMenu : public GuiToolstripMenu, public Description<GuiRibbonToolstripMenu>
|
||||
{
|
||||
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(RibbonToolstripMenuTemplate, GuiToolstripMenu)
|
||||
protected:
|
||||
compositions::GuiBoundsComposition* contentComposition;
|
||||
|
||||
public:
|
||||
GuiRibbonToolstripMenu(theme::ThemeName themeName, GuiControl* owner);
|
||||
~GuiRibbonToolstripMenu();
|
||||
|
||||
compositions::GuiGraphicsComposition* GetContentComposition();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
.\CONTROLS\TOOLSTRIPPACKAGE\GUIRIBBONGALLERYLIST.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Control System
|
||||
|
||||
Interfaces:
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PRESENTATION_CONTROLS_GUIRIBBONGALLERYLIST
|
||||
#define VCZH_PRESENTATION_CONTROLS_GUIRIBBONGALLERYLIST
|
||||
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace presentation
|
||||
{
|
||||
namespace controls
|
||||
{
|
||||
|
||||
/***********************************************************************
|
||||
Ribbon Gallery List
|
||||
***********************************************************************/
|
||||
|
||||
struct GalleryPos
|
||||
@@ -17941,19 +18153,69 @@ Ribbon Gallery
|
||||
bool operator>=(const GalleryPos& value)const { return Compare(value) >= 0; }
|
||||
};
|
||||
|
||||
class GuiBindableRibbonGalleryBase : public Description<GuiBindableRibbonGalleryBase>
|
||||
namespace list
|
||||
{
|
||||
class GroupedDataSource;
|
||||
|
||||
class GalleryGroup : public Description<GalleryGroup>
|
||||
{
|
||||
friend class GroupedDataSource;
|
||||
using IValueList = reflection::description::IValueList;
|
||||
protected:
|
||||
Ptr<EventHandler> eventHandler;
|
||||
WString name;
|
||||
Ptr<IValueList> itemValues;
|
||||
|
||||
public:
|
||||
GalleryGroup();
|
||||
~GalleryGroup();
|
||||
|
||||
WString GetName();
|
||||
Ptr<IValueList> GetItemValues();
|
||||
};
|
||||
|
||||
class GroupedDataSource : public Description<GroupedDataSource>
|
||||
{
|
||||
using IValueEnumerable = reflection::description::IValueEnumerable;
|
||||
using IValueList = reflection::description::IValueList;
|
||||
using IValueObservableList = reflection::description::IValueObservableList;
|
||||
using GalleryItemList = collections::ObservableList<reflection::description::Value>;
|
||||
using GalleryGroupList = collections::ObservableList<Ptr<GalleryGroup>>;
|
||||
|
||||
protected:
|
||||
compositions::GuiGraphicsComposition* associatedComposition;
|
||||
Ptr<IValueEnumerable> itemSource;
|
||||
ItemProperty<WString> titleProperty;
|
||||
ItemProperty<Ptr<IValueEnumerable>> childrenProperty;
|
||||
|
||||
GalleryItemList joinedItemSource;
|
||||
GalleryGroupList groupedItemSource;
|
||||
collections::List<vint> cachedGroupItemCounts;
|
||||
Ptr<EventHandler> groupChangedHandler;
|
||||
bool ignoreGroupChanged = false;
|
||||
|
||||
void RebuildItemSource();
|
||||
Ptr<IValueList> GetChildren(Ptr<IValueEnumerable> children);
|
||||
void AttachGroupChanged(Ptr<GalleryGroup> group, vint index);
|
||||
void OnGroupChanged(vint start, vint oldCount, vint newCount);
|
||||
void OnGroupItemChanged(vint index, vint start, vint oldCount, vint newCount);
|
||||
vint GetCountBeforeGroup(vint index);
|
||||
void InsertGroupToJoined(vint index);
|
||||
void RemoveGroupFromJoined(vint index);
|
||||
|
||||
public:
|
||||
GuiBindableRibbonGalleryBase();
|
||||
~GuiBindableRibbonGalleryBase();
|
||||
GroupedDataSource(compositions::GuiGraphicsComposition* _associatedComposition);
|
||||
~GroupedDataSource();
|
||||
|
||||
compositions::GuiNotifyEvent GroupEnabledChanged;
|
||||
compositions::GuiNotifyEvent GroupTitlePropertyChanged;
|
||||
compositions::GuiNotifyEvent GroupChildrenPropertyChanged;
|
||||
compositions::GuiNotifyEvent SelectionChanged;
|
||||
|
||||
/// <summary>Get the item source.</summary>
|
||||
/// <returns>The item source.</returns>
|
||||
Ptr<IValueEnumerable> GetItemSource();
|
||||
/// <summary>Set the item source.</summary>
|
||||
/// <param name="value">The item source. Null is acceptable if you want to clear all data.</param>
|
||||
void SetItemSource(Ptr<IValueEnumerable> value);
|
||||
|
||||
bool GetGroupEnabled();
|
||||
@@ -17962,45 +18224,72 @@ Ribbon Gallery
|
||||
ItemProperty<Ptr<IValueEnumerable>> GetGroupChildrenProperty();
|
||||
void SetGroupChildrenProperty(const ItemProperty<Ptr<IValueEnumerable>>& value);
|
||||
|
||||
const GalleryGroupList& GetGroups();
|
||||
};
|
||||
}
|
||||
|
||||
namespace ribbon_impl
|
||||
{
|
||||
class GalleryItemArranger;
|
||||
class GalleryResponsiveLayout;
|
||||
}
|
||||
|
||||
class GuiBindableRibbonGalleryList : public GuiRibbonGallery, public list::GroupedDataSource, public Description<GuiBindableRibbonGalleryList>
|
||||
{
|
||||
friend class ribbon_impl::GalleryItemArranger;
|
||||
|
||||
using IValueEnumerable = reflection::description::IValueEnumerable;
|
||||
using IValueObservableList = reflection::description::IValueObservableList;
|
||||
using ItemStyleProperty = TemplateProperty<templates::GuiListItemTemplate>;
|
||||
|
||||
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(RibbonGalleryListTemplate, GuiRibbonGallery)
|
||||
protected:
|
||||
ItemStyleProperty itemStyle;
|
||||
GuiBindableTextList* itemList;
|
||||
GuiRibbonToolstripMenu* subMenu;
|
||||
|
||||
ribbon_impl::GalleryItemArranger* itemListArranger;
|
||||
ribbon_impl::GalleryResponsiveLayout* layout;
|
||||
GuiScrollContainer* groupContainer;
|
||||
compositions::GuiRepeatStackComposition* groupStack;
|
||||
|
||||
void UpdateLayoutSizeOffset();
|
||||
void OnItemListSelectionChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnBoundsChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnRequestedDropdown(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnRequestedScrollUp(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
void OnRequestedScrollDown(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||
|
||||
void MenuResetGroupTemplate();
|
||||
GuiControl* MenuGetGroupHeader(vint groupIndex);
|
||||
compositions::GuiRepeatFlowComposition* MenuGetGroupFlow(vint groupIndex);
|
||||
GuiSelectableButton* MenuGetGroupItemBackground(vint groupIndex, vint itemIndex);
|
||||
public:
|
||||
GuiBindableRibbonGalleryList(theme::ThemeName themeName);
|
||||
~GuiBindableRibbonGalleryList();
|
||||
|
||||
compositions::GuiNotifyEvent ItemTemplateChanged;
|
||||
compositions::GuiNotifyEvent SelectionChanged;
|
||||
|
||||
/// <summary>Get the item style provider.</summary>
|
||||
/// <returns>The item style provider.</returns>
|
||||
ItemStyleProperty GetItemTemplate();
|
||||
/// <summary>Set the item style provider</summary>
|
||||
/// <param name="value">The new item style provider</param>
|
||||
void SetItemTemplate(ItemStyleProperty value);
|
||||
|
||||
GalleryPos IndexToGalleryPos(vint index);
|
||||
vint GalleryPosToIndex(GalleryPos pos);
|
||||
|
||||
vint GetMinCount();
|
||||
void SetMinCount(vint value);
|
||||
vint GetMaxCount();
|
||||
void SetMaxCount(vint value);
|
||||
|
||||
GalleryPos GetSelection();
|
||||
void SetSelection(GalleryPos value);
|
||||
|
||||
description::Value GetGroupValue(vint groupIndex);
|
||||
description::Value GetItemValue(GalleryPos pos);
|
||||
};
|
||||
|
||||
class GuiBindableRibbonGallery : public GuiControl, public GuiBindableRibbonGalleryBase, public Description<GuiBindableRibbonGallery>
|
||||
{
|
||||
using ItemStyle = templates::GuiListItemTemplate;
|
||||
using ItemStyleProperty = TemplateProperty<templates::GuiListItemTemplate>;
|
||||
public:
|
||||
GuiBindableRibbonGallery(theme::ThemeName themeName);
|
||||
~GuiBindableRibbonGallery();
|
||||
|
||||
compositions::GuiNotifyEvent ItemTemplateChanged;
|
||||
compositions::GuiNotifyEvent PreviewSelectionChanged;
|
||||
|
||||
ItemStyleProperty GetItemTemplate();
|
||||
void SetItemTemplate(const ItemStyleProperty& value);
|
||||
|
||||
GalleryPos GetPreviewSelection();
|
||||
};
|
||||
|
||||
class GuiBindableRibbonGalleryMenu : public GuiToolstripMenu, public GuiBindableRibbonGalleryBase, public Description<GuiBindableRibbonGallery>
|
||||
{
|
||||
using ItemStyle = templates::GuiListItemTemplate;
|
||||
using ItemStyleProperty = TemplateProperty<templates::GuiListItemTemplate>;
|
||||
public:
|
||||
GuiBindableRibbonGalleryMenu(theme::ThemeName themeName, GuiControl* owner);
|
||||
~GuiBindableRibbonGalleryMenu();
|
||||
|
||||
compositions::GuiNotifyEvent ItemTemplateChanged;
|
||||
compositions::GuiNotifyEvent PreviewSelectionChanged;
|
||||
|
||||
ItemStyleProperty GetItemTemplate();
|
||||
void SetItemTemplate(const ItemStyleProperty& value);
|
||||
|
||||
GalleryPos GetPreviewSelection();
|
||||
GuiToolstripMenu* GetSubMenu();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11174,6 +11174,21 @@ GuiCompositionInstanceLoader
|
||||
|
||||
expr = call;
|
||||
}
|
||||
else if (td->CanConvertTo(description::GetTypeDescriptor<GuiControlHost>()))
|
||||
{
|
||||
auto refControl = MakePtr<WfReferenceExpression>();
|
||||
refControl->name.value = variableName.ToString();
|
||||
|
||||
auto refAddControlHostComponent = MakePtr<WfMemberExpression>();
|
||||
refAddControlHostComponent->parent = refControl;
|
||||
refAddControlHostComponent->name.value = L"AddControlHostComponent";
|
||||
|
||||
auto call = MakePtr<WfCallExpression>();
|
||||
call->function = refAddControlHostComponent;
|
||||
call->arguments.Add(value);
|
||||
|
||||
expr = call;
|
||||
}
|
||||
else if (td->CanConvertTo(description::GetTypeDescriptor<IGuiGraphicsElement>()))
|
||||
{
|
||||
auto refComposition = MakePtr<WfReferenceExpression>();
|
||||
@@ -12581,7 +12596,8 @@ GuiPredefinedInstanceLoadersPlugin
|
||||
ADD_TEMPLATE_CONTROL ( GuiRibbonTabPage, CustomControl );
|
||||
ADD_TEMPLATE_CONTROL ( GuiRibbonGroup, RibbonGroup );
|
||||
ADD_TEMPLATE_CONTROL ( GuiRibbonToolstrips, RibbonToolstrips );
|
||||
ADD_TEMPLATE_CONTROL ( GuiBindableRibbonGallery, RibbonGallery );
|
||||
ADD_TEMPLATE_CONTROL ( GuiRibbonGallery, RibbonGallery );
|
||||
ADD_TEMPLATE_CONTROL ( GuiBindableRibbonGalleryList, RibbonGalleryList );
|
||||
|
||||
/* VIRTUAL-CONTROL-TYPE REAL-CONTROL-TYPE THEME-NAME */
|
||||
ADD_VIRTUAL_CONTROL (GroupBox, GuiControl, GroupBox );
|
||||
@@ -13078,15 +13094,22 @@ GuiToolstripButtonInstanceLoader
|
||||
#undef BASE_TYPE
|
||||
|
||||
/***********************************************************************
|
||||
GuiBindableRibbonGalleryMenuInstanceLoader
|
||||
GuiRibbonToolstripMenuInstanceLoader
|
||||
***********************************************************************/
|
||||
|
||||
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiBindableRibbonGalleryMenu>
|
||||
class GuiBindableRibbonGalleryMenuInstanceLoader : public GuiToolstripInstanceLoaderBase<BASE_TYPE>
|
||||
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiRibbonToolstripMenu>
|
||||
class GuiRibbonToolstripMenuInstanceLoader : public GuiToolstripInstanceLoaderBase<BASE_TYPE>
|
||||
{
|
||||
public:
|
||||
GuiBindableRibbonGalleryMenuInstanceLoader()
|
||||
:GuiToolstripInstanceLoaderBase<BASE_TYPE>(description::TypeInfo<GuiBindableRibbonGalleryMenu>::content.typeName, theme::ThemeName::RibbonGalleryMenu)
|
||||
static Ptr<WfExpression> ArgumentFunction(ArgumentMap&)
|
||||
{
|
||||
auto expr = MakePtr<WfLiteralExpression>();
|
||||
expr->value = WfLiteralValue::Null;
|
||||
return expr;
|
||||
}
|
||||
public:
|
||||
GuiRibbonToolstripMenuInstanceLoader()
|
||||
:GuiToolstripInstanceLoaderBase<BASE_TYPE>(description::TypeInfo<GuiRibbonToolstripMenu>::content.typeName, theme::ThemeName::RibbonToolstripMenu, ArgumentFunction)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -13161,7 +13184,7 @@ Initialization
|
||||
manager->SetLoader(new GuiToolstripGroupInstanceLoader);
|
||||
manager->SetLoader(new GuiToolstripButtonInstanceLoader);
|
||||
manager->SetLoader(new GuiRibbonButtonsInstanceLoader);
|
||||
manager->SetLoader(new GuiBindableRibbonGalleryMenuInstanceLoader);
|
||||
manager->SetLoader(new GuiRibbonToolstripMenuInstanceLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+62
-26
@@ -1580,6 +1580,7 @@ Type Declaration
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewSize)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewBounds)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewPosition)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(HorizontalScroll)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(VerticalScroll)
|
||||
CLASS_MEMBER_PROPERTY_FAST(HorizontalAlwaysVisible)
|
||||
@@ -2238,39 +2239,57 @@ Type Declaration
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Groups)
|
||||
END_CLASS_MEMBER(GuiRibbonToolstrips)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiRibbonGallery)
|
||||
CLASS_MEMBER_BASE(GuiControl)
|
||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiRibbonGallery)
|
||||
|
||||
CLASS_MEMBER_GUIEVENT(RequestedScrollUp)
|
||||
CLASS_MEMBER_GUIEVENT(RequestedScrollDown)
|
||||
CLASS_MEMBER_GUIEVENT(RequestedDropdown)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(ScrollUpEnabled)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(ScrollDownEnabled)
|
||||
END_CLASS_MEMBER(GuiRibbonGallery)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiRibbonToolstripMenu)
|
||||
CLASS_MEMBER_BASE(GuiToolstripMenu)
|
||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_2(GuiRibbonToolstripMenu, GuiControl*, owner)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ContentComposition)
|
||||
END_CLASS_MEMBER(GuiRibbonToolstripMenu)
|
||||
|
||||
BEGIN_STRUCT_MEMBER(GalleryPos)
|
||||
STRUCT_MEMBER(group)
|
||||
STRUCT_MEMBER(item)
|
||||
END_STRUCT_MEMBER(GalleryPos)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableRibbonGalleryBase)
|
||||
//CLASS_MEMBER_PROPERTY_FAST(ItemSource)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(GroupEnabled)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(GroupTitleProperty)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(GroupChildrenProperty)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(Selection)
|
||||
//
|
||||
//CLASS_MEMBER_METHOD(GetGroupValue, { L"groupIndex" })
|
||||
//CLASS_MEMBER_METHOD(GetItemValue, { L"pos" })
|
||||
END_CLASS_MEMBER(GuiBindableRibbonGalleryBase)
|
||||
BEGIN_CLASS_MEMBER(GalleryGroup)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Name)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ItemValues)
|
||||
END_CLASS_MEMBER(GalleryGroup)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableRibbonGallery)
|
||||
CLASS_MEMBER_BASE(GuiControl)
|
||||
CLASS_MEMBER_BASE(GuiBindableRibbonGalleryBase)
|
||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiBindableRibbonGallery)
|
||||
BEGIN_CLASS_MEMBER(GroupedDataSource)
|
||||
CLASS_MEMBER_PROPERTY_FAST(ItemSource)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(GroupEnabled)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(GroupTitleProperty)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(GroupChildrenProperty)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Groups)
|
||||
END_CLASS_MEMBER(GroupedDataSource)
|
||||
|
||||
//CLASS_MEMBER_PROPERTY_READONLY_FAST(ItemTemplate)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(PreviewSelection)
|
||||
END_CLASS_MEMBER(GuiBindableRibbonGallery)
|
||||
BEGIN_CLASS_MEMBER(GuiBindableRibbonGalleryList)
|
||||
CLASS_MEMBER_BASE(GuiRibbonGallery)
|
||||
CLASS_MEMBER_BASE(GroupedDataSource)
|
||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiBindableRibbonGalleryList)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiBindableRibbonGalleryMenu)
|
||||
CLASS_MEMBER_BASE(GuiToolstripMenu)
|
||||
CLASS_MEMBER_BASE(GuiBindableRibbonGalleryBase)
|
||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_INHERITANCE_2(GuiBindableRibbonGalleryMenu, GuiControl*, owner)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(ItemTemplate)
|
||||
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(Selection)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(SubMenu)
|
||||
CLASS_MEMBER_PROPERTY_FAST(MinCount)
|
||||
CLASS_MEMBER_PROPERTY_FAST(MaxCount)
|
||||
|
||||
//CLASS_MEMBER_PROPERTY_READONLY_FAST(ItemTemplate)
|
||||
//CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(PreviewSelection)
|
||||
END_CLASS_MEMBER(GuiBindableRibbonGalleryMenu)
|
||||
CLASS_MEMBER_METHOD(IndexToGalleryPos, { L"index" })
|
||||
CLASS_MEMBER_METHOD(GalleryPosToIndex, { L"pos" })
|
||||
END_CLASS_MEMBER(GuiBindableRibbonGalleryList)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiDocumentItem)
|
||||
CLASS_MEMBER_CONSTRUCTOR(Ptr<GuiDocumentItem>(const WString&), { L"name" })
|
||||
@@ -3164,9 +3183,14 @@ namespace vl
|
||||
GUIREFLECTIONELEMENT_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
GUIREFLECTIONCOMPOSITION_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
GUIREFLECTIONEVENT_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
GUIREFLECTIONTEMPLATES_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
GUIREFLECTIONCONTROLS_TYPELIST(IMPL_VL_TYPE_INFO)
|
||||
|
||||
#define GUIREFLECTIONTEMPLATE_IMPL_VL_TYPE_INFO(CLASS, BASE) IMPL_VL_TYPE_INFO(presentation::templates::##CLASS)
|
||||
GUI_CONTROL_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_IMPL_VL_TYPE_INFO)
|
||||
GUI_ITEM_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_IMPL_VL_TYPE_INFO)
|
||||
#undef GUIREFLECTIONTEMPLATE_IMPL_VL_TYPE_INFO
|
||||
|
||||
extern bool LoadGuiBasicTypes();
|
||||
extern bool LoadGuiElementTypes();
|
||||
extern bool LoadGuiCompositionTypes();
|
||||
@@ -3286,6 +3310,13 @@ Type Declaration
|
||||
CLASS_MEMBER_METHOD(NotifyDateSelected, NO_PARAMETER)
|
||||
END_INTERFACE_MEMBER(IDatePickerCommandExecutor)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER_NOPROXY(IRibbonGalleryCommandExecutor)
|
||||
CLASS_MEMBER_BASE(IDescriptable)
|
||||
CLASS_MEMBER_METHOD(NotifyScrollUp, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(NotifyScrollDown, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(NotifyDropdown, NO_PARAMETER)
|
||||
END_INTERFACE_MEMBER(IRibbonGalleryCommandExecutor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiComponent)
|
||||
END_CLASS_MEMBER(GuiComponent)
|
||||
|
||||
@@ -3402,7 +3433,12 @@ Type Loader
|
||||
public:
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
GUIREFLECTIONTEMPLATES_TYPELIST(ADD_TYPE_INFO)
|
||||
GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(ADD_TYPE_INFO)
|
||||
|
||||
#define GUIREFLECTIONTEMPLATE_ADD_TYPE_INFO(CLASS, BASE) ADD_TYPE_INFO(CLASS)
|
||||
GUI_CONTROL_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_ADD_TYPE_INFO)
|
||||
GUI_ITEM_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_ADD_TYPE_INFO)
|
||||
#undef GUIREFLECTIONTEMPLATE_ADD_TYPE_INFO
|
||||
}
|
||||
|
||||
void Unload(ITypeManager* manager)
|
||||
|
||||
+13
-38
@@ -261,7 +261,7 @@ Type List (Events)
|
||||
Type List (Templates)
|
||||
***********************************************************************/
|
||||
|
||||
#define GUIREFLECTIONTEMPLATES_TYPELIST(F)\
|
||||
#define GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(F)\
|
||||
F(presentation::controls::ButtonState)\
|
||||
F(presentation::controls::ColumnSortingState)\
|
||||
F(presentation::templates::BoolOption)\
|
||||
@@ -270,46 +270,14 @@ Type List (Templates)
|
||||
F(presentation::controls::IScrollCommandExecutor)\
|
||||
F(presentation::controls::ITabCommandExecutor)\
|
||||
F(presentation::controls::IDatePickerCommandExecutor)\
|
||||
F(presentation::controls::IRibbonGalleryCommandExecutor)\
|
||||
F(presentation::controls::GuiComponent)\
|
||||
F(presentation::controls::IGuiAnimation)\
|
||||
F(presentation::controls::IGuiAnimationCoroutine::IImpl)\
|
||||
F(presentation::controls::IGuiAnimationCoroutine)\
|
||||
F(presentation::controls::GuiInstanceRootObject)\
|
||||
F(presentation::templates::GuiTemplate)\
|
||||
F(presentation::templates::GuiControlTemplate)\
|
||||
F(presentation::templates::GuiLabelTemplate)\
|
||||
F(presentation::templates::GuiSinglelineTextBoxTemplate)\
|
||||
F(presentation::templates::GuiDocumentLabelTemplate)\
|
||||
F(presentation::templates::GuiMultilineTextBoxTemplate)\
|
||||
F(presentation::templates::GuiDocumentViewerTemplate)\
|
||||
F(presentation::templates::GuiMenuTemplate)\
|
||||
F(presentation::templates::GuiWindowTemplate)\
|
||||
F(presentation::templates::GuiButtonTemplate)\
|
||||
F(presentation::templates::GuiSelectableButtonTemplate)\
|
||||
F(presentation::templates::GuiToolstripButtonTemplate)\
|
||||
F(presentation::templates::GuiListViewColumnHeaderTemplate)\
|
||||
F(presentation::templates::GuiComboBoxTemplate)\
|
||||
F(presentation::templates::GuiScrollTemplate)\
|
||||
F(presentation::templates::GuiScrollViewTemplate)\
|
||||
F(presentation::templates::GuiListControlTemplate)\
|
||||
F(presentation::templates::GuiTextListTemplate)\
|
||||
F(presentation::templates::GuiListViewTemplate)\
|
||||
F(presentation::templates::GuiTreeViewTemplate)\
|
||||
F(presentation::templates::GuiTabTemplate)\
|
||||
F(presentation::templates::GuiDatePickerTemplate)\
|
||||
F(presentation::templates::GuiDateComboBoxTemplate)\
|
||||
F(presentation::templates::GuiRibbonTabTemplate)\
|
||||
F(presentation::templates::GuiRibbonGroupTemplate)\
|
||||
F(presentation::templates::GuiRibbonButtonsTemplate)\
|
||||
F(presentation::templates::GuiRibbonToolstripsTemplate)\
|
||||
F(presentation::templates::GuiRibbonGalleryTemplate)\
|
||||
F(presentation::templates::GuiRibbonGalleryMenuTemplate)\
|
||||
F(presentation::templates::GuiListItemTemplate)\
|
||||
F(presentation::templates::GuiTextListItemTemplate)\
|
||||
F(presentation::templates::GuiTreeItemTemplate)\
|
||||
F(presentation::templates::GuiGridCellTemplate)\
|
||||
F(presentation::templates::GuiGridVisualizerTemplate)\
|
||||
F(presentation::templates::GuiGridEditorTemplate)\
|
||||
F(presentation::templates::GuiCommonDatePickerLook)\
|
||||
F(presentation::templates::GuiCommonScrollViewLook)\
|
||||
F(presentation::templates::GuiCommonScrollBehavior)\
|
||||
@@ -407,10 +375,12 @@ Type List (Controls)
|
||||
F(presentation::controls::RibbonButtonSize)\
|
||||
F(presentation::controls::GuiRibbonButtons)\
|
||||
F(presentation::controls::GuiRibbonToolstrips)\
|
||||
F(presentation::controls::GuiRibbonGallery)\
|
||||
F(presentation::controls::GuiRibbonToolstripMenu)\
|
||||
F(presentation::controls::GalleryPos)\
|
||||
F(presentation::controls::GuiBindableRibbonGalleryBase)\
|
||||
F(presentation::controls::GuiBindableRibbonGallery)\
|
||||
F(presentation::controls::GuiBindableRibbonGalleryMenu)\
|
||||
F(presentation::controls::list::GalleryGroup)\
|
||||
F(presentation::controls::list::GroupedDataSource)\
|
||||
F(presentation::controls::GuiBindableRibbonGalleryList)\
|
||||
F(presentation::controls::GuiDocumentItem)\
|
||||
F(presentation::controls::GuiDocumentCommonInterface)\
|
||||
F(presentation::controls::GuiDocumentCommonInterface::EditMode)\
|
||||
@@ -462,9 +432,14 @@ Type List
|
||||
GUIREFLECTIONELEMENT_TYPELIST(DECL_TYPE_INFO)
|
||||
GUIREFLECTIONCOMPOSITION_TYPELIST(DECL_TYPE_INFO)
|
||||
GUIREFLECTIONEVENT_TYPELIST(DECL_TYPE_INFO)
|
||||
GUIREFLECTIONTEMPLATES_TYPELIST(DECL_TYPE_INFO)
|
||||
GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(DECL_TYPE_INFO)
|
||||
GUIREFLECTIONCONTROLS_TYPELIST(DECL_TYPE_INFO)
|
||||
|
||||
#define GUIREFLECTIONTEMPLATE_DECL_TYPE_INFO(CLASS, BASE) DECL_TYPE_INFO(presentation::templates::##CLASS)
|
||||
GUI_CONTROL_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_DECL_TYPE_INFO)
|
||||
GUI_ITEM_TEMPLATE_DECL(GUIREFLECTIONTEMPLATE_DECL_TYPE_INFO)
|
||||
#undef GUIREFLECTIONTEMPLATE_DECL_TYPE_INFO
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
|
||||
|
||||
+120
-141
@@ -1806,37 +1806,32 @@ GuiSolidLabelElementRenderer
|
||||
|
||||
void GuiSolidLabelElementRenderer::CreateTextLayout()
|
||||
{
|
||||
if(textFormat)
|
||||
if (textFormat)
|
||||
{
|
||||
HRESULT hr=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory()->CreateTextLayout(
|
||||
HRESULT hr = GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory()->CreateTextLayout(
|
||||
oldText.Buffer(),
|
||||
(int)oldText.Length(),
|
||||
textFormat->textFormat.Obj(),
|
||||
0,
|
||||
0,
|
||||
&textLayout);
|
||||
if(!FAILED(hr))
|
||||
{
|
||||
if(oldFont.underline)
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
|
||||
if (oldFont.underline)
|
||||
{
|
||||
DWRITE_TEXT_RANGE textRange;
|
||||
textRange.startPosition=0;
|
||||
textRange.length=(int)oldText.Length();
|
||||
textRange.startPosition = 0;
|
||||
textRange.length = (int)oldText.Length();
|
||||
textLayout->SetUnderline(TRUE, textRange);
|
||||
}
|
||||
if(oldFont.strikeline)
|
||||
if (oldFont.strikeline)
|
||||
{
|
||||
DWRITE_TEXT_RANGE textRange;
|
||||
textRange.startPosition=0;
|
||||
textRange.length=(int)oldText.Length();
|
||||
textRange.startPosition = 0;
|
||||
textRange.length = (int)oldText.Length();
|
||||
textLayout->SetStrikethrough(TRUE, textRange);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
textLayout=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiSolidLabelElementRenderer::DestroyTextLayout()
|
||||
@@ -1978,7 +1973,10 @@ GuiSolidLabelElementRenderer
|
||||
IDWriteFactory* dwriteFactory=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||
DWRITE_TRIMMING trimming;
|
||||
IDWriteInlineObject* inlineObject;
|
||||
textLayout->GetTrimming(&trimming, &inlineObject);
|
||||
{
|
||||
HRESULT hr = textLayout->GetTrimming(&trimming, &inlineObject);
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
}
|
||||
|
||||
textLayout->SetWordWrapping(element->GetWrapLine()?DWRITE_WORD_WRAPPING_WRAP:DWRITE_WORD_WRAPPING_NO_WRAP);
|
||||
if(element->GetEllipse())
|
||||
@@ -2210,21 +2208,20 @@ GuiPolygonElementRenderer
|
||||
void GuiPolygonElementRenderer::CreateGeometry()
|
||||
{
|
||||
oldPoints.Resize(element->GetPointCount());
|
||||
if(oldPoints.Count()>0)
|
||||
if (oldPoints.Count() > 0)
|
||||
{
|
||||
memcpy(&oldPoints[0], &element->GetPoint(0), sizeof(Point)*element->GetPointCount());
|
||||
}
|
||||
if(oldPoints.Count()>=3)
|
||||
if (oldPoints.Count() >= 3)
|
||||
{
|
||||
ID2D1PathGeometry* pg=0;
|
||||
GetWindowsDirect2DObjectProvider()->GetDirect2DFactory()->CreatePathGeometry(&pg);
|
||||
if(pg)
|
||||
{
|
||||
geometry=pg;
|
||||
ID2D1PathGeometry* pg = 0;
|
||||
HRESULT hr = GetWindowsDirect2DObjectProvider()->GetDirect2DFactory()->CreatePathGeometry(&pg);
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
|
||||
geometry = pg;
|
||||
FillGeometry(Point(0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiPolygonElementRenderer::DestroyGeometry()
|
||||
{
|
||||
@@ -2236,20 +2233,20 @@ GuiPolygonElementRenderer
|
||||
|
||||
void GuiPolygonElementRenderer::FillGeometry(Point offset)
|
||||
{
|
||||
if(geometry)
|
||||
{
|
||||
ID2D1GeometrySink* pgs=0;
|
||||
geometry->Open(&pgs);
|
||||
if(pgs)
|
||||
if (geometry)
|
||||
{
|
||||
ID2D1GeometrySink* pgs = 0;
|
||||
HRESULT hr = geometry->Open(&pgs);
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
|
||||
D2D1_POINT_2F p;
|
||||
p.x=(FLOAT)(oldPoints[0].x+offset.x)+0.5f;
|
||||
p.y=(FLOAT)(oldPoints[0].y+offset.y)+0.5f;
|
||||
p.x = (FLOAT)(oldPoints[0].x + offset.x) + 0.5f;
|
||||
p.y = (FLOAT)(oldPoints[0].y + offset.y) + 0.5f;
|
||||
pgs->BeginFigure(p, D2D1_FIGURE_BEGIN_FILLED);
|
||||
for(vint i=1;i<oldPoints.Count();i++)
|
||||
for (vint i = 1; i < oldPoints.Count(); i++)
|
||||
{
|
||||
p.x=(FLOAT)(oldPoints[i].x+offset.x)+0.5f;
|
||||
p.y=(FLOAT)(oldPoints[i].y+offset.y)+0.5f;
|
||||
p.x = (FLOAT)(oldPoints[i].x + offset.x) + 0.5f;
|
||||
p.y = (FLOAT)(oldPoints[i].y + offset.y) + 0.5f;
|
||||
pgs->AddLine(p);
|
||||
}
|
||||
pgs->EndFigure(D2D1_FIGURE_END_CLOSED);
|
||||
@@ -2257,7 +2254,6 @@ GuiPolygonElementRenderer
|
||||
pgs->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiPolygonElementRenderer::RecreateResource(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget)
|
||||
{
|
||||
@@ -3724,23 +3720,17 @@ CachedResourceAllocator
|
||||
|
||||
void SetRenderTarget(IWindowsDirect2DRenderTarget* _guiRenderTarget)
|
||||
{
|
||||
guiRenderTarget=_guiRenderTarget;
|
||||
guiRenderTarget = _guiRenderTarget;
|
||||
}
|
||||
|
||||
ComPtr<ID2D1SolidColorBrush> CreateInternal(Color color)
|
||||
{
|
||||
ID2D1SolidColorBrush* brush=0;
|
||||
ID2D1RenderTarget* renderTarget=guiRenderTarget->GetDirect2DRenderTarget();
|
||||
HRESULT hr=renderTarget->CreateSolidColorBrush(GetD2DColor(color), &brush);
|
||||
if(!FAILED(hr))
|
||||
{
|
||||
ID2D1SolidColorBrush* brush = 0;
|
||||
auto renderTarget = guiRenderTarget->GetDirect2DRenderTarget();
|
||||
HRESULT hr = renderTarget->CreateSolidColorBrush(GetD2DColor(color), &brush);
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
return brush;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class CachedLinearBrushAllocator
|
||||
@@ -3757,38 +3747,38 @@ CachedResourceAllocator
|
||||
|
||||
void SetRenderTarget(IWindowsDirect2DRenderTarget* _guiRenderTarget)
|
||||
{
|
||||
guiRenderTarget=_guiRenderTarget;
|
||||
guiRenderTarget = _guiRenderTarget;
|
||||
}
|
||||
|
||||
ComPtr<ID2D1LinearGradientBrush> CreateInternal(ColorPair colors)
|
||||
{
|
||||
ID2D1RenderTarget* renderTarget=guiRenderTarget->GetDirect2DRenderTarget();
|
||||
ID2D1GradientStopCollection* stopCollection=0;
|
||||
ID2D1RenderTarget* renderTarget = guiRenderTarget->GetDirect2DRenderTarget();
|
||||
ID2D1GradientStopCollection* stopCollection = 0;
|
||||
{
|
||||
D2D1_GRADIENT_STOP stops[2];
|
||||
stops[0].color=GetD2DColor(colors.key);
|
||||
stops[0].position=0.0f;
|
||||
stops[1].color=GetD2DColor(colors.value);
|
||||
stops[1].position=1.0f;
|
||||
stops[0].color = GetD2DColor(colors.key);
|
||||
stops[0].position = 0.0f;
|
||||
stops[1].color = GetD2DColor(colors.value);
|
||||
stops[1].position = 1.0f;
|
||||
|
||||
HRESULT hr=renderTarget->CreateGradientStopCollection(
|
||||
HRESULT hr = renderTarget->CreateGradientStopCollection(
|
||||
stops,
|
||||
2,
|
||||
D2D1_GAMMA_2_2,
|
||||
D2D1_EXTEND_MODE_CLAMP,
|
||||
&stopCollection);
|
||||
if(FAILED(hr)) return 0;
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
}
|
||||
|
||||
ID2D1LinearGradientBrush* brush=0;
|
||||
ID2D1LinearGradientBrush* brush = 0;
|
||||
{
|
||||
D2D1_POINT_2F points[2]={{0, 0}, {0, 0}};
|
||||
HRESULT hr=renderTarget->CreateLinearGradientBrush(
|
||||
D2D1_POINT_2F points[2] = { {0, 0}, {0, 0} };
|
||||
HRESULT hr = renderTarget->CreateLinearGradientBrush(
|
||||
D2D1::LinearGradientBrushProperties(points[0], points[1]),
|
||||
stopCollection,
|
||||
&brush);
|
||||
stopCollection->Release();
|
||||
if(FAILED(hr)) return 0;
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
}
|
||||
return brush;
|
||||
}
|
||||
@@ -3808,38 +3798,38 @@ CachedResourceAllocator
|
||||
|
||||
void SetRenderTarget(IWindowsDirect2DRenderTarget* _guiRenderTarget)
|
||||
{
|
||||
guiRenderTarget=_guiRenderTarget;
|
||||
guiRenderTarget = _guiRenderTarget;
|
||||
}
|
||||
|
||||
ComPtr<ID2D1RadialGradientBrush> CreateInternal(ColorPair colors)
|
||||
{
|
||||
ID2D1RenderTarget* renderTarget=guiRenderTarget->GetDirect2DRenderTarget();
|
||||
ID2D1GradientStopCollection* stopCollection=0;
|
||||
ID2D1RenderTarget* renderTarget = guiRenderTarget->GetDirect2DRenderTarget();
|
||||
ID2D1GradientStopCollection* stopCollection = 0;
|
||||
{
|
||||
D2D1_GRADIENT_STOP stops[2];
|
||||
stops[0].color=GetD2DColor(colors.key);
|
||||
stops[0].position=0.0f;
|
||||
stops[1].color=GetD2DColor(colors.value);
|
||||
stops[1].position=1.0f;
|
||||
stops[0].color = GetD2DColor(colors.key);
|
||||
stops[0].position = 0.0f;
|
||||
stops[1].color = GetD2DColor(colors.value);
|
||||
stops[1].position = 1.0f;
|
||||
|
||||
HRESULT hr=renderTarget->CreateGradientStopCollection(
|
||||
HRESULT hr = renderTarget->CreateGradientStopCollection(
|
||||
stops,
|
||||
2,
|
||||
D2D1_GAMMA_2_2,
|
||||
D2D1_EXTEND_MODE_CLAMP,
|
||||
&stopCollection);
|
||||
if(FAILED(hr)) return 0;
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
}
|
||||
|
||||
ID2D1RadialGradientBrush* brush=0;
|
||||
ID2D1RadialGradientBrush* brush = 0;
|
||||
{
|
||||
D2D1_POINT_2F points[2]={{0, 0}, {0, 0}};
|
||||
HRESULT hr=renderTarget->CreateRadialGradientBrush(
|
||||
D2D1_POINT_2F points[2] = { {0, 0}, {0, 0} };
|
||||
HRESULT hr = renderTarget->CreateRadialGradientBrush(
|
||||
D2D1::RadialGradientBrushProperties(points[0], points[1], 1, 1),
|
||||
stopCollection,
|
||||
&brush);
|
||||
stopCollection->Release();
|
||||
if(FAILED(hr)) return 0;
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
}
|
||||
return brush;
|
||||
}
|
||||
@@ -3853,39 +3843,33 @@ CachedResourceAllocator
|
||||
|
||||
static ComPtr<IDWriteTextFormat> CreateDirect2DFont(const FontProperties& fontProperties)
|
||||
{
|
||||
IDWriteFactory* dwriteFactory=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||
IDWriteTextFormat* format=0;
|
||||
HRESULT hr=dwriteFactory->CreateTextFormat(
|
||||
IDWriteFactory* dwriteFactory = GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||
IDWriteTextFormat* format = 0;
|
||||
HRESULT hr = dwriteFactory->CreateTextFormat(
|
||||
fontProperties.fontFamily.Buffer(),
|
||||
NULL,
|
||||
(fontProperties.bold?DWRITE_FONT_WEIGHT_BOLD:DWRITE_FONT_WEIGHT_NORMAL),
|
||||
(fontProperties.italic?DWRITE_FONT_STYLE_ITALIC:DWRITE_FONT_STYLE_NORMAL),
|
||||
(fontProperties.bold ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_NORMAL),
|
||||
(fontProperties.italic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL),
|
||||
DWRITE_FONT_STRETCH_NORMAL,
|
||||
(FLOAT)fontProperties.size,
|
||||
L"",
|
||||
&format);
|
||||
if(!FAILED(hr))
|
||||
{
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
format->SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP);
|
||||
return format;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<Direct2DTextFormatPackage> CreateInternal(const FontProperties& fontProperties)
|
||||
{
|
||||
Ptr<Direct2DTextFormatPackage> textFormat=new Direct2DTextFormatPackage;
|
||||
textFormat->textFormat=CreateDirect2DFont(fontProperties);
|
||||
textFormat->trimming.granularity=DWRITE_TRIMMING_GRANULARITY_CHARACTER;
|
||||
textFormat->trimming.delimiter=0;
|
||||
textFormat->trimming.delimiterCount=0;
|
||||
Ptr<Direct2DTextFormatPackage> textFormat = new Direct2DTextFormatPackage;
|
||||
textFormat->textFormat = CreateDirect2DFont(fontProperties);
|
||||
textFormat->trimming.granularity = DWRITE_TRIMMING_GRANULARITY_CHARACTER;
|
||||
textFormat->trimming.delimiter = 0;
|
||||
textFormat->trimming.delimiterCount = 0;
|
||||
|
||||
IDWriteInlineObject* ellipseInlineObject=0;
|
||||
IDWriteInlineObject* ellipseInlineObject = 0;
|
||||
GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory()->CreateEllipsisTrimmingSign(textFormat->textFormat.Obj(), &ellipseInlineObject);
|
||||
textFormat->ellipseInlineObject=ellipseInlineObject;
|
||||
textFormat->ellipseInlineObject = ellipseInlineObject;
|
||||
return textFormat;
|
||||
}
|
||||
};
|
||||
@@ -3904,24 +3888,23 @@ CachedResourceAllocator
|
||||
Size MeasureInternal(wchar_t character, IGuiGraphicsRenderTarget* renderTarget)
|
||||
{
|
||||
Size charSize(0, 0);
|
||||
IDWriteTextLayout* textLayout=0;
|
||||
HRESULT hr=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory()->CreateTextLayout(
|
||||
IDWriteTextLayout* textLayout = 0;
|
||||
HRESULT hr = GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory()->CreateTextLayout(
|
||||
&character,
|
||||
1,
|
||||
font.Obj(),
|
||||
0,
|
||||
0,
|
||||
&textLayout);
|
||||
if(!FAILED(hr))
|
||||
{
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
|
||||
DWRITE_TEXT_METRICS metrics;
|
||||
hr=textLayout->GetMetrics(&metrics);
|
||||
if(!FAILED(hr))
|
||||
hr = textLayout->GetMetrics(&metrics);
|
||||
if (!FAILED(hr))
|
||||
{
|
||||
charSize=Size((vint)ceil(metrics.widthIncludingTrailingWhitespace), (vint)ceil(metrics.height));
|
||||
charSize = Size((vint)ceil(metrics.widthIncludingTrailingWhitespace), (vint)ceil(metrics.height));
|
||||
}
|
||||
textLayout->Release();
|
||||
}
|
||||
return charSize;
|
||||
}
|
||||
|
||||
@@ -3972,16 +3955,14 @@ WindowsDirect2DRenderTarget
|
||||
|
||||
void OnAttach(INativeImageFrame* frame)override
|
||||
{
|
||||
cachedFrame=frame;
|
||||
ID2D1Bitmap* d2dBitmap=0;
|
||||
HRESULT hr=renderTarget->GetDirect2DRenderTarget()->CreateBitmapFromWicBitmap(
|
||||
cachedFrame = frame;
|
||||
ID2D1Bitmap* d2dBitmap = 0;
|
||||
HRESULT hr = renderTarget->GetDirect2DRenderTarget()->CreateBitmapFromWicBitmap(
|
||||
GetWindowsDirect2DObjectProvider()->GetWICBitmap(frame),
|
||||
&d2dBitmap
|
||||
);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
bitmap=d2dBitmap;
|
||||
}
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
bitmap = d2dBitmap;
|
||||
}
|
||||
|
||||
void OnDetach(INativeImageFrame* frame)override
|
||||
@@ -4002,47 +3983,45 @@ WindowsDirect2DRenderTarget
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!disabledBitmap)
|
||||
if (!disabledBitmap)
|
||||
{
|
||||
IWICBitmap* frameBitmap=GetWindowsDirect2DObjectProvider()->GetWICBitmap(cachedFrame);
|
||||
ID2D1Bitmap* d2dBitmap=0;
|
||||
HRESULT hr=renderTarget->GetDirect2DRenderTarget()->CreateBitmapFromWicBitmap(
|
||||
IWICBitmap* frameBitmap = GetWindowsDirect2DObjectProvider()->GetWICBitmap(cachedFrame);
|
||||
ID2D1Bitmap* d2dBitmap = 0;
|
||||
HRESULT hr = renderTarget->GetDirect2DRenderTarget()->CreateBitmapFromWicBitmap(
|
||||
frameBitmap,
|
||||
&d2dBitmap
|
||||
);
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
disabledBitmap=d2dBitmap;
|
||||
CHECK_ERROR(SUCCEEDED(hr), L"You should check HRESULT to see why it failed.");
|
||||
|
||||
disabledBitmap = d2dBitmap;
|
||||
WICRect rect;
|
||||
rect.X=0;
|
||||
rect.Y=0;
|
||||
rect.Width=bitmap->GetPixelSize().width;
|
||||
rect.Height=bitmap->GetPixelSize().height;
|
||||
BYTE* buffer=new BYTE[rect.Width*rect.Height*4];
|
||||
hr=frameBitmap->CopyPixels(&rect, rect.Width*4, rect.Width*rect.Height*4, buffer);
|
||||
if(SUCCEEDED(hr))
|
||||
rect.X = 0;
|
||||
rect.Y = 0;
|
||||
rect.Width = bitmap->GetPixelSize().width;
|
||||
rect.Height = bitmap->GetPixelSize().height;
|
||||
BYTE* buffer = new BYTE[rect.Width*rect.Height * 4];
|
||||
hr = frameBitmap->CopyPixels(&rect, rect.Width * 4, rect.Width*rect.Height * 4, buffer);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
vint count=rect.Width*rect.Height;
|
||||
BYTE* read=buffer;
|
||||
for(vint i=0;i<count;i++)
|
||||
vint count = rect.Width*rect.Height;
|
||||
BYTE* read = buffer;
|
||||
for (vint i = 0; i < count; i++)
|
||||
{
|
||||
BYTE g=(read[0]+read[1]+read[2])/6+read[3]/2;
|
||||
read[0]=g;
|
||||
read[1]=g;
|
||||
read[2]=g;
|
||||
read+=4;
|
||||
BYTE g = (read[0] + read[1] + read[2]) / 6 + read[3] / 2;
|
||||
read[0] = g;
|
||||
read[1] = g;
|
||||
read[2] = g;
|
||||
read += 4;
|
||||
}
|
||||
D2D1_RECT_U d2dRect;
|
||||
d2dRect.left=0;
|
||||
d2dRect.top=0;
|
||||
d2dRect.right=rect.Width;
|
||||
d2dRect.bottom=rect.Height;
|
||||
d2dBitmap->CopyFromMemory(&d2dRect, buffer, rect.Width*4);
|
||||
d2dRect.left = 0;
|
||||
d2dRect.top = 0;
|
||||
d2dRect.right = rect.Width;
|
||||
d2dRect.bottom = rect.Height;
|
||||
d2dBitmap->CopyFromMemory(&d2dRect, buffer, rect.Width * 4);
|
||||
}
|
||||
delete[] buffer;
|
||||
}
|
||||
}
|
||||
return disabledBitmap;
|
||||
}
|
||||
}
|
||||
@@ -4097,14 +4076,14 @@ WindowsDirect2DRenderTarget
|
||||
linearBrushes.SetRenderTarget(this);
|
||||
radialBrushes.SetRenderTarget(this);
|
||||
|
||||
IDWriteFactory* dwriteFactory=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||
IDWriteRenderingParams* defaultParams=0;
|
||||
HRESULT hr=dwriteFactory->CreateRenderingParams(&defaultParams);
|
||||
if(!FAILED(hr))
|
||||
IDWriteFactory* dwriteFactory = GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||
IDWriteRenderingParams* defaultParams = 0;
|
||||
HRESULT hr = dwriteFactory->CreateRenderingParams(&defaultParams);
|
||||
if (!FAILED(hr))
|
||||
{
|
||||
noAntialiasParams=CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL, defaultParams, dwriteFactory);
|
||||
horizontalAntialiasParams=CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL, defaultParams, dwriteFactory);
|
||||
bidirectionalAntialiasParams=CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC, defaultParams, dwriteFactory);
|
||||
noAntialiasParams = CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL, defaultParams, dwriteFactory);
|
||||
horizontalAntialiasParams = CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL, defaultParams, dwriteFactory);
|
||||
bidirectionalAntialiasParams = CreateRenderingParams(DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC, defaultParams, dwriteFactory);
|
||||
defaultParams->Release();
|
||||
}
|
||||
}
|
||||
|
||||
+10118
-8687
File diff suppressed because one or more lines are too long
+3881
-3278
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,12 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RadioButtonTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonButtonsTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonButtonsTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryDropdownButtonTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryItemListTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGalleryTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGroupTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonGroupTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonLargeButtonTemplate)
|
||||
@@ -109,6 +115,10 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonSmallSplitButtonTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonSplitArrowTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonSplitArrowTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripHeaderTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripMenuTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripsTemplate)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RibbonToolstripsTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(darkskin::RightScrollButtonTemplate)
|
||||
@@ -655,6 +665,64 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonButtonsTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryDropdownButtonTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiButtonTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::darkskin::RibbonGalleryDropdownButtonTemplate*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryDropdownButtonTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::darkskin::RibbonGalleryDropdownButtonTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_darkskin_RibbonGalleryDropdownButtonTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryItemListTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::darkskin::RibbonGalleryItemListTemplate*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryItemListTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::darkskin::RibbonGalleryItemListTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_darkskin_RibbonGalleryItemListTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiRibbonGalleryListTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonGalleryTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::darkskin::RibbonGalleryTemplate*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGalleryTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::darkskin::RibbonGalleryTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_darkskin_RibbonGalleryTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
CLASS_MEMBER_FIELD(container)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonGalleryTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonGroupTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiRibbonGroupTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonGroupTemplateConstructor)
|
||||
@@ -847,6 +915,47 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonSplitArrowTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonToolstripHeaderTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiControlTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::darkskin::RibbonToolstripHeaderTemplate*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonToolstripHeaderTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::darkskin::RibbonToolstripHeaderTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_darkskin_RibbonToolstripHeaderTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonToolstripMenuTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiRibbonToolstripMenuTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::darkskin::RibbonToolstripMenuTemplate*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonToolstripMenuTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::darkskin::RibbonToolstripMenuTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_darkskin_RibbonToolstripMenuTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
CLASS_MEMBER_FIELD(container)
|
||||
CLASS_MEMBER_FIELD(content)
|
||||
END_CLASS_MEMBER(::darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::darkskin::RibbonToolstripsTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiRibbonToolstripsTemplate)
|
||||
CLASS_MEMBER_BASE(::darkskin::RibbonToolstripsTemplateConstructor)
|
||||
@@ -1375,6 +1484,12 @@ namespace vl
|
||||
ADD_TYPE_INFO(::darkskin::RadioButtonTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonButtonsTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonButtonsTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryDropdownButtonTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryItemListTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGalleryTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGroupTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonGroupTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonLargeButtonTemplate)
|
||||
@@ -1391,6 +1506,10 @@ namespace vl
|
||||
ADD_TYPE_INFO(::darkskin::RibbonSmallSplitButtonTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonSplitArrowTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonSplitArrowTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripHeaderTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripMenuTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripsTemplate)
|
||||
ADD_TYPE_INFO(::darkskin::RibbonToolstripsTemplateConstructor)
|
||||
ADD_TYPE_INFO(::darkskin::RightScrollButtonTemplate)
|
||||
|
||||
@@ -102,6 +102,12 @@ namespace vl
|
||||
DECL_TYPE_INFO(::darkskin::RadioButtonTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonButtonsTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonButtonsTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryDropdownButtonTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryDropdownButtonTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryItemListTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryItemListTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGalleryTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGroupTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonGroupTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonLargeButtonTemplate)
|
||||
@@ -118,6 +124,10 @@ namespace vl
|
||||
DECL_TYPE_INFO(::darkskin::RibbonSmallSplitButtonTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonSplitArrowTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonSplitArrowTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripHeaderTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripHeaderTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripMenuTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripMenuTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripsTemplate)
|
||||
DECL_TYPE_INFO(::darkskin::RibbonToolstripsTemplateConstructor)
|
||||
DECL_TYPE_INFO(::darkskin::RightScrollButtonTemplate)
|
||||
|
||||
@@ -6736,8 +6736,10 @@ Bootstrap
|
||||
.\PARSING\PARSINGSTATE.CPP
|
||||
***********************************************************************/
|
||||
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
|
||||
namespace vl
|
||||
{
|
||||
@@ -7851,7 +7853,9 @@ ParsingTransitionCollector
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@@ -8154,8 +8158,10 @@ ParsingTable::TransitionItem
|
||||
ParsingTable
|
||||
***********************************************************************/
|
||||
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wnull-dereference"
|
||||
#endif
|
||||
|
||||
ParsingTable::ParsingTable(vint _attributeInfoCount, vint _treeTypeInfoCount, vint _treeFieldInfoCount, vint _tokenCount, vint discardTokenCount, vint _stateCount, vint _ruleCount)
|
||||
:ambiguity(false)
|
||||
@@ -8391,7 +8397,9 @@ ParsingTable
|
||||
return regexTokenIndex>=tokenCount-UserTokenStart?regexTokenIndex-(tokenCount-UserTokenStart):-1;
|
||||
}
|
||||
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9303,8 +9311,10 @@ DescriptableObject
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wexceptions"
|
||||
#endif
|
||||
DescriptableObject::~DescriptableObject()
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
@@ -9336,7 +9346,9 @@ DescriptableObject
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(VCZH_GCC) && defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -520,6 +520,42 @@
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Script name="RibbonScript">
|
||||
<Workflow>
|
||||
<![CDATA[
|
||||
module ribbonscript;
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class StyleItem
|
||||
{
|
||||
new(value : string)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
prop Value : string = 0 {not observe}
|
||||
}
|
||||
|
||||
class StyleGroup
|
||||
{
|
||||
prop Name : string = "" {}
|
||||
prop Items : observe StyleItem^[] = {} {const, not observe}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</Workflow>
|
||||
</Script>
|
||||
|
||||
<Instance name="StyleItemTemplateResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::StyleItemTemplate">
|
||||
<ref.Parameter Name="ViewModel" Class="demo::StyleItem"/>
|
||||
<TextListItemTemplate MinSizeLimitation="LimitToElementAndChildren" PreferredMinSize="x:64">
|
||||
<SolidLabel Text-bind="ViewModel.Value" Color="#FF8000" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</TextListItemTemplate>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="DocumentRibbonTabPageResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentRibbonTabPage" xmlns:demo="demo::*">
|
||||
<ref.Members>
|
||||
@@ -530,6 +566,26 @@
|
||||
prop AlignCenterSelected : bool = true {}
|
||||
@cpp:Private
|
||||
prop AlignRightSelected : bool = true {}
|
||||
|
||||
@cpp:Private
|
||||
func GetStyleGroups(): demo::StyleGroup^[]
|
||||
{
|
||||
var group1 = new StyleGroup^();
|
||||
group1.Name = "Group A";
|
||||
for (i in range [1, 5])
|
||||
{
|
||||
group1.Items.Add(new StyleItem^("A" & i));
|
||||
}
|
||||
|
||||
var group2 = new StyleGroup^();
|
||||
group2.Name = "Group B";
|
||||
for (i in range [1, 5])
|
||||
{
|
||||
group2.Items.Add(new StyleItem^("B" & i));
|
||||
}
|
||||
|
||||
return {group1 group2};
|
||||
}
|
||||
]]>
|
||||
</ref.Members>
|
||||
<demo:DocumentTabPageBase ref.Name="self" Text="Document Editor (Ribbon)">
|
||||
@@ -540,12 +596,26 @@
|
||||
<att.MenuContainer-set>
|
||||
<RibbonTab>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
|
||||
<att.BeforeHeaders-set>
|
||||
<Button Text="HOME">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:80"/>
|
||||
</Button>
|
||||
</att.BeforeHeaders-set>
|
||||
|
||||
<att.AfterHeaders-set>
|
||||
<Stack Direction="Horizontal" AlignmentToParent="left:0 top:-1 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<StackItem InternalMargin="left:0 top:0 right:10 bottom:0">
|
||||
<SolidLabel Font-bind="self.Font" Color="#FFFFFF" Text="Search:" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:1" PreferredMinSize="x:180"/>
|
||||
</SinglelineTextBox>
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</att.AfterHeaders-set>
|
||||
|
||||
<att.Pages>
|
||||
<RibbonTabPage Text="Edit">
|
||||
<att.ContainerComposition-set PreferredMinSize="y:110"/>
|
||||
@@ -617,6 +687,27 @@
|
||||
</RibbonToolstrips>
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Style">
|
||||
<att.Items>
|
||||
<BindableRibbonGalleryList ItemTemplate="demo:StyleItemTemplate" MinCount="2" MaxCount="5" env.ItemType="demo::StyleGroup^">
|
||||
<att.ItemSource-eval>self.GetStyleGroups()</att.ItemSource-eval>
|
||||
<att.GroupTitleProperty>Name</att.GroupTitleProperty>
|
||||
<att.GroupChildrenProperty>Items</att.GroupChildrenProperty>
|
||||
|
||||
<att.SubMenu-set>
|
||||
<RibbonToolstripHeader Text="Header A"/>
|
||||
<MenuItemButton Text="Item A1"/>
|
||||
<MenuItemButton Text="Item A2"/>
|
||||
<MenuItemButton Text="Item A3"/>
|
||||
<RibbonToolstripHeader Text="Header B"/>
|
||||
<MenuItemButton Text="Item B1"/>
|
||||
<MenuItemButton Text="Item B2"/>
|
||||
<MenuItemButton Text="Item B3"/>
|
||||
</att.SubMenu-set>
|
||||
</BindableRibbonGalleryList>
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
</att.Groups>
|
||||
</RibbonTabPage>
|
||||
|
||||
|
||||
+2351
-1828
File diff suppressed because it is too large
Load Diff
+737
-553
File diff suppressed because it is too large
Load Diff
@@ -91,6 +91,10 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControl)
|
||||
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControlConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::StringResource)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleGroup)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItem)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplate)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPage)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextEditor)
|
||||
@@ -363,6 +367,7 @@ namespace vl
|
||||
CLASS_MEMBER_METHOD(GetAlignCenterSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetAlignLeftSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetAlignRightSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetStyleGroups, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetAlignCenterSelected, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetAlignLeftSelected, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetAlignRightSelected, { L"__vwsn_value_" })
|
||||
@@ -428,7 +433,25 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_49)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_50)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_51)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_52)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_53)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_54)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_55)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_56)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_57)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_58)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_59)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_60)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_61)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_62)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_63)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_64)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_65)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_66)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_67)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_68)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
@@ -1225,6 +1248,47 @@ namespace vl
|
||||
CLASS_MEMBER_STATIC_METHOD(Get, { L"__vwsn_ls_locale" })
|
||||
END_CLASS_MEMBER(::demo::StringResource)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleGroup)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleGroup>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetItems, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetName, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetItems, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_EVENT(NameChanged)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Items)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(Items, GetItems)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Name, GetName, SetName, NameChanged)
|
||||
END_CLASS_MEMBER(::demo::StyleGroup)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItem)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItem>(const ::vl::WString&), { L"value" })
|
||||
CLASS_MEMBER_METHOD(GetValue, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetValue, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Value)
|
||||
CLASS_MEMBER_PROPERTY(Value, GetValue, SetValue)
|
||||
END_CLASS_MEMBER(::demo::StyleItem)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
|
||||
CLASS_MEMBER_BASE(::demo::StyleItemTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::StyleItemTemplate*(::vl::Ptr<::demo::StyleItem>), { L"__vwsn_ctor_parameter_ViewModel" })
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
END_CLASS_MEMBER(::demo::StyleItemTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItemTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_StyleItemTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(ViewModel)
|
||||
END_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::TextBoxTabPage)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiTabPage)
|
||||
CLASS_MEMBER_BASE(::demo::TextBoxTabPageConstructor)
|
||||
@@ -1463,6 +1527,10 @@ namespace vl
|
||||
ADD_TYPE_INFO(::demo::ResponsiveViewControl)
|
||||
ADD_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
|
||||
ADD_TYPE_INFO(::demo::StringResource)
|
||||
ADD_TYPE_INFO(::demo::StyleGroup)
|
||||
ADD_TYPE_INFO(::demo::StyleItem)
|
||||
ADD_TYPE_INFO(::demo::StyleItemTemplate)
|
||||
ADD_TYPE_INFO(::demo::StyleItemTemplateConstructor)
|
||||
ADD_TYPE_INFO(::demo::TextBoxTabPage)
|
||||
ADD_TYPE_INFO(::demo::TextBoxTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::TextEditor)
|
||||
|
||||
@@ -94,6 +94,10 @@ namespace vl
|
||||
DECL_TYPE_INFO(::demo::ResponsiveViewControl)
|
||||
DECL_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
|
||||
DECL_TYPE_INFO(::demo::StringResource)
|
||||
DECL_TYPE_INFO(::demo::StyleGroup)
|
||||
DECL_TYPE_INFO(::demo::StyleItem)
|
||||
DECL_TYPE_INFO(::demo::StyleItemTemplate)
|
||||
DECL_TYPE_INFO(::demo::StyleItemTemplateConstructor)
|
||||
DECL_TYPE_INFO(::demo::TextBoxTabPage)
|
||||
DECL_TYPE_INFO(::demo::TextBoxTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::TextEditor)
|
||||
|
||||
Binary file not shown.
@@ -59,6 +59,6 @@
|
||||
<Folder name="ToolbarImages" content="Link">ToolbarImages/Images.xml</Folder>
|
||||
<Instance name="DocumentEditorWindowBaseResource" content="File">Base.xml</Instance>
|
||||
<Instance name="DocumentEditorToolstripWindowResource" content="File">Toolstrip.xml</Instance>
|
||||
<Instance name="DocumentEditorRibbonWindowResource" content="File">Ribbon.xml</Instance>
|
||||
<Folder name="DocumentEditorRibbonWindowResource" content="Link">Ribbon.xml</Folder>
|
||||
<Instance name="HyperlinkWindowResource" content="File">Hyperlink.xml</Instance>
|
||||
</Resource>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,10 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindowConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleGroup)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItem)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplate)
|
||||
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplateConstructor)
|
||||
|
||||
#define _ ,
|
||||
BEGIN_CLASS_MEMBER(::demo::DocumentEditorRibbonWindow)
|
||||
@@ -50,6 +54,7 @@ namespace vl
|
||||
CLASS_MEMBER_METHOD(GetAlignCenterSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetAlignLeftSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetAlignRightSelected, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetStyleGroups, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetAlignCenterSelected, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetAlignLeftSelected, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetAlignRightSelected, { L"__vwsn_value_" })
|
||||
@@ -115,7 +120,25 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_49)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_50)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_51)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_52)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_53)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_54)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_55)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_56)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_57)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_58)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_59)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_60)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_61)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_62)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_63)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_64)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_65)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_66)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_67)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_68)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
@@ -330,6 +353,47 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleGroup)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleGroup>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetItems, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetName, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetItems, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_EVENT(NameChanged)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Items)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(Items, GetItems)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Name, GetName, SetName, NameChanged)
|
||||
END_CLASS_MEMBER(::demo::StyleGroup)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItem)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItem>(const ::vl::WString&), { L"value" })
|
||||
CLASS_MEMBER_METHOD(GetValue, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetValue, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Value)
|
||||
CLASS_MEMBER_PROPERTY(Value, GetValue, SetValue)
|
||||
END_CLASS_MEMBER(::demo::StyleItem)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
|
||||
CLASS_MEMBER_BASE(::demo::StyleItemTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::StyleItemTemplate*(::vl::Ptr<::demo::StyleItem>), { L"__vwsn_ctor_parameter_ViewModel" })
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
END_CLASS_MEMBER(::demo::StyleItemTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItemTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_StyleItemTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(ViewModel)
|
||||
END_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
|
||||
|
||||
#undef _
|
||||
class DemoTypeLoader : public Object, public ITypeLoader
|
||||
{
|
||||
@@ -346,6 +410,10 @@ namespace vl
|
||||
ADD_TYPE_INFO(::demo::HyperlinkWindowConstructor)
|
||||
ADD_TYPE_INFO(::demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
ADD_TYPE_INFO(::demo::StyleGroup)
|
||||
ADD_TYPE_INFO(::demo::StyleItem)
|
||||
ADD_TYPE_INFO(::demo::StyleItemTemplate)
|
||||
ADD_TYPE_INFO(::demo::StyleItemTemplateConstructor)
|
||||
}
|
||||
|
||||
void Unload(ITypeManager* manager)
|
||||
|
||||
@@ -47,6 +47,10 @@ namespace vl
|
||||
DECL_TYPE_INFO(::demo::HyperlinkWindowConstructor)
|
||||
DECL_TYPE_INFO(::demo::MainWindow)
|
||||
DECL_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
DECL_TYPE_INFO(::demo::StyleGroup)
|
||||
DECL_TYPE_INFO(::demo::StyleItem)
|
||||
DECL_TYPE_INFO(::demo::StyleItemTemplate)
|
||||
DECL_TYPE_INFO(::demo::StyleItemTemplateConstructor)
|
||||
#endif
|
||||
|
||||
extern bool LoadDemoTypes();
|
||||
|
||||
@@ -2324,7 +2324,7 @@ Class (::demo::MainWindowConstructor)
|
||||
::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_);
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_18)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->self)->recentFiles));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_18)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(this->self)->recentFiles));
|
||||
}
|
||||
{
|
||||
auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc8_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize__vl_reflection_description_IValueSubscription(this));
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1801,19 +1801,19 @@ Class (::demo::MainWindowConstructor)
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this->self)->GetContainerComposition())->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_0));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->self)->accounts));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(this->self)->accounts));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_7)->SetShared(static_cast<::vl::presentation::controls::GuiControl*>(this->videoContainer));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_14)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->self)->accounts));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_14)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(this->self)->accounts));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_17)->SetShared(static_cast<::vl::presentation::controls::GuiControl*>(this->videoContainer));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_18)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->self)->videos));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_18)->SetItemSource(::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(this->self)->videos));
|
||||
}
|
||||
{
|
||||
auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc9_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize__vl_reflection_description_IValueSubscription(this));
|
||||
|
||||
Reference in New Issue
Block a user