1from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
2import copy as _copy
3
4
5class Updatemenu(_BaseLayoutHierarchyType):
6
7    # class properties
8    # --------------------
9    _parent_path_str = "layout"
10    _path_str = "layout.updatemenu"
11    _valid_props = {
12        "active",
13        "bgcolor",
14        "bordercolor",
15        "borderwidth",
16        "buttondefaults",
17        "buttons",
18        "direction",
19        "font",
20        "name",
21        "pad",
22        "showactive",
23        "templateitemname",
24        "type",
25        "visible",
26        "x",
27        "xanchor",
28        "y",
29        "yanchor",
30    }
31
32    # active
33    # ------
34    @property
35    def active(self):
36        """
37        Determines which button (by index starting from 0) is
38        considered active.
39
40        The 'active' property is a integer and may be specified as:
41          - An int (or float that will be cast to an int)
42            in the interval [-1, 9223372036854775807]
43
44        Returns
45        -------
46        int
47        """
48        return self["active"]
49
50    @active.setter
51    def active(self, val):
52        self["active"] = val
53
54    # bgcolor
55    # -------
56    @property
57    def bgcolor(self):
58        """
59        Sets the background color of the update menu buttons.
60
61        The 'bgcolor' property is a color and may be specified as:
62          - A hex string (e.g. '#ff0000')
63          - An rgb/rgba string (e.g. 'rgb(255,0,0)')
64          - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
65          - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
66          - A named CSS color:
67                aliceblue, antiquewhite, aqua, aquamarine, azure,
68                beige, bisque, black, blanchedalmond, blue,
69                blueviolet, brown, burlywood, cadetblue,
70                chartreuse, chocolate, coral, cornflowerblue,
71                cornsilk, crimson, cyan, darkblue, darkcyan,
72                darkgoldenrod, darkgray, darkgrey, darkgreen,
73                darkkhaki, darkmagenta, darkolivegreen, darkorange,
74                darkorchid, darkred, darksalmon, darkseagreen,
75                darkslateblue, darkslategray, darkslategrey,
76                darkturquoise, darkviolet, deeppink, deepskyblue,
77                dimgray, dimgrey, dodgerblue, firebrick,
78                floralwhite, forestgreen, fuchsia, gainsboro,
79                ghostwhite, gold, goldenrod, gray, grey, green,
80                greenyellow, honeydew, hotpink, indianred, indigo,
81                ivory, khaki, lavender, lavenderblush, lawngreen,
82                lemonchiffon, lightblue, lightcoral, lightcyan,
83                lightgoldenrodyellow, lightgray, lightgrey,
84                lightgreen, lightpink, lightsalmon, lightseagreen,
85                lightskyblue, lightslategray, lightslategrey,
86                lightsteelblue, lightyellow, lime, limegreen,
87                linen, magenta, maroon, mediumaquamarine,
88                mediumblue, mediumorchid, mediumpurple,
89                mediumseagreen, mediumslateblue, mediumspringgreen,
90                mediumturquoise, mediumvioletred, midnightblue,
91                mintcream, mistyrose, moccasin, navajowhite, navy,
92                oldlace, olive, olivedrab, orange, orangered,
93                orchid, palegoldenrod, palegreen, paleturquoise,
94                palevioletred, papayawhip, peachpuff, peru, pink,
95                plum, powderblue, purple, red, rosybrown,
96                royalblue, rebeccapurple, saddlebrown, salmon,
97                sandybrown, seagreen, seashell, sienna, silver,
98                skyblue, slateblue, slategray, slategrey, snow,
99                springgreen, steelblue, tan, teal, thistle, tomato,
100                turquoise, violet, wheat, white, whitesmoke,
101                yellow, yellowgreen
102
103        Returns
104        -------
105        str
106        """
107        return self["bgcolor"]
108
109    @bgcolor.setter
110    def bgcolor(self, val):
111        self["bgcolor"] = val
112
113    # bordercolor
114    # -----------
115    @property
116    def bordercolor(self):
117        """
118        Sets the color of the border enclosing the update menu.
119
120        The 'bordercolor' property is a color and may be specified as:
121          - A hex string (e.g. '#ff0000')
122          - An rgb/rgba string (e.g. 'rgb(255,0,0)')
123          - An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
124          - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
125          - A named CSS color:
126                aliceblue, antiquewhite, aqua, aquamarine, azure,
127                beige, bisque, black, blanchedalmond, blue,
128                blueviolet, brown, burlywood, cadetblue,
129                chartreuse, chocolate, coral, cornflowerblue,
130                cornsilk, crimson, cyan, darkblue, darkcyan,
131                darkgoldenrod, darkgray, darkgrey, darkgreen,
132                darkkhaki, darkmagenta, darkolivegreen, darkorange,
133                darkorchid, darkred, darksalmon, darkseagreen,
134                darkslateblue, darkslategray, darkslategrey,
135                darkturquoise, darkviolet, deeppink, deepskyblue,
136                dimgray, dimgrey, dodgerblue, firebrick,
137                floralwhite, forestgreen, fuchsia, gainsboro,
138                ghostwhite, gold, goldenrod, gray, grey, green,
139                greenyellow, honeydew, hotpink, indianred, indigo,
140                ivory, khaki, lavender, lavenderblush, lawngreen,
141                lemonchiffon, lightblue, lightcoral, lightcyan,
142                lightgoldenrodyellow, lightgray, lightgrey,
143                lightgreen, lightpink, lightsalmon, lightseagreen,
144                lightskyblue, lightslategray, lightslategrey,
145                lightsteelblue, lightyellow, lime, limegreen,
146                linen, magenta, maroon, mediumaquamarine,
147                mediumblue, mediumorchid, mediumpurple,
148                mediumseagreen, mediumslateblue, mediumspringgreen,
149                mediumturquoise, mediumvioletred, midnightblue,
150                mintcream, mistyrose, moccasin, navajowhite, navy,
151                oldlace, olive, olivedrab, orange, orangered,
152                orchid, palegoldenrod, palegreen, paleturquoise,
153                palevioletred, papayawhip, peachpuff, peru, pink,
154                plum, powderblue, purple, red, rosybrown,
155                royalblue, rebeccapurple, saddlebrown, salmon,
156                sandybrown, seagreen, seashell, sienna, silver,
157                skyblue, slateblue, slategray, slategrey, snow,
158                springgreen, steelblue, tan, teal, thistle, tomato,
159                turquoise, violet, wheat, white, whitesmoke,
160                yellow, yellowgreen
161
162        Returns
163        -------
164        str
165        """
166        return self["bordercolor"]
167
168    @bordercolor.setter
169    def bordercolor(self, val):
170        self["bordercolor"] = val
171
172    # borderwidth
173    # -----------
174    @property
175    def borderwidth(self):
176        """
177        Sets the width (in px) of the border enclosing the update menu.
178
179        The 'borderwidth' property is a number and may be specified as:
180          - An int or float in the interval [0, inf]
181
182        Returns
183        -------
184        int|float
185        """
186        return self["borderwidth"]
187
188    @borderwidth.setter
189    def borderwidth(self, val):
190        self["borderwidth"] = val
191
192    # buttons
193    # -------
194    @property
195    def buttons(self):
196        """
197        The 'buttons' property is a tuple of instances of
198        Button that may be specified as:
199          - A list or tuple of instances of plotly.graph_objs.layout.updatemenu.Button
200          - A list or tuple of dicts of string/value properties that
201            will be passed to the Button constructor
202
203            Supported dict properties:
204
205                args
206                    Sets the arguments values to be passed to the
207                    Plotly method set in `method` on click.
208                args2
209                    Sets a 2nd set of `args`, these arguments
210                    values are passed to the Plotly method set in
211                    `method` when clicking this button while in the
212                    active state. Use this to create toggle
213                    buttons.
214                execute
215                    When true, the API method is executed. When
216                    false, all other behaviors are the same and
217                    command execution is skipped. This may be
218                    useful when hooking into, for example, the
219                    `plotly_buttonclicked` method and executing the
220                    API command manually without losing the benefit
221                    of the updatemenu automatically binding to the
222                    state of the plot through the specification of
223                    `method` and `args`.
224                label
225                    Sets the text label to appear on the button.
226                method
227                    Sets the Plotly method to be called on click.
228                    If the `skip` method is used, the API
229                    updatemenu will function as normal but will
230                    perform no API calls and will not bind
231                    automatically to state updates. This may be
232                    used to create a component interface and attach
233                    to updatemenu events manually via JavaScript.
234                name
235                    When used in a template, named items are
236                    created in the output figure in addition to any
237                    items the figure already has in this array. You
238                    can modify these items in the output figure by
239                    making your own item with `templateitemname`
240                    matching this `name` alongside your
241                    modifications (including `visible: false` or
242                    `enabled: false` to hide it). Has no effect
243                    outside of a template.
244                templateitemname
245                    Used to refer to a named item in this array in
246                    the template. Named items from the template
247                    will be created even without a matching item in
248                    the input figure, but you can modify one by
249                    making an item with `templateitemname` matching
250                    its `name`, alongside your modifications
251                    (including `visible: false` or `enabled: false`
252                    to hide it). If there is no template or no
253                    matching item, this item will be hidden unless
254                    you explicitly show it with `visible: true`.
255                visible
256                    Determines whether or not this button is
257                    visible.
258
259        Returns
260        -------
261        tuple[plotly.graph_objs.layout.updatemenu.Button]
262        """
263        return self["buttons"]
264
265    @buttons.setter
266    def buttons(self, val):
267        self["buttons"] = val
268
269    # buttondefaults
270    # --------------
271    @property
272    def buttondefaults(self):
273        """
274        When used in a template (as
275        layout.template.layout.updatemenu.buttondefaults), sets the
276        default property values to use for elements of
277        layout.updatemenu.buttons
278
279        The 'buttondefaults' property is an instance of Button
280        that may be specified as:
281          - An instance of :class:`plotly.graph_objs.layout.updatemenu.Button`
282          - A dict of string/value properties that will be passed
283            to the Button constructor
284
285            Supported dict properties:
286
287        Returns
288        -------
289        plotly.graph_objs.layout.updatemenu.Button
290        """
291        return self["buttondefaults"]
292
293    @buttondefaults.setter
294    def buttondefaults(self, val):
295        self["buttondefaults"] = val
296
297    # direction
298    # ---------
299    @property
300    def direction(self):
301        """
302        Determines the direction in which the buttons are laid out,
303        whether in a dropdown menu or a row/column of buttons. For
304        `left` and `up`, the buttons will still appear in left-to-right
305        or top-to-bottom order respectively.
306
307        The 'direction' property is an enumeration that may be specified as:
308          - One of the following enumeration values:
309                ['left', 'right', 'up', 'down']
310
311        Returns
312        -------
313        Any
314        """
315        return self["direction"]
316
317    @direction.setter
318    def direction(self, val):
319        self["direction"] = val
320
321    # font
322    # ----
323    @property
324    def font(self):
325        """
326        Sets the font of the update menu button text.
327
328        The 'font' property is an instance of Font
329        that may be specified as:
330          - An instance of :class:`plotly.graph_objs.layout.updatemenu.Font`
331          - A dict of string/value properties that will be passed
332            to the Font constructor
333
334            Supported dict properties:
335
336                color
337
338                family
339                    HTML font family - the typeface that will be
340                    applied by the web browser. The web browser
341                    will only be able to apply a font if it is
342                    available on the system which it operates.
343                    Provide multiple font families, separated by
344                    commas, to indicate the preference in which to
345                    apply fonts if they aren't available on the
346                    system. The Chart Studio Cloud (at
347                    https://chart-studio.plotly.com or on-premise)
348                    generates images on a server, where only a
349                    select number of fonts are installed and
350                    supported. These include "Arial", "Balto",
351                    "Courier New", "Droid Sans",, "Droid Serif",
352                    "Droid Sans Mono", "Gravitas One", "Old
353                    Standard TT", "Open Sans", "Overpass", "PT Sans
354                    Narrow", "Raleway", "Times New Roman".
355                size
356
357        Returns
358        -------
359        plotly.graph_objs.layout.updatemenu.Font
360        """
361        return self["font"]
362
363    @font.setter
364    def font(self, val):
365        self["font"] = val
366
367    # name
368    # ----
369    @property
370    def name(self):
371        """
372        When used in a template, named items are created in the output
373        figure in addition to any items the figure already has in this
374        array. You can modify these items in the output figure by
375        making your own item with `templateitemname` matching this
376        `name` alongside your modifications (including `visible: false`
377        or `enabled: false` to hide it). Has no effect outside of a
378        template.
379
380        The 'name' property is a string and must be specified as:
381          - A string
382          - A number that will be converted to a string
383
384        Returns
385        -------
386        str
387        """
388        return self["name"]
389
390    @name.setter
391    def name(self, val):
392        self["name"] = val
393
394    # pad
395    # ---
396    @property
397    def pad(self):
398        """
399        Sets the padding around the buttons or dropdown menu.
400
401        The 'pad' property is an instance of Pad
402        that may be specified as:
403          - An instance of :class:`plotly.graph_objs.layout.updatemenu.Pad`
404          - A dict of string/value properties that will be passed
405            to the Pad constructor
406
407            Supported dict properties:
408
409                b
410                    The amount of padding (in px) along the bottom
411                    of the component.
412                l
413                    The amount of padding (in px) on the left side
414                    of the component.
415                r
416                    The amount of padding (in px) on the right side
417                    of the component.
418                t
419                    The amount of padding (in px) along the top of
420                    the component.
421
422        Returns
423        -------
424        plotly.graph_objs.layout.updatemenu.Pad
425        """
426        return self["pad"]
427
428    @pad.setter
429    def pad(self, val):
430        self["pad"] = val
431
432    # showactive
433    # ----------
434    @property
435    def showactive(self):
436        """
437        Highlights active dropdown item or active button if true.
438
439        The 'showactive' property must be specified as a bool
440        (either True, or False)
441
442        Returns
443        -------
444        bool
445        """
446        return self["showactive"]
447
448    @showactive.setter
449    def showactive(self, val):
450        self["showactive"] = val
451
452    # templateitemname
453    # ----------------
454    @property
455    def templateitemname(self):
456        """
457        Used to refer to a named item in this array in the template.
458        Named items from the template will be created even without a
459        matching item in the input figure, but you can modify one by
460        making an item with `templateitemname` matching its `name`,
461        alongside your modifications (including `visible: false` or
462        `enabled: false` to hide it). If there is no template or no
463        matching item, this item will be hidden unless you explicitly
464        show it with `visible: true`.
465
466        The 'templateitemname' property is a string and must be specified as:
467          - A string
468          - A number that will be converted to a string
469
470        Returns
471        -------
472        str
473        """
474        return self["templateitemname"]
475
476    @templateitemname.setter
477    def templateitemname(self, val):
478        self["templateitemname"] = val
479
480    # type
481    # ----
482    @property
483    def type(self):
484        """
485        Determines whether the buttons are accessible via a dropdown
486        menu or whether the buttons are stacked horizontally or
487        vertically
488
489        The 'type' property is an enumeration that may be specified as:
490          - One of the following enumeration values:
491                ['dropdown', 'buttons']
492
493        Returns
494        -------
495        Any
496        """
497        return self["type"]
498
499    @type.setter
500    def type(self, val):
501        self["type"] = val
502
503    # visible
504    # -------
505    @property
506    def visible(self):
507        """
508        Determines whether or not the update menu is visible.
509
510        The 'visible' property must be specified as a bool
511        (either True, or False)
512
513        Returns
514        -------
515        bool
516        """
517        return self["visible"]
518
519    @visible.setter
520    def visible(self, val):
521        self["visible"] = val
522
523    # x
524    # -
525    @property
526    def x(self):
527        """
528        Sets the x position (in normalized coordinates) of the update
529        menu.
530
531        The 'x' property is a number and may be specified as:
532          - An int or float in the interval [-2, 3]
533
534        Returns
535        -------
536        int|float
537        """
538        return self["x"]
539
540    @x.setter
541    def x(self, val):
542        self["x"] = val
543
544    # xanchor
545    # -------
546    @property
547    def xanchor(self):
548        """
549        Sets the update menu's horizontal position anchor. This anchor
550        binds the `x` position to the "left", "center" or "right" of
551        the range selector.
552
553        The 'xanchor' property is an enumeration that may be specified as:
554          - One of the following enumeration values:
555                ['auto', 'left', 'center', 'right']
556
557        Returns
558        -------
559        Any
560        """
561        return self["xanchor"]
562
563    @xanchor.setter
564    def xanchor(self, val):
565        self["xanchor"] = val
566
567    # y
568    # -
569    @property
570    def y(self):
571        """
572        Sets the y position (in normalized coordinates) of the update
573        menu.
574
575        The 'y' property is a number and may be specified as:
576          - An int or float in the interval [-2, 3]
577
578        Returns
579        -------
580        int|float
581        """
582        return self["y"]
583
584    @y.setter
585    def y(self, val):
586        self["y"] = val
587
588    # yanchor
589    # -------
590    @property
591    def yanchor(self):
592        """
593        Sets the update menu's vertical position anchor This anchor
594        binds the `y` position to the "top", "middle" or "bottom" of
595        the range selector.
596
597        The 'yanchor' property is an enumeration that may be specified as:
598          - One of the following enumeration values:
599                ['auto', 'top', 'middle', 'bottom']
600
601        Returns
602        -------
603        Any
604        """
605        return self["yanchor"]
606
607    @yanchor.setter
608    def yanchor(self, val):
609        self["yanchor"] = val
610
611    # Self properties description
612    # ---------------------------
613    @property
614    def _prop_descriptions(self):
615        return """\
616        active
617            Determines which button (by index starting from 0) is
618            considered active.
619        bgcolor
620            Sets the background color of the update menu buttons.
621        bordercolor
622            Sets the color of the border enclosing the update menu.
623        borderwidth
624            Sets the width (in px) of the border enclosing the
625            update menu.
626        buttons
627            A tuple of
628            :class:`plotly.graph_objects.layout.updatemenu.Button`
629            instances or dicts with compatible properties
630        buttondefaults
631            When used in a template (as
632            layout.template.layout.updatemenu.buttondefaults), sets
633            the default property values to use for elements of
634            layout.updatemenu.buttons
635        direction
636            Determines the direction in which the buttons are laid
637            out, whether in a dropdown menu or a row/column of
638            buttons. For `left` and `up`, the buttons will still
639            appear in left-to-right or top-to-bottom order
640            respectively.
641        font
642            Sets the font of the update menu button text.
643        name
644            When used in a template, named items are created in the
645            output figure in addition to any items the figure
646            already has in this array. You can modify these items
647            in the output figure by making your own item with
648            `templateitemname` matching this `name` alongside your
649            modifications (including `visible: false` or `enabled:
650            false` to hide it). Has no effect outside of a
651            template.
652        pad
653            Sets the padding around the buttons or dropdown menu.
654        showactive
655            Highlights active dropdown item or active button if
656            true.
657        templateitemname
658            Used to refer to a named item in this array in the
659            template. Named items from the template will be created
660            even without a matching item in the input figure, but
661            you can modify one by making an item with
662            `templateitemname` matching its `name`, alongside your
663            modifications (including `visible: false` or `enabled:
664            false` to hide it). If there is no template or no
665            matching item, this item will be hidden unless you
666            explicitly show it with `visible: true`.
667        type
668            Determines whether the buttons are accessible via a
669            dropdown menu or whether the buttons are stacked
670            horizontally or vertically
671        visible
672            Determines whether or not the update menu is visible.
673        x
674            Sets the x position (in normalized coordinates) of the
675            update menu.
676        xanchor
677            Sets the update menu's horizontal position anchor. This
678            anchor binds the `x` position to the "left", "center"
679            or "right" of the range selector.
680        y
681            Sets the y position (in normalized coordinates) of the
682            update menu.
683        yanchor
684            Sets the update menu's vertical position anchor This
685            anchor binds the `y` position to the "top", "middle" or
686            "bottom" of the range selector.
687        """
688
689    def __init__(
690        self,
691        arg=None,
692        active=None,
693        bgcolor=None,
694        bordercolor=None,
695        borderwidth=None,
696        buttons=None,
697        buttondefaults=None,
698        direction=None,
699        font=None,
700        name=None,
701        pad=None,
702        showactive=None,
703        templateitemname=None,
704        type=None,
705        visible=None,
706        x=None,
707        xanchor=None,
708        y=None,
709        yanchor=None,
710        **kwargs
711    ):
712        """
713        Construct a new Updatemenu object
714
715        Parameters
716        ----------
717        arg
718            dict of properties compatible with this constructor or
719            an instance of
720            :class:`plotly.graph_objs.layout.Updatemenu`
721        active
722            Determines which button (by index starting from 0) is
723            considered active.
724        bgcolor
725            Sets the background color of the update menu buttons.
726        bordercolor
727            Sets the color of the border enclosing the update menu.
728        borderwidth
729            Sets the width (in px) of the border enclosing the
730            update menu.
731        buttons
732            A tuple of
733            :class:`plotly.graph_objects.layout.updatemenu.Button`
734            instances or dicts with compatible properties
735        buttondefaults
736            When used in a template (as
737            layout.template.layout.updatemenu.buttondefaults), sets
738            the default property values to use for elements of
739            layout.updatemenu.buttons
740        direction
741            Determines the direction in which the buttons are laid
742            out, whether in a dropdown menu or a row/column of
743            buttons. For `left` and `up`, the buttons will still
744            appear in left-to-right or top-to-bottom order
745            respectively.
746        font
747            Sets the font of the update menu button text.
748        name
749            When used in a template, named items are created in the
750            output figure in addition to any items the figure
751            already has in this array. You can modify these items
752            in the output figure by making your own item with
753            `templateitemname` matching this `name` alongside your
754            modifications (including `visible: false` or `enabled:
755            false` to hide it). Has no effect outside of a
756            template.
757        pad
758            Sets the padding around the buttons or dropdown menu.
759        showactive
760            Highlights active dropdown item or active button if
761            true.
762        templateitemname
763            Used to refer to a named item in this array in the
764            template. Named items from the template will be created
765            even without a matching item in the input figure, but
766            you can modify one by making an item with
767            `templateitemname` matching its `name`, alongside your
768            modifications (including `visible: false` or `enabled:
769            false` to hide it). If there is no template or no
770            matching item, this item will be hidden unless you
771            explicitly show it with `visible: true`.
772        type
773            Determines whether the buttons are accessible via a
774            dropdown menu or whether the buttons are stacked
775            horizontally or vertically
776        visible
777            Determines whether or not the update menu is visible.
778        x
779            Sets the x position (in normalized coordinates) of the
780            update menu.
781        xanchor
782            Sets the update menu's horizontal position anchor. This
783            anchor binds the `x` position to the "left", "center"
784            or "right" of the range selector.
785        y
786            Sets the y position (in normalized coordinates) of the
787            update menu.
788        yanchor
789            Sets the update menu's vertical position anchor This
790            anchor binds the `y` position to the "top", "middle" or
791            "bottom" of the range selector.
792
793        Returns
794        -------
795        Updatemenu
796        """
797        super(Updatemenu, self).__init__("updatemenus")
798
799        if "_parent" in kwargs:
800            self._parent = kwargs["_parent"]
801            return
802
803        # Validate arg
804        # ------------
805        if arg is None:
806            arg = {}
807        elif isinstance(arg, self.__class__):
808            arg = arg.to_plotly_json()
809        elif isinstance(arg, dict):
810            arg = _copy.copy(arg)
811        else:
812            raise ValueError(
813                """\
814The first argument to the plotly.graph_objs.layout.Updatemenu
815constructor must be a dict or
816an instance of :class:`plotly.graph_objs.layout.Updatemenu`"""
817            )
818
819        # Handle skip_invalid
820        # -------------------
821        self._skip_invalid = kwargs.pop("skip_invalid", False)
822        self._validate = kwargs.pop("_validate", True)
823
824        # Populate data dict with properties
825        # ----------------------------------
826        _v = arg.pop("active", None)
827        _v = active if active is not None else _v
828        if _v is not None:
829            self["active"] = _v
830        _v = arg.pop("bgcolor", None)
831        _v = bgcolor if bgcolor is not None else _v
832        if _v is not None:
833            self["bgcolor"] = _v
834        _v = arg.pop("bordercolor", None)
835        _v = bordercolor if bordercolor is not None else _v
836        if _v is not None:
837            self["bordercolor"] = _v
838        _v = arg.pop("borderwidth", None)
839        _v = borderwidth if borderwidth is not None else _v
840        if _v is not None:
841            self["borderwidth"] = _v
842        _v = arg.pop("buttons", None)
843        _v = buttons if buttons is not None else _v
844        if _v is not None:
845            self["buttons"] = _v
846        _v = arg.pop("buttondefaults", None)
847        _v = buttondefaults if buttondefaults is not None else _v
848        if _v is not None:
849            self["buttondefaults"] = _v
850        _v = arg.pop("direction", None)
851        _v = direction if direction is not None else _v
852        if _v is not None:
853            self["direction"] = _v
854        _v = arg.pop("font", None)
855        _v = font if font is not None else _v
856        if _v is not None:
857            self["font"] = _v
858        _v = arg.pop("name", None)
859        _v = name if name is not None else _v
860        if _v is not None:
861            self["name"] = _v
862        _v = arg.pop("pad", None)
863        _v = pad if pad is not None else _v
864        if _v is not None:
865            self["pad"] = _v
866        _v = arg.pop("showactive", None)
867        _v = showactive if showactive is not None else _v
868        if _v is not None:
869            self["showactive"] = _v
870        _v = arg.pop("templateitemname", None)
871        _v = templateitemname if templateitemname is not None else _v
872        if _v is not None:
873            self["templateitemname"] = _v
874        _v = arg.pop("type", None)
875        _v = type if type is not None else _v
876        if _v is not None:
877            self["type"] = _v
878        _v = arg.pop("visible", None)
879        _v = visible if visible is not None else _v
880        if _v is not None:
881            self["visible"] = _v
882        _v = arg.pop("x", None)
883        _v = x if x is not None else _v
884        if _v is not None:
885            self["x"] = _v
886        _v = arg.pop("xanchor", None)
887        _v = xanchor if xanchor is not None else _v
888        if _v is not None:
889            self["xanchor"] = _v
890        _v = arg.pop("y", None)
891        _v = y if y is not None else _v
892        if _v is not None:
893            self["y"] = _v
894        _v = arg.pop("yanchor", None)
895        _v = yanchor if yanchor is not None else _v
896        if _v is not None:
897            self["yanchor"] = _v
898
899        # Process unknown kwargs
900        # ----------------------
901        self._process_kwargs(**dict(arg, **kwargs))
902
903        # Reset skip_invalid
904        # ------------------
905        self._skip_invalid = False
906