Loading...
Searching...
No Matches
zone.h
Go to the documentation of this file.
1
7#pragma once
8#include <pebble.h>
9
10#include "ui/fonts.h"
11
16
38
47TextLayer *zone_make_layer(Layer *parent, const Zone *zone);
48
62void zone_set_text_fit(TextLayer *layer, const Zone *zone, const char *text);
63
Font registry. A face loads its custom fonts once, each under a small integer slot id,...
TextLayer * zone_make_layer(Layer *parent, const Zone *zone)
Creates a transparent text layer for a zone and attaches it to the parent layer.
Definition zone.c:9
uint8_t FontId
A font slot id. The face defines its slots as 0 to FONT_SLOTS_MAX-1 and the registry treats the id as...
Definition fonts.h:23
void zone_set_text_fit(TextLayer *layer, const Zone *zone, const char *text)
Sets a text layer's text, stepping down through the zone's font tiers to find one the text fits in.
Definition zone.c:42
Everything needed to present one text slot. Where it sits, and which registered font,...
Definition zone.h:26
FontId font_id_fallback
First smaller font to try when the text overflows the main one.
Definition zone.h:31
GRect rect
Area for the main font.
Definition zone.h:27
FontId font_id
The main font to try first.
Definition zone.h:28
GColor color
Text colour, used at every tier.
Definition zone.h:30
GRect rect_fallback
Area for the first smaller font.
Definition zone.h:32
GRect rect_fallback2
Area for the second smaller font. Leave it zero-sized to skip this step.
Definition zone.h:34
GRect rect_fallback3
Area for the third smaller font. Leave it zero-sized to skip this step.
Definition zone.h:36
FontId font_id_fallback3
Third smaller font for the widest strings of all.
Definition zone.h:35
GTextAlignment align
Text alignment, used at every tier.
Definition zone.h:29
FontId font_id_fallback2
Second smaller font for the widest strings.
Definition zone.h:33