Class NkStyleButton

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

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

        The struct member offsets.
    • Constructor Detail

      • NkStyleButton

        public NkStyleButton​(java.nio.ByteBuffer container)
        Creates a NkStyleButton 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
      • normal

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public float rounding()
        Returns the value of the rounding field.
      • padding

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

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

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

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

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

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

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

        public NkStyleButton userdata​(java.util.function.Consumer<NkHandle> consumer)
        Passes the userdata field to the specified Consumer.
      • 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.
      • text_alignment

        public NkStyleButton text_alignment​(int value)
        Sets the specified value to the text_alignment field.
      • border

        public NkStyleButton border​(float value)
        Sets the specified value to the border field.
      • rounding

        public NkStyleButton rounding​(float value)
        Sets the specified value to the rounding field.
      • image_padding

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

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

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

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

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

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

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

        public static NkStyleButton callocStack​(MemoryStack stack)
        Returns a new NkStyleButton 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().
      • nborder

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

        public static float nrounding​(long struct)
        Unsafe version of rounding().
      • npadding

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

        public static NkVec2 nimage_padding​(long struct)
        Unsafe version of image_padding().
      • ntouch_padding

        public static NkVec2 ntouch_padding​(long struct)
        Unsafe version of touch_padding().
      • 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.
      • ntext_background

        public static void ntext_background​(long struct,
                                            NkColor value)
        Unsafe version of text_background.
      • 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_alignment

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

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

        public static void nrounding​(long struct,
                                     float value)
        Unsafe version of rounding.
      • npadding

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

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

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

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