BVB Source Codes

AsyncDisplayKit Show ASStackLayoutDefines.h Source code

Return Download AsyncDisplayKit: download ASStackLayoutDefines.h Source code - Download AsyncDisplayKit Source code - Type:.h
  1. //
  2. //  ASStackLayoutDefines.h
  3. //  AsyncDisplayKit
  4. //
  5. //  Copyright (c) 2014-present, Facebook, Inc.  All rights reserved.
  6. //  This source code is licensed under the BSD-style license found in the
  7. //  LICENSE file in the root directory of this source tree. An additional grant
  8. //  of patent rights can be found in the PATENTS file in the same directory.
  9. //
  10.  
  11. #import <AsyncDisplayKit/ASBaseDefines.h>
  12.  
  13. /** The direction children are stacked in */
  14. typedef NS_ENUM(NSUInteger, ASStackLayoutDirection) {
  15.   /** Children are stacked vertically */
  16.   ASStackLayoutDirectionVertical,
  17.   /** Children are stacked horizontally */
  18.   ASStackLayoutDirectionHorizontal,
  19. };
  20.  
  21. /** If no children are flexible, how should this spec justify its children in the available space? */
  22. typedef NS_ENUM(NSUInteger, ASStackLayoutJustifyContent) {
  23.   /**
  24.    On overflow, children overflow out of this spec's bounds on the right/bottom side.
  25.    On underflow, children are left/top-aligned within this spec's bounds.
  26.    */
  27.   ASStackLayoutJustifyContentStart,
  28.   /**
  29.    On overflow, children are centered and overflow on both sides.
  30.    On underflow, children are centered within this spec's bounds in the stacking direction.
  31.    */
  32.   ASStackLayoutJustifyContentCenter,
  33.   /**
  34.    On overflow, children overflow out of this spec's bounds on the left/top side.
  35.    On underflow, children are right/bottom-aligned within this spec's bounds.
  36.    */
  37.   ASStackLayoutJustifyContentEnd,
  38.   /**
  39.    On overflow or if the stack has only 1 child, this value is identical to ASStackLayoutJustifyContentStart.
  40.    Otherwise, the starting edge of the first child is at the starting edge of the stack,
  41.    the ending edge of the last child is at the ending edge of the stack, and the remaining children
  42.    are distributed so that the spacing between any two adjacent ones is the same.
  43.    If there is a remaining space after spacing division, it is combined with the last spacing (i.e the one between the last 2 children).
  44.    */
  45.   ASStackLayoutJustifyContentSpaceBetween,
  46.   /**
  47.    On overflow or if the stack has only 1 child, this value is identical to ASStackLayoutJustifyContentCenter.
  48.    Otherwise, children are distributed such that the spacing between any two adjacent ones is the same,
  49.    and the spacing between the first/last child and the stack edges is half the size of the spacing between children.
  50.    If there is a remaining space after spacing division, it is combined with the last spacing (i.e the one between the last child and the stack ending edge).
  51.    */
  52.   ASStackLayoutJustifyContentSpaceAround
  53. };
  54.  
  55. /** Orientation of children along cross axis */
  56. typedef NS_ENUM(NSUInteger, ASStackLayoutAlignItems) {
  57.   /** Align children to start of cross axis */
  58.   ASStackLayoutAlignItemsStart,
  59.   /** Align children with end of cross axis */
  60.   ASStackLayoutAlignItemsEnd,
  61.   /** Center children on cross axis */
  62.   ASStackLayoutAlignItemsCenter,
  63.   /** Expand children to fill cross axis */
  64.   ASStackLayoutAlignItemsStretch,
  65.   /** Children align to their first baseline. Only available for horizontal stack spec */
  66.   ASStackLayoutAlignItemsBaselineFirst,
  67.   /** Children align to their last baseline. Only available for horizontal stack spec */
  68.   ASStackLayoutAlignItemsBaselineLast,
  69.   ASStackLayoutAlignItemsNotSet
  70. };
  71.  
  72. /**
  73.  Each child may override their parent stack's cross axis alignment.
  74.  @see ASStackLayoutAlignItems
  75.  */
  76. typedef NS_ENUM(NSUInteger, ASStackLayoutAlignSelf) {
  77.   /** Inherit alignment value from containing stack. */
  78.   ASStackLayoutAlignSelfAuto,
  79.   /** Align to start of cross axis */
  80.   ASStackLayoutAlignSelfStart,
  81.   /** Align with end of cross axis */
  82.   ASStackLayoutAlignSelfEnd,
  83.   /** Center on cross axis */
  84.   ASStackLayoutAlignSelfCenter,
  85.   /** Expand to fill cross axis */
  86.   ASStackLayoutAlignSelfStretch,
  87. };
  88.  
  89. /** Whether children are stacked into a single or multiple lines. */
  90. typedef NS_ENUM(NSUInteger, ASStackLayoutFlexWrap) {
  91.   ASStackLayoutFlexWrapNoWrap,
  92.   ASStackLayoutFlexWrapWrap,
  93. };
  94.  
  95. /** Orientation of lines along cross axis if there are multiple lines. */
  96. typedef NS_ENUM(NSUInteger, ASStackLayoutAlignContent) {
  97.   ASStackLayoutAlignContentStart,
  98.   ASStackLayoutAlignContentCenter,
  99.   ASStackLayoutAlignContentEnd,
  100.   ASStackLayoutAlignContentSpaceBetween,
  101.   ASStackLayoutAlignContentSpaceAround,
  102.   ASStackLayoutAlignContentStretch,
  103. };
  104.  
  105. /** Orientation of children along horizontal axis */
  106. typedef NS_ENUM(NSUInteger, ASHorizontalAlignment) {
  107.   /** No alignment specified. Default value */
  108.   ASHorizontalAlignmentNone,
  109.   /** Left aligned */
  110.   ASHorizontalAlignmentLeft,
  111.   /** Center aligned */
  112.   ASHorizontalAlignmentMiddle,
  113.   /** Right aligned */
  114.   ASHorizontalAlignmentRight,
  115.  
  116.   // After 2.0 has landed, we'll add ASDISPLAYNODE_DEPRECATED here - for now, avoid triggering errors for projects with -Werror
  117.   /** @deprecated Use ASHorizontalAlignmentLeft instead */
  118.   ASAlignmentLeft ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentLeft,
  119.   /** @deprecated Use ASHorizontalAlignmentMiddle instead */
  120.   ASAlignmentMiddle ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentMiddle,
  121.   /** @deprecated Use ASHorizontalAlignmentRight instead */
  122.   ASAlignmentRight ASDISPLAYNODE_DEPRECATED = ASHorizontalAlignmentRight,
  123. };
  124.  
  125. /** Orientation of children along vertical axis */
  126. typedef NS_ENUM(NSUInteger, ASVerticalAlignment) {
  127.   /** No alignment specified. Default value */
  128.   ASVerticalAlignmentNone,
  129.   /** Top aligned */
  130.   ASVerticalAlignmentTop,
  131.   /** Center aligned */
  132.   ASVerticalAlignmentCenter,
  133.   /** Bottom aligned */
  134.   ASVerticalAlignmentBottom,
  135.  
  136.   // After 2.0 has landed, we'll add ASDISPLAYNODE_DEPRECATED here - for now, avoid triggering errors for projects with -Werror
  137.   /** @deprecated Use ASVerticalAlignmentTop instead */
  138.   ASAlignmentTop ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentTop,
  139.   /** @deprecated Use ASVerticalAlignmentCenter instead */
  140.   ASAlignmentCenter ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentCenter,
  141.   /** @deprecated Use ASVerticalAlignmentBottom instead */
  142.   ASAlignmentBottom ASDISPLAYNODE_DEPRECATED = ASVerticalAlignmentBottom,
  143. };
  144.  
downloadASStackLayoutDefines.h Source code - Download AsyncDisplayKit Source code
Related Source Codes/Software:
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
parse-server - Parse-compatible API server module for Node/Expres... 2017-06-07
react-boilerplate - 2017-06-07
webtorrent - Streaming torrent client for the web ... 2017-06-06
ionicons - The premium icon font for Ionic ... 2017-06-07
storybook - 2017-06-07
prettier - Prettier is an opinionated JavaScript formatter. ... 2017-06-08
inferno - An extremely fast, React-like JavaScript library f... 2017-06-08
guetzli - Perceptual JPEG encoder 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top