Skip to content

cupertino-files / ConditionalStyleSet

Class: ConditionalStyleSet ​

Defined in: src/tst/conditional.ts:78

A rule set, as interned in the table's conditional-style table.

Constructors ​

Constructor ​

new ConditionalStyleSet(store, object, key): ConditionalStyleSet

Defined in: src/tst/conditional.ts:84

Parameters ​

store ​

ObjectStore

object ​

IwaObject

key ​

number

Returns ​

ConditionalStyleSet

Properties ​

key ​

readonly key: number

Defined in: src/tst/conditional.ts:82

Key in the owning table's conditional-style table.


object ​

readonly object: IwaObject

Defined in: src/tst/conditional.ts:80


store ​

readonly store: ObjectStore

Defined in: src/tst/conditional.ts:79

Accessors ​

declaredRuleCount ​

Get Signature ​

get declaredRuleCount(): number

Defined in: src/tst/conditional.ts:99

The count Apple records, which may exceed the rules actually stored: it counts the set as authored, and a rule whose style was deleted leaves the count behind. Compare against rules().length.

Returns ​

number


id ​

Get Signature ​

get id(): bigint

Defined in: src/tst/conditional.ts:90

Returns ​

bigint

Methods ​

describe() ​

describe(subject?): string[]

Defined in: src/tst/conditional.ts:152

Turn a rule set into lines a person can read.

Parameters ​

subject? ​
column ​

number

row ​

number

Returns ​

string[]


rules() ​

rules(subject?, extra?): ConditionalRule[]

Defined in: src/tst/conditional.ts:111

The rules, in evaluation order.

subject is the address the condition is being asked about, so a rule on B4 reads B4<0 rather than the generic marker. Omit it and rules render generically, which is right when describing the set itself rather than its effect on one cell.

Parameters ​

subject? ​
column ​

number

row ​

number

extra? ​

ReadPredicateOptions = {}

Returns ​

ConditionalRule[]

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.