Class NkStyleToggle

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NORMAL, HOVER, ACTIVE, BORDER_COLOR, CURSOR_NORMAL, CURSOR_HOVER, TEXT_NORMAL, TEXT_HOVER, TEXT_ACTIVE, TEXT_BACKGROUND, TEXT_ALIGNMENT, PADDING, TOUCH_PADDING, SPACING, BORDER, USERDATA, DRAW_BEGIN, DRAW_END

        The struct member offsets.
    • Constructor Detail

      • NkStyleToggle

        public NkStyleToggle​(java.nio.ByteBuffer container)
        Creates a NkStyleToggle instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • border_color

        public NkColor border_color()
        Returns a NkColor view of the border_color field.
      • text_normal

        public NkColor text_normal()
        Returns a NkColor view of the text_normal field.
      • text_hover

        public NkColor text_hover()
        Returns a NkColor view of the text_hover field.
      • text_active

        public NkColor text_active()
        Returns a NkColor view of the text_active field.
      • text_background

        public NkColor text_background()
        Returns a NkColor view of the text_background field.
      • text_alignment

        public int text_alignment()
        Returns the value of the text_alignment field.
      • padding

        public NkVec2 padding()
        Returns a NkVec2 view of the padding field.
      • touch_padding

        public NkVec2 touch_padding()
        Returns a NkVec2 view of the touch_padding field.
      • spacing

        public float spacing()
        Returns the value of the spacing field.
      • border

        public float border()
        Returns the value of the border field.
      • userdata

        public NkHandle userdata()
        Returns a NkHandle view of the userdata field.
      • draw_begin

        @Nullable
        public NkDrawBeginCallback draw_begin()
        Returns the value of the draw_begin field.
      • draw_end

        @Nullable
        public NkDrawEndCallback draw_end()
        Returns the value of the draw_end field.
      • normal

        public NkStyleToggle normal​(java.util.function.Consumer<NkStyleItem> consumer)
        Passes the normal field to the specified Consumer.
      • hover

        public NkStyleToggle hover​(java.util.function.Consumer<NkStyleItem> consumer)
        Passes the hover field to the specified Consumer.
      • active

        public NkStyleToggle active​(java.util.function.Consumer<NkStyleItem> consumer)
        Passes the active field to the specified Consumer.
      • border_color

        public NkStyleToggle border_color​(java.util.function.Consumer<NkColor> consumer)
        Passes the border_color field to the specified Consumer.
      • cursor_normal

        public NkStyleToggle cursor_normal​(java.util.function.Consumer<NkStyleItem> consumer)
        Passes the cursor_normal field to the specified Consumer.
      • cursor_hover

        public NkStyleToggle cursor_hover​(java.util.function.Consumer<NkStyleItem> consumer)
        Passes the cursor_hover field to the specified Consumer.
      • text_normal

        public NkStyleToggle text_normal​(java.util.function.Consumer<NkColor> consumer)
        Passes the text_normal field to the specified Consumer.
      • text_hover

        public NkStyleToggle text_hover​(java.util.function.Consumer<NkColor> consumer)
        Passes the text_hover field to the specified Consumer.
      • text_active

        public NkStyleToggle text_active​(java.util.function.Consumer<NkColor> consumer)
        Passes the text_active field to the specified Consumer.
      • text_background

        public NkStyleToggle text_background​(java.util.function.Consumer<NkColor> consumer)
        Passes the text_background field to the specified Consumer.
      • text_alignment

        public NkStyleToggle text_alignment​(int value)
        Sets the specified value to the text_alignment field.
      • padding

        public NkStyleToggle padding​(java.util.function.Consumer<NkVec2> consumer)
        Passes the padding field to the specified Consumer.
      • touch_padding

        public NkStyleToggle touch_padding​(NkVec2 value)
        Copies the specified NkVec2 to the touch_padding field.
      • touch_padding

        public NkStyleToggle touch_padding​(java.util.function.Consumer<NkVec2> consumer)
        Passes the touch_padding field to the specified Consumer.
      • spacing

        public NkStyleToggle spacing​(float value)
        Sets the specified value to the spacing field.
      • border

        public NkStyleToggle border​(float value)
        Sets the specified value to the border field.
      • userdata

        public NkStyleToggle userdata​(java.util.function.Consumer<NkHandle> consumer)
        Passes the userdata field to the specified Consumer.
      • set

        public NkStyleToggle set​(NkStyleToggle src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static NkStyleToggle malloc()
        Returns a new NkStyleToggle instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static NkStyleToggle calloc()
        Returns a new NkStyleToggle instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static NkStyleToggle create​(long address)
        Returns a new NkStyleToggle instance for the specified memory address.
      • createSafe

        @Nullable
        public static NkStyleToggle createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static NkStyleToggle.Buffer create​(long address,
                                                  int capacity)
        Create a NkStyleToggle.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static NkStyleToggle.Buffer createSafe​(long address,
                                                      int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static NkStyleToggle mallocStack()
        Returns a new NkStyleToggle instance allocated on the thread-local MemoryStack.
      • callocStack

        public static NkStyleToggle callocStack()
        Returns a new NkStyleToggle instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static NkStyleToggle mallocStack​(MemoryStack stack)
        Returns a new NkStyleToggle instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static NkStyleToggle callocStack​(MemoryStack stack)
        Returns a new NkStyleToggle instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • ntext_normal

        public static NkColor ntext_normal​(long struct)
        Unsafe version of text_normal().
      • ntext_hover

        public static NkColor ntext_hover​(long struct)
        Unsafe version of text_hover().
      • ntext_active

        public static NkColor ntext_active​(long struct)
        Unsafe version of text_active().
      • ntext_alignment

        public static int ntext_alignment​(long struct)
        Unsafe version of text_alignment().
      • npadding

        public static NkVec2 npadding​(long struct)
        Unsafe version of padding().
      • ntouch_padding

        public static NkVec2 ntouch_padding​(long struct)
        Unsafe version of touch_padding().
      • nspacing

        public static float nspacing​(long struct)
        Unsafe version of spacing().
      • nborder

        public static float nborder​(long struct)
        Unsafe version of border().
      • nuserdata

        public static NkHandle nuserdata​(long struct)
        Unsafe version of userdata().
      • nnormal

        public static void nnormal​(long struct,
                                   NkStyleItem value)
        Unsafe version of normal.
      • nhover

        public static void nhover​(long struct,
                                  NkStyleItem value)
        Unsafe version of hover.
      • nactive

        public static void nactive​(long struct,
                                   NkStyleItem value)
        Unsafe version of active.
      • nborder_color

        public static void nborder_color​(long struct,
                                         NkColor value)
        Unsafe version of border_color.
      • ncursor_normal

        public static void ncursor_normal​(long struct,
                                          NkStyleItem value)
        Unsafe version of cursor_normal.
      • ncursor_hover

        public static void ncursor_hover​(long struct,
                                         NkStyleItem value)
        Unsafe version of cursor_hover.
      • ntext_normal

        public static void ntext_normal​(long struct,
                                        NkColor value)
        Unsafe version of text_normal.
      • ntext_hover

        public static void ntext_hover​(long struct,
                                       NkColor value)
        Unsafe version of text_hover.
      • ntext_active

        public static void ntext_active​(long struct,
                                        NkColor value)
        Unsafe version of text_active.
      • ntext_background

        public static void ntext_background​(long struct,
                                            NkColor value)
        Unsafe version of text_background.
      • ntext_alignment

        public static void ntext_alignment​(long struct,
                                           int value)
        Unsafe version of text_alignment.
      • npadding

        public static void npadding​(long struct,
                                    NkVec2 value)
        Unsafe version of padding.
      • ntouch_padding

        public static void ntouch_padding​(long struct,
                                          NkVec2 value)
        Unsafe version of touch_padding.
      • nspacing

        public static void nspacing​(long struct,
                                    float value)
        Unsafe version of spacing.
      • nborder

        public static void nborder​(long struct,
                                   float value)
        Unsafe version of border.
      • nuserdata

        public static void nuserdata​(long struct,
                                     NkHandle value)
        Unsafe version of userdata.