-
-
Save Appendme/7500f1bf52e34bf82a49e52e2e15f755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct TAIMPUIControlPlacement | |
{ | |
TAIMPUIControlPlacement() | |
: Alignment(ualNone) | |
, AlignmentMargins{} | |
, Anchors{} | |
, Bounds{} | |
{ | |
} | |
TAIMPUIControlPlacement( | |
TAIMPUIControlAlignment Alignment, | |
int Size, | |
RECT AlignmentMargins = { 3, 3, 3, 3 }) | |
: Alignment(Alignment) | |
, AlignmentMargins(AlignmentMargins) | |
, Anchors({ 1, 1, 0, 0 }) | |
, Bounds({}) | |
{ | |
if (Alignment == ualClient || | |
Alignment == ualTop || | |
Alignment == ualBottom) | |
Bounds.bottom = Size; | |
if (Alignment == ualClient || | |
Alignment == ualLeft || | |
Alignment == ualRight) | |
Bounds.right = Size; | |
} | |
TAIMPUIControlPlacement( | |
TAIMPUIControlAlignment Alignment, | |
RECT Bounds, | |
RECT AlignmentMargins = { 3, 3, 3, 3 }) | |
: Alignment(Alignment) | |
, AlignmentMargins(AlignmentMargins) | |
, Anchors({ 1, 1, 0, 0 }) | |
, Bounds(Bounds) | |
{ | |
} | |
TAIMPUIControlPlacement( | |
RECT Bounds, | |
RECT Anchors = { 1, 1, 0, 0 }) | |
: Alignment(ualNone) | |
, AlignmentMargins({ 3, 3, 3, 3 }) | |
, Anchors(Anchors) | |
, Bounds(Bounds) | |
{ | |
} | |
TAIMPUIControlAlignment Alignment; | |
RECT AlignmentMargins; | |
RECT Anchors; | |
RECT Bounds; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment