witProtobuf/widget.proto

37 lines
1.1 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package guipb;
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;
}
}