Source/GGBTextLayer.h
changeset 6 af9b2b929b03
parent 1 3eb7be1dd7b6
child 8 45c82a071aca
     1.1 --- a/Source/GGBTextLayer.h	Mon Mar 10 17:30:57 2008 -0700
     1.2 +++ b/Source/GGBTextLayer.h	Wed Mar 12 15:51:32 2008 -0700
     1.3 @@ -13,13 +13,13 @@
     1.4  @interface GGBTextLayer : GGBLayer
     1.5  {
     1.6      NSString *_string;
     1.7 -    CGFloat _fontSize;
     1.8 +    UIFont *_font;
     1.9      CGColorRef _foregroundColor;
    1.10      NSString *_alignmentMode;
    1.11  }
    1.12  
    1.13  @property(copy) id string;
    1.14 -@property CGFloat fontSize;
    1.15 +@property (retain) UIFont *font;
    1.16  @property CGColorRef foregroundColor;
    1.17  @property (copy) NSString *alignmentMode;
    1.18  
    1.19 @@ -31,7 +31,38 @@
    1.20                                 withText: (NSString*)text
    1.21                                 fontSize: (float) fontSize
    1.22                                alignment: (enum CAAutoresizingMask) align;
    1.23 ++ (GGBTextLayer*) textLayerInSuperlayer: (CALayer*)superlayer
    1.24 +                               withText: (NSString*)text
    1.25 +                                   font: (id)inputFont
    1.26 +                              alignment: (enum CAAutoresizingMask) align;
    1.27  
    1.28  @end
    1.29  
    1.30  
    1.31 +#if TARGET_OS_ASPEN
    1.32 +/* Bit definitions for `autoresizingMask' property. */
    1.33 +
    1.34 +enum CAAutoresizingMask
    1.35 +{
    1.36 +    kCALayerNotSizable	= 0,
    1.37 +    kCALayerMinXMargin	= 1U << 0,
    1.38 +    kCALayerWidthSizable	= 1U << 1,
    1.39 +    kCALayerMaxXMargin	= 1U << 2,
    1.40 +    kCALayerMinYMargin	= 1U << 3,
    1.41 +    kCALayerHeightSizable	= 1U << 4,
    1.42 +    kCALayerMaxYMargin	= 1U << 5
    1.43 +};
    1.44 +
    1.45 +enum
    1.46 +{
    1.47 +    kCALayerBottomMargin = kCALayerMaxYMargin,
    1.48 +    kCALayerTopMargin    = kCALayerMinYMargin
    1.49 +};
    1.50 +
    1.51 +#else
    1.52 +enum
    1.53 +{
    1.54 +    kCALayerBottomMargin = kCALayerMinYMargin,
    1.55 +    kCALayerTopMargin    = kCALayerMaxYMargin
    1.56 +};
    1.57 +#endif