diff options
| author | Jeff Carr <[email protected]> | 2025-09-14 09:36:07 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-14 09:36:07 -0500 |
| commit | ba36e04edf770f76258aabd159e36866c71bb63e (patch) | |
| tree | cb87382f5a2b3ac45dd05c6e4e6f6b18da6bcd45 | |
| parent | 6cfc61f4ad2d62a150a65c27e280807d96d3e8f4 (diff) | |
start working towards a common table Row() def
| -rw-r--r-- | table.proto | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/table.proto b/table.proto index ed7a1a8..15ff5a5 100644 --- a/table.proto +++ b/table.proto @@ -7,33 +7,61 @@ package gitpb; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp import "widget.proto"; // Import the well-known type for Timestamp +// +// this code was written this way to make it easy for me +// to originally implement and auto generate the needed code +// with autogenpb +// + +// experiments in various options. think about this more. + +message ColAttr { + enum VarType { + ANY = 0; + INT = 1; + STRING = 2; + TIME = 3; + DURATION = 4; + BYTES = 5; + } + int32 pad = 1; + int32 width = 2; + bool click = 3; + VarType type = 4; +} message StringCol { Widget header = 1; - repeated string vals = 2; - repeated Widget widgets = 3; + repeated Widget widgets = 2; + ColAttr attr = 3; + repeated string vals = 4; // deprecate } message ButtonCol { Widget header = 1; - repeated string vals = 2; - repeated Widget widgets = 3; + repeated Widget widgets = 2; + ColAttr attr = 3; + repeated string vals = 4; // deprecate } message IntCol { Widget header = 1; - repeated int64 vals = 2; - repeated Widget widgets = 3; + repeated Widget widgets = 2; + ColAttr attr = 3; + repeated int64 vals = 4; // deprecate } message TimeCol { Widget header = 1; - repeated google.protobuf.Timestamp vals = 2; - repeated Widget widgets = 3; + repeated Widget widgets = 2; + ColAttr attr = 3; + repeated google.protobuf.Timestamp vals = 4; // deprecate } message BoolCol { Widget header = 1; repeated Widget widgets = 2; + ColAttr attr = 3; + repeated bool vals = 4; // deprecate } message Table { // `autogenpb:marshal` @@ -47,6 +75,7 @@ message Table { // `autogenpb: repeated TimeCol timeCols = 8; repeated BoolCol boolCols = 9; repeated ButtonCol buttonCols = 10; + int64 height = 11; // the number of rows } message Tables { // `autogenpb:marshal` |
