Class NkStyle

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FONT, CURSORS, CURSOR_ACTIVE, CURSOR_LAST, CURSOR_VISIBLE, TEXT, BUTTON, CONTEXTUAL_BUTTON, MENU_BUTTON, OPTION, CHECKBOX, SELECTABLE, SLIDER, PROGRESS, PROPERTY, EDIT, CHART, SCROLLH, SCROLLV, TAB, COMBO, WINDOW

        The struct member offsets.
    • Constructor Detail

      • NkStyle

        public NkStyle​(java.nio.ByteBuffer container)
        Creates a NkStyle 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • font

        @Nullable
        public NkUserFont font()
        Returns a NkUserFont view of the struct pointed to by the font field.
      • cursors

        public org.lwjgl.PointerBuffer cursors()
        Returns a PointerBuffer view of the cursors field.
      • cursors

        @Nullable
        public NkCursor cursors​(int index)
        Returns a NkCursor view of the pointer at the specified index of the cursors field.
      • cursor_active

        @Nullable
        public NkCursor cursor_active()
        Returns a NkCursor view of the struct pointed to by the cursor_active field.
      • cursor_last

        @Nullable
        public NkCursor cursor_last()
        Returns a NkCursor view of the struct pointed to by the cursor_last field.
      • cursor_visible

        public boolean cursor_visible()
        Returns the value of the cursor_visible field.
      • cursors

        public NkStyle cursors​(org.lwjgl.PointerBuffer value)
        Copies the specified PointerBuffer to the cursors field.
      • cursors

        public NkStyle cursors​(int index,
                               @Nullable
                               NkCursor value)
        Copies the address of the specified NkCursor at the specified index of the cursors field.
      • cursors

        public NkStyle cursors​(int index,
                               java.util.function.Consumer<NkCursor> consumer)
        Passes the element at index of the cursors field to the specified Consumer.
      • cursor_active

        public NkStyle cursor_active​(@Nullable
                                     NkCursor value)
        Sets the address of the specified NkCursor to the cursor_active field.
      • cursor_last

        public NkStyle cursor_last​(@Nullable
                                   NkCursor value)
        Sets the address of the specified NkCursor to the cursor_last field.
      • cursor_visible

        public NkStyle cursor_visible​(boolean value)
        Sets the specified value to the cursor_visible field.
      • text

        public NkStyle text​(java.util.function.Consumer<NkStyleText> consumer)
        Passes the text field to the specified Consumer.
      • button

        public NkStyle button​(java.util.function.Consumer<NkStyleButton> consumer)
        Passes the button field to the specified Consumer.
      • contextual_button

        public NkStyle contextual_button​(java.util.function.Consumer<NkStyleButton> consumer)
        Passes the contextual_button field to the specified Consumer.
      • menu_button

        public NkStyle menu_button​(java.util.function.Consumer<NkStyleButton> consumer)
        Passes the menu_button field to the specified Consumer.
      • option

        public NkStyle option​(java.util.function.Consumer<NkStyleToggle> consumer)
        Passes the option field to the specified Consumer.
      • checkbox

        public NkStyle checkbox​(java.util.function.Consumer<NkStyleToggle> consumer)
        Passes the checkbox field to the specified Consumer.
      • selectable

        public NkStyle selectable​(java.util.function.Consumer<NkStyleSelectable> consumer)
        Passes the selectable field to the specified Consumer.
      • slider

        public NkStyle slider​(java.util.function.Consumer<NkStyleSlider> consumer)
        Passes the slider field to the specified Consumer.
      • progress

        public NkStyle progress​(java.util.function.Consumer<NkStyleProgress> consumer)
        Passes the progress field to the specified Consumer.
      • property

        public NkStyle property​(java.util.function.Consumer<NkStyleProperty> consumer)
        Passes the property field to the specified Consumer.
      • edit

        public NkStyle edit​(java.util.function.Consumer<NkStyleEdit> consumer)
        Passes the edit field to the specified Consumer.
      • chart

        public NkStyle chart​(java.util.function.Consumer<NkStyleChart> consumer)
        Passes the chart field to the specified Consumer.
      • scrollh

        public NkStyle scrollh​(java.util.function.Consumer<NkStyleScrollbar> consumer)
        Passes the scrollh field to the specified Consumer.
      • scrollv

        public NkStyle scrollv​(java.util.function.Consumer<NkStyleScrollbar> consumer)
        Passes the scrollv field to the specified Consumer.
      • tab

        public NkStyle tab​(java.util.function.Consumer<NkStyleTab> consumer)
        Passes the tab field to the specified Consumer.
      • combo

        public NkStyle combo​(java.util.function.Consumer<NkStyleCombo> consumer)
        Passes the combo field to the specified Consumer.
      • window

        public NkStyle window​(java.util.function.Consumer<NkStyleWindow> consumer)
        Passes the window field to the specified Consumer.
      • set

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

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

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

        public static NkStyle create()
        Returns a new NkStyle instance allocated with BufferUtils.
      • create

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

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

        public static NkStyle.Buffer malloc​(int capacity)
        Returns a new NkStyle.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static NkStyle.Buffer calloc​(int capacity)
        Returns a new NkStyle.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static NkStyle.Buffer create​(int capacity)
        Returns a new NkStyle.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

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

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

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

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

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

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

        public static NkStyle.Buffer mallocStack​(int capacity)
        Returns a new NkStyle.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static NkStyle.Buffer callocStack​(int capacity)
        Returns a new NkStyle.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static NkStyle.Buffer mallocStack​(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new NkStyle.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static NkStyle.Buffer callocStack​(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new NkStyle.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nfont

        @Nullable
        public static NkUserFont nfont​(long struct)
        Unsafe version of font().
      • ncursors

        public static org.lwjgl.PointerBuffer ncursors​(long struct)
        Unsafe version of cursors().
      • ncursors

        @Nullable
        public static NkCursor ncursors​(long struct,
                                        int index)
        Unsafe version of cursors.
      • ncursor_active

        @Nullable
        public static NkCursor ncursor_active​(long struct)
        Unsafe version of cursor_active().
      • ncursor_last

        @Nullable
        public static NkCursor ncursor_last​(long struct)
        Unsafe version of cursor_last().
      • ncursor_visible

        public static int ncursor_visible​(long struct)
        Unsafe version of cursor_visible().
      • ntab

        public static NkStyleTab ntab​(long struct)
        Unsafe version of tab().
      • nfont

        public static void nfont​(long struct,
                                 @Nullable
                                 NkUserFont value)
        Unsafe version of font.
      • ncursors

        public static void ncursors​(long struct,
                                    org.lwjgl.PointerBuffer value)
        Unsafe version of cursors.
      • ncursors

        public static void ncursors​(long struct,
                                    int index,
                                    @Nullable
                                    NkCursor value)
        Unsafe version of cursors.
      • ncursor_active

        public static void ncursor_active​(long struct,
                                          @Nullable
                                          NkCursor value)
        Unsafe version of cursor_active.
      • ncursor_last

        public static void ncursor_last​(long struct,
                                        @Nullable
                                        NkCursor value)
        Unsafe version of cursor_last.
      • ncursor_visible

        public static void ncursor_visible​(long struct,
                                           int value)
        Unsafe version of cursor_visible.
      • ntext

        public static void ntext​(long struct,
                                 NkStyleText value)
        Unsafe version of text.
      • nbutton

        public static void nbutton​(long struct,
                                   NkStyleButton value)
        Unsafe version of button.
      • noption

        public static void noption​(long struct,
                                   NkStyleToggle value)
        Unsafe version of option.
      • ncheckbox

        public static void ncheckbox​(long struct,
                                     NkStyleToggle value)
        Unsafe version of checkbox.
      • nslider

        public static void nslider​(long struct,
                                   NkStyleSlider value)
        Unsafe version of slider.
      • nedit

        public static void nedit​(long struct,
                                 NkStyleEdit value)
        Unsafe version of edit.
      • nchart

        public static void nchart​(long struct,
                                  NkStyleChart value)
        Unsafe version of chart.
      • ntab

        public static void ntab​(long struct,
                                NkStyleTab value)
        Unsafe version of tab.
      • ncombo

        public static void ncombo​(long struct,
                                  NkStyleCombo value)
        Unsafe version of combo.
      • nwindow

        public static void nwindow​(long struct,
                                   NkStyleWindow value)
        Unsafe version of window.