> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# ImGuiWindow.Checkbox

> Appends a checkbox element to an ImGuiWindow. The callback is invoked with the new boolean value when the checkbox changes, and the method returns the same ImGuiWindow object.

<div className="real-function-page">
  ```lua theme={null}
  ImGuiWindow.Checkbox(window: ImGuiWindow, label: string, checked: any, onChange: function): ImGuiWindow
  ```

  ## الوسائط

  <ParamField path={"window"} type={"ImGuiWindow"} required>
    ImGuiWindow object returned by imgui.create. A destroyed or invalid window raises a Lua error.
  </ParamField>

  <ParamField path={"label"} type={"string"} required>
    Checkbox label string passed to the rendered ImGui checkbox.
  </ParamField>

  <ParamField path={"checked"} type={"any"} required>
    Initial checked value. nil and false are treated as false; other values are treated as true.
  </ParamField>

  <ParamField path={"onChange"} type={"function"} required>
    Function stored for this checkbox and invoked with the new boolean state after a change event is processed.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"window"} type={"ImGuiWindow"}>
    The same ImGuiWindow object, allowing chained method calls.
  </ResponseField>

  ## الأنواع

  ### ImGuiWindow

  تم إرجاع المقبض بواسطة imgui.create. تقوم أساليب بناء التحكم بإرجاع نفس المقبض بحيث يمكن ربط المكالمات بالتسلسل.

  | Name               | Type                                                                                                                                            | Required | الوصف                                                                          |
  | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
  | `Button`           | `(label: string, onClick: () -> ()) -> ImGuiWindow`                                                                                             | Yes      | يُلحق زرًا ويستدعي رد الاتصال بعد النقر.                                       |
  | `Checkbox`         | `(label: string, checked: any, onChange: (boolean) -> ()) -> ImGuiWindow`                                                                       | Yes      | يُلحق مربع اختيار تمت تهيئته بالحالة المتوفرة.                                 |
  | `CollapsingHeader` | `(label: string, content: (ImGuiWindow) -> ()) -> ImGuiWindow`                                                                                  | Yes      | يتم إلحاق عناصر التحكم في المجموعات بواسطة رد اتصال المحتوى أسفل الرأس المطوي. |
  | `ColorPicker`      | `(label: string, red: number?, green: number?, blue: number?, alpha: number?, onChange: (number, number, number, number) -> ()) -> ImGuiWindow` | Yes      | إلحاق محرر RGBA؛ تم حذف مكونات اللون الافتراضية إلى 1.0.                       |
  | `InputText`        | `(label: string, text: string?, onChange: (string) -> ()) -> ImGuiWindow`                                                                       | Yes      | إلحاق إدخال نص من سطر واحد؛ تم حذف النص الأولي الافتراضي إلى سلسلة فارغة.      |
  | `SameLine`         | `() -> ImGuiWindow`                                                                                                                             | Yes      | يضع عنصر التحكم التالي على نفس السطر.                                          |
  | `Separator`        | `() -> ImGuiWindow`                                                                                                                             | Yes      | إلحاق فاصل أفقي.                                                               |
  | `SliderFloat`      | `(label: string, value: number, minimum: number, maximum: number, onChange: (number) -> ()) -> ImGuiWindow`                                     | Yes      | إلحاق شريط تمرير النقطة العائمة.                                               |
  | `SliderInt`        | `(label: string, value: integer, minimum: integer, maximum: integer, onChange: (number) -> ()) -> ImGuiWindow`                                  | Yes      | إلحاق شريط تمرير عدد صحيح.                                                     |
  | `Text`             | `(text: string) -> ImGuiWindow`                                                                                                                 | Yes      | إلحاق نص غير تفاعلي.                                                           |
  | `destroy`          | `() -> ()`                                                                                                                                      | Yes      | إزالة النافذة وتحرير عمليات الاسترجاعات المسجلة الخاصة بها.                    |
</div>
