@@ -39,19 +39,23 @@ This is a simple compound widget that really just displays the 4 buttons of a
3939d-pad. To Add this to the studio we would need to define the class with the
4040metadata. Below are some of the supported metadata.
4141
42- +------------------+-----------------------+-----------------------------------------------------------+
43- | Metadata | default | Description |
44- +------------------+-----------------------+-----------------------------------------------------------+
45- | *display_name * | name of the meta class| The name used to refer to the widget within the studio |
46- +------------------+-----------------------+-----------------------------------------------------------+
47- | *impl * | the meta's super class| The custom widget class |
48- +------------------+-----------------------+-----------------------------------------------------------+
49- | *is_container * | False | whether the custom widget allows other widgets to be |
50- | | | placed within it. |
51- +------------------+-----------------------+-----------------------------------------------------------+
52- | *icon * | play | Text identifier to on of the built in icons to be used as |
53- | | | image identifier for the widget |
54- +------------------+-----------------------+-----------------------------------------------------------+
42+ +-------------------------+-----------------------+-----------------------------------------------------------+
43+ | Metadata | default | Description |
44+ +-------------------------+-----------------------+-----------------------------------------------------------+
45+ | *display_name * | name of the meta class| The name used to refer to the widget within the studio |
46+ +-------------------------+-----------------------+-----------------------------------------------------------+
47+ | *impl * | the meta's super class| The custom widget class |
48+ +-------------------------+-----------------------+-----------------------------------------------------------+
49+ | *is_container * | False | whether the custom widget allows other widgets to be |
50+ | | | placed within it. |
51+ +-------------------------+-----------------------+-----------------------------------------------------------+
52+ | *icon * | play | Text identifier to on of the built in icons to be used as |
53+ | | | image identifier for the widget |
54+ +-------------------------+-----------------------+-----------------------------------------------------------+
55+ | *initial_dimensions * | Automatic | The initial dimensions of the widget when first placed on |
56+ | | | the design pad provided as a (width, height) tuple |
57+ +-------------------------+-----------------------+-----------------------------------------------------------+
58+
5559
5660Each of the above metadata is optional and the default will be used if not its
5761not provided.
@@ -70,6 +74,7 @@ Below is a sample metadata class for a our D-pad widget
7074 impl = DPad
7175 icon = " gaming"
7276 is_container = False
77+ initial_dimensions = 90 , 100
7378
7479 Connecting to the studio
7580=========================
@@ -110,6 +115,7 @@ but that is not necessary. Only the metadata class is required to be in the file
110115 impl = DPad
111116 icon = " gaming"
112117 is_container = False
118+ initial_dimensions = 90 , 100
113119
114120 Our new custom widget should now be available in the components pane under
115121the ``custom `` group.
0 commit comments