42 lines
1.2 KiB
Protocol Buffer
42 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package widget;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
option go_package = "go.wit.com/lib/protobuf/widgetpb";
|
|
|
|
message Widget {
|
|
int32 id = 1; // Unique ID number for this widget
|
|
int32 parent = 2; // Unique ID number for the parent
|
|
google.protobuf.Timestamp last_updated = 3;
|
|
string ProgName = 4; // unique string used for programming and debugging
|
|
string label = 5; // the label
|
|
repeated string dropdown = 6; // a list of strings for the user to select from
|
|
|
|
enum WidgetType {
|
|
Window = 0; // in certain gui's (ncurses), these are tabs
|
|
Box = 1; // a vertical or horizontal stack of widgets
|
|
Grid = 2; // like drawers in a chest
|
|
Group = 3; // like the 'Appetizers' section on a menu
|
|
Button = 4;
|
|
Checkbox = 5; // select 'on' or 'off'
|
|
Dropdown = 6;
|
|
Combobox = 7; // dropdown with edit=true
|
|
Label = 8;
|
|
Slider = 9; // like a progress bar
|
|
Spinner = 10; // like setting the oven temperature
|
|
Separator = 11; // adds a visual break between things
|
|
}
|
|
|
|
message Range {
|
|
int32 Low = 1;
|
|
int32 High = 2;
|
|
}
|
|
}
|
|
|
|
// Our address book file is just one of these.
|
|
message AddressBook {
|
|
repeated Widget people = 1;
|
|
}
|