mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-02 15:46:39 +08:00
Update release
This commit is contained in:
+307
-22
@@ -35265,15 +35265,13 @@ GuiTableComposition
|
||||
vint GuiTableComposition::UpdateCellBoundsOffsets(
|
||||
collections::Array<vint>& offsets,
|
||||
collections::Array<vint>& sizes,
|
||||
vint start,
|
||||
vint max
|
||||
)
|
||||
{
|
||||
offsets[0]=start;
|
||||
offsets[0]=0;
|
||||
for(vint i=1;i<offsets.Count();i++)
|
||||
{
|
||||
start+=cellPadding+sizes[i-1];
|
||||
offsets[i]=start;
|
||||
offsets[i] = offsets[i - 1] + cellPadding + sizes[i - 1];
|
||||
}
|
||||
|
||||
vint last=offsets.Count()-1;
|
||||
@@ -35283,14 +35281,13 @@ GuiTableComposition
|
||||
|
||||
void GuiTableComposition::UpdateCellBoundsInternal()
|
||||
{
|
||||
Array<vint> rowOffsets, columnOffsets, rowSizes, columnSizes;
|
||||
rowOffsets.Resize(rows);
|
||||
rowSizes.Resize(rows);
|
||||
columnOffsets.Resize(columns);
|
||||
columnSizes.Resize(columns);
|
||||
{
|
||||
vint rowTotal=(rows-1)*cellPadding;
|
||||
vint columnTotal=(columns-1)*cellPadding;
|
||||
vint rowTotal = (rows - 1)*cellPadding;
|
||||
vint columnTotal = (columns - 1)*cellPadding;
|
||||
vint rowTotalWithPercentage=rowTotal;
|
||||
vint columnTotalWithPercentage=columnTotal;
|
||||
|
||||
@@ -35326,8 +35323,8 @@ GuiTableComposition
|
||||
Rect area=GetCellArea();
|
||||
UpdateCellBoundsPercentages(rowSizes, rowTotal, area.Height(), rowOptions);
|
||||
UpdateCellBoundsPercentages(columnSizes, columnTotal, area.Width(), columnOptions);
|
||||
rowExtending=UpdateCellBoundsOffsets(rowOffsets, rowSizes, cellPadding, cellPadding+area.Height());
|
||||
columnExtending=UpdateCellBoundsOffsets(columnOffsets, columnSizes, cellPadding, cellPadding+area.Width());
|
||||
rowExtending=UpdateCellBoundsOffsets(rowOffsets, rowSizes, area.Height());
|
||||
columnExtending=UpdateCellBoundsOffsets(columnOffsets, columnSizes, area.Width());
|
||||
|
||||
for(vint i=0;i<rows;i++)
|
||||
{
|
||||
@@ -35346,8 +35343,8 @@ GuiTableComposition
|
||||
rowSizes.Resize(rows);
|
||||
columnSizes.Resize(columns);
|
||||
{
|
||||
vint rowTotal=(rows+1)*cellPadding;
|
||||
vint columnTotal=(columns+1)*cellPadding;
|
||||
vint rowTotal = (rows - 1) * cellPadding;
|
||||
vint columnTotal = (columns - 1) * cellPadding;
|
||||
vint rowTotalWithPercentage=rowTotal;
|
||||
vint columnTotalWithPercentage=columnTotal;
|
||||
|
||||
@@ -35398,11 +35395,13 @@ GuiTableComposition
|
||||
|
||||
GuiTableComposition::GuiTableComposition()
|
||||
:rows(0)
|
||||
,columns(0)
|
||||
,cellPadding(0)
|
||||
,rowExtending(0)
|
||||
,columnExtending(0)
|
||||
, columns(0)
|
||||
, cellPadding(0)
|
||||
, borderVisible(true)
|
||||
, rowExtending(0)
|
||||
, columnExtending(0)
|
||||
{
|
||||
ConfigChanged.SetAssociatedComposition(this);
|
||||
SetRowsAndColumns(1, 1);
|
||||
}
|
||||
|
||||
@@ -35443,6 +35442,7 @@ GuiTableComposition
|
||||
cell->OnTableRowsAndColumnsChanged();
|
||||
}
|
||||
}
|
||||
ConfigChanged.Execute(GuiEventArgs(this));
|
||||
UpdateCellBounds();
|
||||
return true;
|
||||
}
|
||||
@@ -35460,6 +35460,7 @@ GuiTableComposition
|
||||
void GuiTableComposition::SetRowOption(vint _row, GuiCellOption option)
|
||||
{
|
||||
rowOptions[_row]=option;
|
||||
ConfigChanged.Execute(GuiEventArgs(this));
|
||||
}
|
||||
|
||||
GuiCellOption GuiTableComposition::GetColumnOption(vint _column)
|
||||
@@ -35470,6 +35471,7 @@ GuiTableComposition
|
||||
void GuiTableComposition::SetColumnOption(vint _column, GuiCellOption option)
|
||||
{
|
||||
columnOptions[_column]=option;
|
||||
ConfigChanged.Execute(GuiEventArgs(this));
|
||||
}
|
||||
|
||||
vint GuiTableComposition::GetCellPadding()
|
||||
@@ -35483,15 +35485,30 @@ GuiTableComposition
|
||||
cellPadding=value;
|
||||
}
|
||||
|
||||
bool GuiTableComposition::GetBorderVisible()
|
||||
{
|
||||
return borderVisible;
|
||||
}
|
||||
|
||||
void GuiTableComposition::SetBorderVisible(bool value)
|
||||
{
|
||||
if (borderVisible != value)
|
||||
{
|
||||
borderVisible = value;
|
||||
UpdateCellBounds();
|
||||
}
|
||||
}
|
||||
|
||||
Rect GuiTableComposition::GetCellArea()
|
||||
{
|
||||
Rect bounds(Point(0, 0), GuiBoundsComposition::GetBounds().GetSize());
|
||||
bounds.x1+=margin.left+internalMargin.left+cellPadding;
|
||||
bounds.y1+=margin.top+internalMargin.top+cellPadding;
|
||||
bounds.x2-=margin.right+internalMargin.right+cellPadding;
|
||||
bounds.y2-=margin.bottom+internalMargin.bottom+cellPadding;
|
||||
if(bounds.x2<bounds.x1) bounds.x2=bounds.x1;
|
||||
if(bounds.y2<bounds.y1) bounds.y2=bounds.y1;
|
||||
vint borderThickness = borderVisible ? cellPadding : 0;
|
||||
bounds.x1 += margin.left + internalMargin.left + borderThickness;
|
||||
bounds.y1 += margin.top + internalMargin.top + borderThickness;
|
||||
bounds.x2 -= margin.right + internalMargin.right + borderThickness;
|
||||
bounds.y2 -= margin.bottom + internalMargin.bottom + borderThickness;
|
||||
if (bounds.x2 < bounds.x1) bounds.x2 = bounds.x1;
|
||||
if (bounds.y2 < bounds.y1) bounds.y2 = bounds.y1;
|
||||
return bounds;
|
||||
}
|
||||
|
||||
@@ -35729,7 +35746,8 @@ GuiCellComposition
|
||||
}
|
||||
}
|
||||
}
|
||||
result = Rect(bounds1.x1, bounds1.y1, bounds2.x2, bounds2.y2);
|
||||
vint offset = tableParent->borderVisible ? tableParent->cellPadding : 0;
|
||||
result = Rect(bounds1.x1 + offset, bounds1.y1 + offset, bounds2.x2 + offset, bounds2.y2 + offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -35738,6 +35756,273 @@ GuiCellComposition
|
||||
UpdatePreviousBounds(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiTableSplitterCompositionBase
|
||||
***********************************************************************/
|
||||
|
||||
void GuiTableSplitterCompositionBase::OnParentChanged(GuiGraphicsComposition* oldParent, GuiGraphicsComposition* newParent)
|
||||
{
|
||||
GuiGraphicsSite::OnParentChanged(oldParent, newParent);
|
||||
tableParent = dynamic_cast<GuiTableComposition*>(newParent);
|
||||
}
|
||||
|
||||
void GuiTableSplitterCompositionBase::OnLeftButtonDown(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments)
|
||||
{
|
||||
dragging = true;
|
||||
draggingPoint = Point(arguments.x, arguments.y);
|
||||
}
|
||||
|
||||
void GuiTableSplitterCompositionBase::OnLeftButtonUp(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments)
|
||||
{
|
||||
dragging = false;
|
||||
}
|
||||
|
||||
void GuiTableSplitterCompositionBase::OnMouseMoveHelper(
|
||||
vint cellsBefore,
|
||||
vint GuiTableComposition::* cells,
|
||||
collections::Array<vint>& cellSizes,
|
||||
vint offset,
|
||||
GuiCellOption(GuiTableComposition::*getOption)(vint),
|
||||
void(GuiTableComposition::*setOption)(vint, GuiCellOption)
|
||||
)
|
||||
{
|
||||
if (dragging)
|
||||
{
|
||||
if (tableParent)
|
||||
{
|
||||
if (0 < cellsBefore && cellsBefore < tableParent->*cells)
|
||||
{
|
||||
auto o1 = (tableParent->*getOption)(cellsBefore - 1);
|
||||
auto o2 = (tableParent->*getOption)(cellsBefore);
|
||||
|
||||
vint indexStart = -1;
|
||||
vint indexEnd = -1;
|
||||
vint indexStep = -1;
|
||||
vint max = 0;
|
||||
|
||||
if (offset < 0)
|
||||
{
|
||||
indexStart = cellsBefore - 1;
|
||||
indexEnd = -1;
|
||||
indexStep = -1;
|
||||
}
|
||||
else if (offset > 0)
|
||||
{
|
||||
indexStart = cellsBefore;
|
||||
indexEnd = tableParent->*cells;
|
||||
indexStep = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
auto o = (tableParent->*getOption)(indexStart);
|
||||
if (o.composeType == GuiCellOption::Absolute)
|
||||
{
|
||||
max = o.absolute - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (vint i = indexStart; i != indexEnd; i += indexStep)
|
||||
{
|
||||
o = (tableParent->*getOption)(i);
|
||||
if (o.composeType == GuiCellOption::Absolute)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (o.composeType == GuiCellOption::Percentage)
|
||||
{
|
||||
max += cellSizes[i] - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (max <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (offset < 0)
|
||||
{
|
||||
if (max < -offset)
|
||||
{
|
||||
offset = -max;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (max < offset)
|
||||
{
|
||||
offset = max;
|
||||
}
|
||||
}
|
||||
|
||||
if (o1.composeType == GuiCellOption::Absolute)
|
||||
{
|
||||
o1.absolute += offset;
|
||||
(tableParent->*setOption)(cellsBefore - 1, o1);
|
||||
}
|
||||
if (o2.composeType == GuiCellOption::Absolute)
|
||||
{
|
||||
o2.absolute -= offset;
|
||||
(tableParent->*setOption)(cellsBefore, o2);
|
||||
}
|
||||
tableParent->ForceCalculateSizeImmediately();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rect GuiTableSplitterCompositionBase::GetBoundsHelper(
|
||||
vint cellsBefore,
|
||||
vint GuiTableComposition::* cells,
|
||||
vint(Rect::* dimSize)()const,
|
||||
collections::Array<vint>& cellOffsets,
|
||||
vint Rect::* dimU1,
|
||||
vint Rect::* dimU2,
|
||||
vint Rect::* dimV1,
|
||||
vint Rect::* dimV2
|
||||
)
|
||||
{
|
||||
Rect result(0, 0, 0, 0);
|
||||
if (tableParent)
|
||||
{
|
||||
if (0 < cellsBefore && cellsBefore < tableParent->*cells)
|
||||
{
|
||||
vint offset = tableParent->borderVisible ? tableParent->cellPadding : 0;
|
||||
result.*dimU1 = offset;
|
||||
result.*dimU2 = offset + (tableParent->GetCellArea().*dimSize)();
|
||||
result.*dimV1 = offset + cellOffsets[cellsBefore] - tableParent->cellPadding;
|
||||
result.*dimV2 = (result.*dimV1) + tableParent->cellPadding;
|
||||
}
|
||||
}
|
||||
UpdatePreviousBounds(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
GuiTableSplitterCompositionBase::GuiTableSplitterCompositionBase()
|
||||
:tableParent(0)
|
||||
, dragging(false)
|
||||
{
|
||||
SetAssociatedCursor(GetCurrentController()->ResourceService()->GetSystemCursor(INativeCursor::SizeNS));
|
||||
GetEventReceiver()->leftButtonDown.AttachMethod(this, &GuiTableSplitterCompositionBase::OnLeftButtonDown);
|
||||
GetEventReceiver()->leftButtonUp.AttachMethod(this, &GuiTableSplitterCompositionBase::OnLeftButtonUp);
|
||||
}
|
||||
|
||||
GuiTableSplitterCompositionBase::~GuiTableSplitterCompositionBase()
|
||||
{
|
||||
}
|
||||
|
||||
GuiTableComposition* GuiTableSplitterCompositionBase::GetTableParent()
|
||||
{
|
||||
return tableParent;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiRowSplitterComposition
|
||||
***********************************************************************/
|
||||
|
||||
void GuiRowSplitterComposition::OnMouseMove(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments)
|
||||
{
|
||||
OnMouseMoveHelper(
|
||||
rowsToTheTop,
|
||||
&GuiTableComposition::rows,
|
||||
tableParent->rowSizes,
|
||||
arguments.y - draggingPoint.y,
|
||||
&GuiTableComposition::GetRowOption,
|
||||
&GuiTableComposition::SetRowOption
|
||||
);
|
||||
}
|
||||
|
||||
GuiRowSplitterComposition::GuiRowSplitterComposition()
|
||||
:rowsToTheTop(0)
|
||||
{
|
||||
SetAssociatedCursor(GetCurrentController()->ResourceService()->GetSystemCursor(INativeCursor::SizeNS));
|
||||
GetEventReceiver()->mouseMove.AttachMethod(this, &GuiRowSplitterComposition::OnMouseMove);
|
||||
}
|
||||
|
||||
GuiRowSplitterComposition::~GuiRowSplitterComposition()
|
||||
{
|
||||
}
|
||||
|
||||
vint GuiRowSplitterComposition::GetRowsToTheTop()
|
||||
{
|
||||
return rowsToTheTop;
|
||||
}
|
||||
|
||||
void GuiRowSplitterComposition::SetRowsToTheTop(vint value)
|
||||
{
|
||||
rowsToTheTop = value;
|
||||
}
|
||||
|
||||
Rect GuiRowSplitterComposition::GetBounds()
|
||||
{
|
||||
return GetBoundsHelper(
|
||||
rowsToTheTop,
|
||||
&GuiTableComposition::rows,
|
||||
&Rect::Width,
|
||||
tableParent->rowOffsets,
|
||||
&Rect::x1,
|
||||
&Rect::x2,
|
||||
&Rect::y1,
|
||||
&Rect::y2
|
||||
);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiColumnSplitterComposition
|
||||
***********************************************************************/
|
||||
|
||||
void GuiColumnSplitterComposition::OnMouseMove(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments)
|
||||
{
|
||||
OnMouseMoveHelper(
|
||||
columnsToTheLeft,
|
||||
&GuiTableComposition::columns,
|
||||
tableParent->columnSizes,
|
||||
arguments.x - draggingPoint.x,
|
||||
&GuiTableComposition::GetColumnOption,
|
||||
&GuiTableComposition::SetColumnOption
|
||||
);
|
||||
}
|
||||
|
||||
GuiColumnSplitterComposition::GuiColumnSplitterComposition()
|
||||
:columnsToTheLeft(0)
|
||||
{
|
||||
SetAssociatedCursor(GetCurrentController()->ResourceService()->GetSystemCursor(INativeCursor::SizeWE));
|
||||
GetEventReceiver()->mouseMove.AttachMethod(this, &GuiColumnSplitterComposition::OnMouseMove);
|
||||
}
|
||||
|
||||
GuiColumnSplitterComposition::~GuiColumnSplitterComposition()
|
||||
{
|
||||
}
|
||||
|
||||
vint GuiColumnSplitterComposition::GetColumnsToTheLeft()
|
||||
{
|
||||
return columnsToTheLeft;
|
||||
}
|
||||
|
||||
void GuiColumnSplitterComposition::SetColumnsToTheLeft(vint value)
|
||||
{
|
||||
columnsToTheLeft = value;
|
||||
}
|
||||
|
||||
Rect GuiColumnSplitterComposition::GetBounds()
|
||||
{
|
||||
return GetBoundsHelper(
|
||||
columnsToTheLeft,
|
||||
&GuiTableComposition::columns,
|
||||
&Rect::Height,
|
||||
tableParent->columnOffsets,
|
||||
&Rect::y1,
|
||||
&Rect::y2,
|
||||
&Rect::x1,
|
||||
&Rect::x2
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+108
-1
@@ -6649,6 +6649,9 @@ Table Compositions
|
||||
|
||||
class GuiTableComposition;
|
||||
class GuiCellComposition;
|
||||
class GuiTableSplitterCompositionBase;
|
||||
class GuiRowSplitterComposition;
|
||||
class GuiColumnSplitterComposition;
|
||||
|
||||
/// <summary>
|
||||
/// Represnets a sizing configuration for a row or a column.
|
||||
@@ -6721,16 +6724,26 @@ Table Compositions
|
||||
class GuiTableComposition : public GuiBoundsComposition, public Description<GuiTableComposition>
|
||||
{
|
||||
friend class GuiCellComposition;
|
||||
friend class GuiTableSplitterCompositionBase;
|
||||
friend class GuiRowSplitterComposition;
|
||||
friend class GuiColumnSplitterComposition;
|
||||
protected:
|
||||
vint rows;
|
||||
vint columns;
|
||||
vint cellPadding;
|
||||
bool borderVisible;
|
||||
vint rowExtending;
|
||||
vint columnExtending;
|
||||
collections::Array<GuiCellOption> rowOptions;
|
||||
collections::Array<GuiCellOption> columnOptions;
|
||||
collections::Array<GuiCellComposition*> cellCompositions;
|
||||
|
||||
collections::Array<Rect> cellBounds;
|
||||
collections::Array<vint> rowOffsets;
|
||||
collections::Array<vint> columnOffsets;
|
||||
collections::Array<vint> rowSizes;
|
||||
collections::Array<vint> columnSizes;
|
||||
|
||||
Rect previousBounds;
|
||||
Size previousContentMinSize;
|
||||
Size tableContentMinSize;
|
||||
@@ -6761,7 +6774,6 @@ Table Compositions
|
||||
vint UpdateCellBoundsOffsets(
|
||||
collections::Array<vint>& offsets,
|
||||
collections::Array<vint>& sizes,
|
||||
vint start,
|
||||
vint max
|
||||
);
|
||||
|
||||
@@ -6772,6 +6784,9 @@ Table Compositions
|
||||
GuiTableComposition();
|
||||
~GuiTableComposition();
|
||||
|
||||
/// <summary>Event that will be raised with row numbers, column numbers or options are changed.</summary>
|
||||
compositions::GuiNotifyEvent ConfigChanged;
|
||||
|
||||
/// <summary>Get the number of rows.</summary>
|
||||
/// <returns>The number of rows.</returns>
|
||||
vint GetRows();
|
||||
@@ -6812,6 +6827,12 @@ Table Compositions
|
||||
/// <summary>Set the cell padding. A cell padding is the distance between a table client area and a cell, or between two cells.</summary>
|
||||
/// <param name="value">The cell padding.</param>
|
||||
void SetCellPadding(vint value);
|
||||
/// <summary>Get the border visibility.</summary>
|
||||
/// <returns>Returns true means the border thickness equals to the cell padding, otherwise zero.</returns>
|
||||
bool GetBorderVisible();
|
||||
/// <summary>Set the border visibility.</summary>
|
||||
/// <param name="value">Set to true to let the border thickness equal to the cell padding, otherwise zero.</param>
|
||||
void SetBorderVisible(bool value);
|
||||
/// <summary>Get the cell area in the space of the table's parent composition's client area.</summary>
|
||||
/// <returns>The cell area.</returns>
|
||||
Rect GetCellArea();
|
||||
@@ -6873,6 +6894,92 @@ Table Compositions
|
||||
|
||||
Rect GetBounds()override;
|
||||
};
|
||||
|
||||
class GuiTableSplitterCompositionBase : public GuiGraphicsSite, public Description<GuiTableSplitterCompositionBase>
|
||||
{
|
||||
protected:
|
||||
GuiTableComposition* tableParent;
|
||||
|
||||
bool dragging;
|
||||
Point draggingPoint;
|
||||
|
||||
void OnParentChanged(GuiGraphicsComposition* oldParent, GuiGraphicsComposition* newParent)override;
|
||||
void OnLeftButtonDown(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments);
|
||||
void OnLeftButtonUp(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments);
|
||||
|
||||
void OnMouseMoveHelper(
|
||||
vint cellsBefore,
|
||||
vint GuiTableComposition::* cells,
|
||||
collections::Array<vint>& cellSizes,
|
||||
vint offset,
|
||||
GuiCellOption(GuiTableComposition::*getOption)(vint),
|
||||
void(GuiTableComposition::*setOption)(vint, GuiCellOption)
|
||||
);
|
||||
|
||||
Rect GetBoundsHelper(
|
||||
vint cellsBefore,
|
||||
vint GuiTableComposition::* cells,
|
||||
vint(Rect::* dimSize)()const,
|
||||
collections::Array<vint>& cellOffsets,
|
||||
vint Rect::* dimU1,
|
||||
vint Rect::* dimU2,
|
||||
vint Rect::* dimV1,
|
||||
vint Rect::* dimV2
|
||||
);
|
||||
public:
|
||||
GuiTableSplitterCompositionBase();
|
||||
~GuiTableSplitterCompositionBase();
|
||||
|
||||
/// <summary>Get the owner table composition.</summary>
|
||||
/// <returns>The owner table composition.</returns>
|
||||
GuiTableComposition* GetTableParent();
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Represents a row splitter composition of a <see cref="GuiTableComposition"/>.
|
||||
/// </summary>
|
||||
class GuiRowSplitterComposition : public GuiTableSplitterCompositionBase, public Description<GuiRowSplitterComposition>
|
||||
{
|
||||
protected:
|
||||
vint rowsToTheTop;
|
||||
|
||||
void OnMouseMove(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments);
|
||||
public:
|
||||
GuiRowSplitterComposition();
|
||||
~GuiRowSplitterComposition();
|
||||
|
||||
/// <summary>Get the number of rows that above the splitter.</summary>
|
||||
/// <returns>The number of rows that above the splitter.</summary>
|
||||
vint GetRowsToTheTop();
|
||||
/// <summary>Set the number of rows that above the splitter.</summary>
|
||||
/// <param name="value">The number of rows that above the splitter</param>
|
||||
void SetRowsToTheTop(vint value);
|
||||
|
||||
Rect GetBounds()override;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Represents a column splitter composition of a <see cref="GuiTableComposition"/>.
|
||||
/// </summary>
|
||||
class GuiColumnSplitterComposition : public GuiTableSplitterCompositionBase, public Description<GuiColumnSplitterComposition>
|
||||
{
|
||||
protected:
|
||||
vint columnsToTheLeft;
|
||||
|
||||
void OnMouseMove(GuiGraphicsComposition* sender, GuiMouseEventArgs& arguments);
|
||||
public:
|
||||
GuiColumnSplitterComposition();
|
||||
~GuiColumnSplitterComposition();
|
||||
|
||||
/// <summary>Get the number of columns that before the splitter.</summary>
|
||||
/// <returns>The number of columns that before the splitter.</summary>
|
||||
vint GetColumnsToTheLeft();
|
||||
/// <summary>Set the number of columns that before the splitter.</summary>
|
||||
/// <param name="value">The number of columns that before the splitter</param>
|
||||
void SetColumnsToTheLeft(vint value);
|
||||
|
||||
Rect GetBounds()override;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1216,7 +1216,10 @@ Type Declaration
|
||||
CLASS_MEMBER_BASE(GuiBoundsComposition)
|
||||
CLASS_MEMBER_CONSTRUCTOR(GuiTableComposition*(), NO_PARAMETER)
|
||||
|
||||
CLASS_MEMBER_GUIEVENT(ConfigChanged)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_FAST(CellPadding)
|
||||
CLASS_MEMBER_PROPERTY_FAST(BorderVisible)
|
||||
|
||||
CLASS_MEMBER_METHOD(GetRows, NO_PARAMETER)
|
||||
CLASS_MEMBER_EXTERNALMETHOD(SetRows, {L"value"}, void(GuiTableComposition::*)(vint), &GuiTableComposition_SetRows)
|
||||
@@ -1248,6 +1251,26 @@ Type Declaration
|
||||
CLASS_MEMBER_METHOD(SetSite, {L"row" _ L"column" _ L"rowSpan" _ L"columnSpan"})
|
||||
END_CLASS_MEMBER(GuiCellComposition)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiTableSplitterCompositionBase)
|
||||
CLASS_MEMBER_BASE(GuiGraphicsSite)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(TableParent)
|
||||
END_CLASS_MEMBER(GuiRowSplitterComposition)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiRowSplitterComposition)
|
||||
CLASS_MEMBER_BASE(GuiTableSplitterCompositionBase)
|
||||
CLASS_MEMBER_CONSTRUCTOR(GuiRowSplitterComposition*(), NO_PARAMETER)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_FAST(RowsToTheTop)
|
||||
END_CLASS_MEMBER(GuiRowSplitterComposition)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiColumnSplitterComposition)
|
||||
CLASS_MEMBER_BASE(GuiTableSplitterCompositionBase)
|
||||
CLASS_MEMBER_CONSTRUCTOR(GuiColumnSplitterComposition*(), NO_PARAMETER)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_FAST(ColumnsToTheLeft)
|
||||
END_CLASS_MEMBER(GuiColumnSplitterComposition)
|
||||
|
||||
BEGIN_ENUM_ITEM(FlowAlignment)
|
||||
ENUM_CLASS_ITEM(Left)
|
||||
ENUM_CLASS_ITEM(Center)
|
||||
|
||||
@@ -347,6 +347,9 @@ Type List
|
||||
F(presentation::compositions::GuiCellOption::ComposeType)\
|
||||
F(presentation::compositions::GuiTableComposition)\
|
||||
F(presentation::compositions::GuiCellComposition)\
|
||||
F(presentation::compositions::GuiTableSplitterCompositionBase)\
|
||||
F(presentation::compositions::GuiRowSplitterComposition)\
|
||||
F(presentation::compositions::GuiColumnSplitterComposition)\
|
||||
F(presentation::compositions::FlowAlignment)\
|
||||
F(presentation::compositions::GuiFlowComposition)\
|
||||
F(presentation::compositions::GuiFlowOption)\
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -19,6 +19,9 @@ popd
|
||||
pushd Table\UI
|
||||
call Codegen.bat
|
||||
popd
|
||||
pushd TableSplitter\UI
|
||||
call Codegen.bat
|
||||
popd
|
||||
pushd Flow\UI
|
||||
call Codegen.bat
|
||||
popd
|
||||
@@ -33,7 +36,7 @@ popd
|
||||
pushd TextEditor\UI
|
||||
call Codegen.bat
|
||||
popd
|
||||
pushd GacUI_Controls\UI
|
||||
pushd ColorPicker\UI
|
||||
call Codegen.bat
|
||||
popd
|
||||
popd
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flow", "Flow\Flow.vcxproj",
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RichTextEmbedding", "RichTextEmbedding\RichTextEmbedding.vcxproj", "{A586B9AF-3C54-4353-9214-F15182C4BFB8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableSplitter", "TableSplitter\TableSplitter.vcxproj", "{B286F8B7-04DF-4850-9479-3A5F3D3C2554}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -53,6 +55,10 @@ Global
|
||||
{A586B9AF-3C54-4353-9214-F15182C4BFB8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A586B9AF-3C54-4353-9214-F15182C4BFB8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A586B9AF-3C54-4353-9214-F15182C4BFB8}.Release|Win32.Build.0 = Release|Win32
|
||||
{B286F8B7-04DF-4850-9479-3A5F3D3C2554}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B286F8B7-04DF-4850-9479-3A5F3D3C2554}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B286F8B7-04DF-4850-9479-3A5F3D3C2554}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B286F8B7-04DF-4850-9479-3A5F3D3C2554}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#include "UI/Source/Demo.h"
|
||||
#include <Windows.h>
|
||||
|
||||
using namespace vl::collections;
|
||||
using namespace vl::stream;
|
||||
|
||||
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
|
||||
{
|
||||
return SetupWindowsDirect2DRenderer();
|
||||
}
|
||||
|
||||
void GuiMain()
|
||||
{
|
||||
{
|
||||
List<WString> errors;
|
||||
FileStream fileStream(L"../UIRes/TableSplitter.bin", FileStream::ReadOnly);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors);
|
||||
GetResourceManager()->SetResource(L"Resource", resource);
|
||||
}
|
||||
demo::MainWindow window;
|
||||
window.MoveToScreenCenter();
|
||||
GetApplication()->Run(&window);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B286F8B7-04DF-4850-9479-3A5F3D3C2554}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>TableSplitter</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="UI\Source\DemoPartialClasses.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\Resource.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\Demo.h" />
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\GacUI\GacUI.vcxproj">
|
||||
<Project>{8018d622-66ba-4e65-9d03-bdac37ea9a54}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="UI">
|
||||
<UniqueIdentifier>{ee89d17b-263a-4e0e-b063-e14ea5c00f0f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UI\Source\DemoPartialClasses.cpp">
|
||||
<Filter>UI</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\Resource.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UI\Source\Demo.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1 @@
|
||||
..\..\..\..\Tools\GacGen.exe Resource.xml
|
||||
@@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Resource>
|
||||
<Folder name="GacGenConfig">
|
||||
<Folder name="Cpp">
|
||||
<Text name="Output">Source</Text>
|
||||
<Text name="Include">GacUIReflection.h</Text>
|
||||
<Text name="Name">Demo</Text>
|
||||
<Text name="Prefix"></Text>
|
||||
</Folder>
|
||||
<Folder name="Res">
|
||||
<Text name="Output">..\..\UIRes</Text>
|
||||
<Text name="PrecompiledBinary">TableSplitter.bin</Text>
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder name="MainWindow">
|
||||
<Instance name="MainWindowResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow">
|
||||
<Window Text="TableSplitter" ClientSize="x:640 y:480">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:640 y:480"/>
|
||||
|
||||
<Table CellPadding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<CheckBox ref.Name="checkBorder" Text="Table size contains borders" Selected="true"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0">
|
||||
<GroupBox Text="Drag spaces between cells to resize">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
|
||||
<Bounds AlignmentToParent="left:0 top:0 right:0 bottom:0">
|
||||
<SolidBorder Color="#0000FF"/>
|
||||
<Table ref.Name="table" BorderVisible-bind="checkBorder.Selected" CellPadding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:0.5</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:0.5</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:0.5</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:0.5</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
<CellOption>composeType:Absolute absolute:50</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<RowSplitter RowsToTheTop="2"/>
|
||||
<RowSplitter RowsToTheTop="3"/>
|
||||
<RowSplitter RowsToTheTop="5"/>
|
||||
<RowSplitter RowsToTheTop="6"/>
|
||||
|
||||
<ColumnSplitter ColumnsToTheLeft="2"/>
|
||||
<ColumnSplitter ColumnsToTheLeft="3"/>
|
||||
<ColumnSplitter ColumnsToTheLeft="5"/>
|
||||
<ColumnSplitter ColumnsToTheLeft="6"/>
|
||||
|
||||
<Cell Site="row:0 column:1">
|
||||
<Label Text-format="$(table.observe as _(_.GetColumnOption(1).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:2">
|
||||
<Label Text-format="$(table.observe as _(_.GetColumnOption(2).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:3">
|
||||
<Label Text="50%"/>
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:4">
|
||||
<Label Text="50%"/>
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:5">
|
||||
<Label Text-format="$(table.observe as _(_.GetColumnOption(5).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:6">
|
||||
<Label Text-format="$(table.observe as _(_.GetColumnOption(6).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0">
|
||||
<Label Text-format="$(table.observe as _(_.GetRowOption(1).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:0">
|
||||
<Label Text-format="$(table.observe as _(_.GetRowOption(2).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:3 column:0">
|
||||
<Label Text="50%"/>
|
||||
</Cell>
|
||||
<Cell Site="row:4 column:0">
|
||||
<Label Text="50%"/>
|
||||
</Cell>
|
||||
<Cell Site="row:5 column:0">
|
||||
<Label Text-format="$(table.observe as _(_.GetRowOption(5).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:0">
|
||||
<Label Text-format="$(table.observe as _(_.GetRowOption(6).absolute on _.ConfigChanged))px"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:1">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:1 column:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:1">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:5">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:1 column:6">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:5">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:6">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:5 column:1">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:5 column:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:1">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:5 column:5">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:5 column:6">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:5">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:6">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:3 columnSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:3 columnSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:5 column:3 columnSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:6 column:3 columnSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:3 column:1 rowSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:3 column:2 rowSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:3 column:5 rowSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:3 column:6 rowSpan:2">
|
||||
<SolidBorder Color="#FF8000"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:3 column:3">
|
||||
<SolidBorder Color="#008000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:3 column:4">
|
||||
<SolidBorder Color="#008000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:4 column:3">
|
||||
<SolidBorder Color="#008000"/>
|
||||
</Cell>
|
||||
<Cell Site="row:4 column:4">
|
||||
<SolidBorder Color="#008000"/>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Bounds>
|
||||
</GroupBox>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Window>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
</Resource>
|
||||
@@ -0,0 +1,16 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Demo
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo
|
||||
|
||||
#include "DemoPartialClasses.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Partial Classes
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
***********************************************************************/
|
||||
|
||||
#include "Demo.h"
|
||||
|
||||
namespace demo
|
||||
{
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
|
||||
void MainWindow::OnCreate()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
InitializeComponents();
|
||||
OnCreate();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
OnDestroy();
|
||||
ClearSubscriptions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#define _ ,
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(demo::MainWindow)
|
||||
|
||||
#undef _
|
||||
|
||||
class DemoResourceLoader : public Object, public ITypeLoader
|
||||
{
|
||||
public:
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
ADD_TYPE_INFO(demo::MainWindow)
|
||||
}
|
||||
|
||||
void Unload(ITypeManager* manager)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin
|
||||
{
|
||||
public:
|
||||
void Load()override
|
||||
{
|
||||
GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader);
|
||||
}
|
||||
|
||||
void AfterLoad()override
|
||||
{
|
||||
}
|
||||
|
||||
void Unload()override
|
||||
{
|
||||
}
|
||||
};
|
||||
GUI_REGISTER_PLUGIN(DemoResourcePlugin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Partial Classes
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES
|
||||
|
||||
#include "GacUIReflection.h"
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class MainWindow;
|
||||
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
protected:
|
||||
vl::presentation::controls::GuiSelectableButton* checkBorder;
|
||||
vl::presentation::compositions::GuiTableComposition* table;
|
||||
|
||||
void InitializeComponents()
|
||||
{
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(checkBorder);
|
||||
GUI_INSTANCE_REFERENCE(table);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
public:
|
||||
MainWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
,checkBorder(0)
|
||||
,table(0)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
DECL_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace demo
|
||||
{
|
||||
class MainWindow : public demo::MainWindow_<demo::MainWindow>
|
||||
{
|
||||
friend class demo::MainWindow_<demo::MainWindow>;
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<demo::MainWindow>;
|
||||
protected:
|
||||
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
void OnCreate();
|
||||
void OnDestroy();
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,7 @@ GacUI tutorials and the plan
|
||||
* **Stack**: Stack layout with configurable axis directions.
|
||||
* **Flow**: Flow layout with configurable axis directions.
|
||||
* **Table**: Table layout.
|
||||
* **TableSplitter**: Table layout with splitters, which can be dragged to change cell sizes.
|
||||
* **RichTextEmbedding**: Embed controls in a rich text document.
|
||||
* GacUI_Controls
|
||||
* **ContainersAndButtons**: Using container controls and button controls.
|
||||
|
||||
Reference in New Issue
Block a user