# lv_buttonmatrix.h (/api/widgets/buttonmatrix/lv_buttonmatrix_h)



<RelatedHeaders name="lv_buttonmatrix_private.h" isPrivate="false" />

<ApiSummary functions="15" enums="2" typedefs="1" macros="1" variables="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (7)&#x22;,&#x22;Getters (4)&#x22;,&#x22;Other (4)&#x22;]">
  <ApiTab value="Setters (7)">
    <ApiMember kind="function" name="lv_buttonmatrix_set_map" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="101" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L101">
      lv_buttonmatrix_set_map [#lv_buttonmatrix_set_map]

      Set a new map. Buttons will be created/deleted according to the map. The button matrix keeps a reference to the map and so the string array must not be deallocated during the life of the matrix.

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_map(lv_obj_t *obj, const char *const map[])
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                                                                           |
      | ----- | ------------------------------------------------ | ------------------------------------------------------------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a button matrix object                                                     |
      | `map` | `const char *const`                              | pointer a string array. The last string has to be: "". Use "\n" to make a line break. |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_ctrl_map" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="115" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L115">
      lv_buttonmatrix_set_ctrl_map [#lv_buttonmatrix_set_ctrl_map]

      Set the button control map (hidden, disabled etc.) for a button matrix. The control map array will be copied and so may be deallocated after this function returns.

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[])
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name       | Type                                                                             | Description                                                                                                                                                                                                                                                                   |                                    |                                       |
      | ---------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------- |
      | `obj`      | <ApiLink name="lv_obj_t" display="lv_obj_t *" />                                 | pointer to a button matrix object                                                                                                                                                                                                                                             |                                    |                                       |
      | `ctrl_map` | <ApiLink name="lv_buttonmatrix_ctrl_t" display="const lv_buttonmatrix_ctrl_t" /> | pointer to an array of `lv_button_ctrl_t` control bytes. The length of the array and position of the elements must match the number and order of the individual buttons (i.e. excludes newline entries). An element of the map should look like e.g.: \`ctrl\_map\[0] = width | LV\_BUTTONMATRIX\_CTRL\_NO\_REPEAT | LV\_BUTTONMATRIX\_CTRL\_TGL\_ENABLE\` |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_selected_button" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="122" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L122">
      lv_buttonmatrix_set_selected_button [#lv_buttonmatrix_set_selected_button]

      Set the selected buttons

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_selected_button(lv_obj_t *obj, uint32_t btn_id)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                     |
      | -------- | ------------------------------------------------ | --------------------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to button matrix object                                 |
      | `btn_id` | <ApiLink name="uint32_t" />                      | 0 based index of the button to modify. (Not counting new lines) |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_button_ctrl" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="130" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L130">
      lv_buttonmatrix_set_button_ctrl [#lv_buttonmatrix_set_button_ctrl]

      Set the attributes of a button of the button matrix

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                     |                                     |
      | -------- | ------------------------------------------------ | --------------------------------------------------------------- | ----------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to button matrix object                                 |                                     |
      | `btn_id` | <ApiLink name="uint32_t" />                      | 0 based index of the button to modify. (Not counting new lines) |                                     |
      | `ctrl`   | <ApiLink name="lv_buttonmatrix_ctrl_t" />        | OR-ed attributes. E.g. \`LV\_BUTTONMATRIX\_CTRL\_NO\_REPEAT     | LV\_BUTTONMATRIX\_CTRL\_CHECKABLE\` |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_button_ctrl_all" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="145" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L145">
      lv_buttonmatrix_set_button_ctrl_all [#lv_buttonmatrix_set_button_ctrl_all]

      Set attributes of all buttons of a button matrix

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                                            |
      | ------ | ------------------------------------------------ | ---------------------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a button matrix object                                      |
      | `ctrl` | <ApiLink name="lv_buttonmatrix_ctrl_t" />        | attribute(s) to set from `lv_buttonmatrix_ctrl_t`. Values can be ORed. |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_button_width" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="163" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L163">
      lv_buttonmatrix_set_button_width [#lv_buttonmatrix_set_button_width]

      Set a single button's relative width. This method will cause the matrix be regenerated and is a relatively expensive operation. It is recommended that initial width be specified using `lv_buttonmatrix_set_ctrl_map` and this method only be used for dynamic changes.

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_button_width(lv_obj_t *obj, uint32_t btn_id, uint32_t width)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                      |
      | -------- | ------------------------------------------------ | ---------------------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to button matrix object                                  |
      | `btn_id` | <ApiLink name="uint32_t" />                      | 0 based index of the button to modify.                           |
      | `width`  | <ApiLink name="uint32_t" />                      | relative width compared to the buttons in the same row. \[1..15] |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_set_one_checked" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="172" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L172">
      lv_buttonmatrix_set_one_checked [#lv_buttonmatrix_set_one_checked]

      Make the button matrix like a selector widget (only one button may be checked at a time). `LV_BUTTONMATRIX_CTRL_CHECKABLE` must be enabled on the buttons to be selected using `lv_buttonmatrix_set_ctrl()` or <ApiLink name="lv_buttonmatrix_set_button_ctrl_all" display="lv_buttonmatrix_set_button_ctrl_all()" />.

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_set_one_checked(lv_obj_t *obj, bool en)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                         |
      | ----- | ------------------------------------------------ | ----------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a button matrix object   |
      | `en`  | <ApiLink name="bool" />                          | whether "one check" mode is enabled |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (4)">
    <ApiMember kind="function" name="lv_buttonmatrix_get_map" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="183" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L183">
      lv_buttonmatrix_get_map [#lv_buttonmatrix_get_map]

      Get the current map of a button matrix

      ```c title=" " lineNumbers=1
      const char *const  * lv_buttonmatrix_get_map(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                       |
      | ----- | ------------------------------------------------------ | --------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to a button matrix object |

      **Returns:** `const char *const *` — the current map
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_get_selected_button" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="191" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L191">
      lv_buttonmatrix_get_selected_button [#lv_buttonmatrix_get_selected_button]

      Get the index of the lastly "activated" button by the user (pressed, released, focused etc) Useful in the `event_cb` to get the text of the button, check if hidden etc.

      ```c title=" " lineNumbers=1
      uint32_t lv_buttonmatrix_get_selected_button(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description                     |
      | ----- | ------------------------------------------------------ | ------------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to button matrix object |

      **Returns:** <ApiLink name="uint32_t" /> — index of the last released button (LV\_BUTTONMATRIX\_BUTTON\_NONE: if unset)
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_get_button_text" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="199" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L199">
      lv_buttonmatrix_get_button_text [#lv_buttonmatrix_get_button_text]

      Get the button's text

      ```c title=" " lineNumbers=1
      const char * lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                   | Description                                          |
      | -------- | ------------------------------------------------------ | ---------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | pointer to button matrix object                      |
      | `btn_id` | <ApiLink name="uint32_t" />                            | the index a button not counting new line characters. |

      **Returns:** `const char *` — text of btn\_index\` button
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_get_one_checked" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="215" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L215">
      lv_buttonmatrix_get_one_checked [#lv_buttonmatrix_get_one_checked]

      Tell whether "one check" mode is enabled or not.

      ```c title=" " lineNumbers=1
      bool lv_buttonmatrix_get_one_checked(const lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                   | Description          |
      | ----- | ------------------------------------------------------ | -------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="const lv_obj_t *" /> | Button matrix object |

      **Returns:** <ApiLink name="bool" /> — true: "one check" mode is enabled; false: disabled
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (4)">
    <ApiMember kind="function" name="lv_buttonmatrix_create" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="88" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L88">
      lv_buttonmatrix_create [#lv_buttonmatrix_create]

      Create a button matrix object

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_buttonmatrix_create(lv_obj_t *parent)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                          |
      | -------- | ------------------------------------------------ | -------------------------------------------------------------------- |
      | `parent` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to an object, it will be the parent of the new button matrix |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to the created button matrix
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_clear_button_ctrl" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="138" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L138">
      lv_buttonmatrix_clear_button_ctrl [#lv_buttonmatrix_clear_button_ctrl]

      Clear the attributes of a button of the button matrix

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_clear_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                                     |                                     |
      | -------- | ------------------------------------------------ | --------------------------------------------------------------- | ----------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to button matrix object                                 |                                     |
      | `btn_id` | <ApiLink name="uint32_t" />                      | 0 based index of the button to modify. (Not counting new lines) |                                     |
      | `ctrl`   | <ApiLink name="lv_buttonmatrix_ctrl_t" />        | OR-ed attributes. E.g. \`LV\_BUTTONMATRIX\_CTRL\_NO\_REPEAT     | LV\_BUTTONMATRIX\_CTRL\_CHECKABLE\` |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_clear_button_ctrl_all" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="152" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L152">
      lv_buttonmatrix_clear_button_ctrl_all [#lv_buttonmatrix_clear_button_ctrl_all]

      Clear the attributes of all buttons of a button matrix

      ```c title=" " lineNumbers=1
      void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description                                                            |
      | ------ | ------------------------------------------------ | ---------------------------------------------------------------------- |
      | `obj`  | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a button matrix object                                      |
      | `ctrl` | <ApiLink name="lv_buttonmatrix_ctrl_t" />        | attribute(s) to set from `lv_buttonmatrix_ctrl_t`. Values can be ORed. |
    </ApiMember>

    <ApiMember kind="function" name="lv_buttonmatrix_has_button_ctrl" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="208" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L208">
      lv_buttonmatrix_has_button_ctrl [#lv_buttonmatrix_has_button_ctrl]

      Get the whether a control value is enabled or disabled for button of a button matrix

      ```c title=" " lineNumbers=1
      bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                             | Description                                             |
      | -------- | ------------------------------------------------ | ------------------------------------------------------- |
      | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a button matrix object                       |
      | `btn_id` | <ApiLink name="uint32_t" />                      | the index of a button not counting new line characters. |
      | `ctrl`   | <ApiLink name="lv_buttonmatrix_ctrl_t" />        | control values to check (ORed value can be used)        |

      **Returns:** <ApiLink name="bool" /> — true: the control attribute is enabled false: disabled
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_buttonmatrix_ctrl_t" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="35" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L35">
  lv_buttonmatrix_ctrl_t [#lv_buttonmatrix_ctrl_t]

  Type to store button control flags (disabled, hidden etc.) The least-significant 4 bits are used to store button-width proportions in range \[1..15].

  | Name                              | Value    | Description                                                                                       |
  | --------------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
  | `LV_BUTTONMATRIX_CTRL_NONE`       | `0x0000` | No extra control, use the default settings                                                        |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_1`    | `0x0001` | Set the width to 1 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_2`    | `0x0002` | Set the width to 2 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_3`    | `0x0003` | Set the width to 3 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_4`    | `0x0004` | Set the width to 4 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_5`    | `0x0005` | Set the width to 5 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_6`    | `0x0006` | Set the width to 6 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_7`    | `0x0007` | Set the width to 7 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_8`    | `0x0008` | Set the width to 8 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_9`    | `0x0009` | Set the width to 9 relative to the other buttons in the same row                                  |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_10`   | `0x000A` | Set the width to 10 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_11`   | `0x000B` | Set the width to 11 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_12`   | `0x000C` | Set the width to 12 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_13`   | `0x000D` | Set the width to 13 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_14`   | `0x000E` | Set the width to 14 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_WIDTH_15`   | `0x000F` | Set the width to 15 relative to the other buttons in the same row                                 |
  | `LV_BUTTONMATRIX_CTRL_HIDDEN`     | `0x0010` | Hides button; it continues to hold its space in layout.                                           |
  | `LV_BUTTONMATRIX_CTRL_NO_REPEAT`  | `0x0020` | Do not emit LV\_EVENT\_LONG\_PRESSED\_REPEAT events while button is long-pressed.                 |
  | `LV_BUTTONMATRIX_CTRL_DISABLED`   | `0x0040` | Disables button like LV\_STATE\_DISABLED on normal Widgets.                                       |
  | `LV_BUTTONMATRIX_CTRL_CHECKABLE`  | `0x0080` | Enable toggling of LV\_STATE\_CHECKED when clicked.                                               |
  | `LV_BUTTONMATRIX_CTRL_CHECKED`    | `0x0100` | Make the button checked. It will use the :cpp:enumerator:`LV_STATE_CHECHKED` styles.              |
  | `LV_BUTTONMATRIX_CTRL_CLICK_TRIG` | `0x0200` | 1: Enables sending LV\_EVENT\_VALUE\_CHANGE on CLICK, 0: sends LV\_EVENT\_VALUE\_CHANGE on PRESS. |
  | `LV_BUTTONMATRIX_CTRL_POPOVER`    | `0x0400` | Show button text in a pop-over while being pressed.                                               |
  | `LV_BUTTONMATRIX_CTRL_RECOLOR`    | `0x0800` | Enable text recoloring with `#color`                                                              |
  | `LV_BUTTONMATRIX_CTRL_RESERVED_1` | `0x1000` | Reserved for later use                                                                            |
  | `LV_BUTTONMATRIX_CTRL_RESERVED_2` | `0x2000` | Reserved for later use                                                                            |
  | `LV_BUTTONMATRIX_CTRL_CUSTOM_1`   | `0x4000` | Custom free-to-use flag                                                                           |
  | `LV_BUTTONMATRIX_CTRL_CUSTOM_2`   | `0x8000` | Custom free-to-use flag                                                                           |
</ApiMember>

<TypeUsedBy name="lv_buttonmatrix_ctrl_t" count="7">
  * `lv_buttonmatrix_set_ctrl_map` — param `ctrl_map`
  * `lv_buttonmatrix_set_button_ctrl` — param `ctrl`
  * `lv_buttonmatrix_clear_button_ctrl` — param `ctrl`
  * `lv_buttonmatrix_set_button_ctrl_all` — param `ctrl`
  * `lv_buttonmatrix_clear_button_ctrl_all` — param `ctrl`
  * `lv_buttonmatrix_has_button_ctrl` — param `ctrl`
  * `lv_keyboard_set_map` — param `ctrl_map`
</TypeUsedBy>

<ApiMember kind="enum" name="_lv_property_buttonmatrix_id_t" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="72" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L72">
  \_lv_property_buttonmatrix_id_t [#_lv_property_buttonmatrix_id_t]

  | Name                                       | Value                                                                  |
  | ------------------------------------------ | ---------------------------------------------------------------------- |
  | `LV_PROPERTY_BUTTONMATRIX_SELECTED_BUTTON` | `(LV_PROPERTY_BUTTONMATRIX_START + ((int) 0 )) \| ((  1   ) <<  28 )`  |
  | `LV_PROPERTY_BUTTONMATRIX_ONE_CHECKED`     | `(LV_PROPERTY_BUTTONMATRIX_START + ((int) 1 )) \| ((  11   ) <<  28 )` |
  | `LV_PROPERTY_BUTTONMATRIX_END`             |                                                                        |
</ApiMember>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_buttonmatrix_button_draw_cb_t" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L66">
  lv_buttonmatrix_button_draw_cb_t [#lv_buttonmatrix_button_draw_cb_t]

  ```c title=" " lineNumbers=1
  typedef bool(* lv_buttonmatrix_button_draw_cb_t) (lv_obj_t *btnm, uint32_t btn_id, const lv_area_t *draw_area, const lv_area_t *clip_area)
  ```
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="LV_BUTTONMATRIX_BUTTON_NONE" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="26" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L26">
  LV_BUTTONMATRIX_BUTTON_NONE [#lv_buttonmatrix_button_none]

  ```c title=" " lineNumbers=1
  #define LV_BUTTONMATRIX_BUTTON_NONE 0xFFFF
  ```
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="lv_buttonmatrix_class" file="widgets/buttonmatrix/lv_buttonmatrix.h" line="69" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/widgets/buttonmatrix/lv_buttonmatrix.h#L69">
  lv_buttonmatrix_class [#lv_buttonmatrix_class]

  ```c title=" " lineNumbers=1
  const lv_obj_class_t lv_buttonmatrix_class
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_obj_property.h&#x22;]" includedBy="[&#x22;lv_buttonmatrix_private.h&#x22;, &#x22;lv_calendar.h&#x22;, &#x22;lv_keyboard.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property_names.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
