Class NkStyleEdit

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkStyleEdit extends Struct<NkStyleEdit> implements NativeResource

 struct nk_style_edit {
     {@link NkStyleItem struct nk_style_item} normal;
     {@link NkStyleItem struct nk_style_item} hover;
     {@link NkStyleItem struct nk_style_item} active;
     {@link NkColor struct nk_color} border_color;
     {@link NkStyleScrollbar struct nk_style_scrollbar} scrollbar;
     {@link NkColor struct nk_color} cursor_normal;
     {@link NkColor struct nk_color} cursor_hover;
     {@link NkColor struct nk_color} cursor_text_normal;
     {@link NkColor struct nk_color} cursor_text_hover;
     {@link NkColor struct nk_color} text_normal;
     {@link NkColor struct nk_color} text_hover;
     {@link NkColor struct nk_color} text_active;
     {@link NkColor struct nk_color} selected_normal;
     {@link NkColor struct nk_color} selected_hover;
     {@link NkColor struct nk_color} selected_text_normal;
     {@link NkColor struct nk_color} selected_text_hover;
     float border;
     float rounding;
     float cursor_size;
     {@link NkVec2 struct nk_vec2} scrollbar_size;
     {@link NkVec2 struct nk_vec2} padding;
     float row_padding;
     float color_factor;
     float disabled_factor;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • NORMAL

      public static final int NORMAL
      The struct member offsets.
    • HOVER

      public static final int HOVER
      The struct member offsets.
    • ACTIVE

      public static final int ACTIVE
      The struct member offsets.
    • BORDER_COLOR

      public static final int BORDER_COLOR
      The struct member offsets.
    • SCROLLBAR

      public static final int SCROLLBAR
      The struct member offsets.
    • CURSOR_NORMAL

      public static final int CURSOR_NORMAL
      The struct member offsets.
    • CURSOR_HOVER

      public static final int CURSOR_HOVER
      The struct member offsets.
    • CURSOR_TEXT_NORMAL

      public static final int CURSOR_TEXT_NORMAL
      The struct member offsets.
    • CURSOR_TEXT_HOVER

      public static final int CURSOR_TEXT_HOVER
      The struct member offsets.
    • TEXT_NORMAL

      public static final int TEXT_NORMAL
      The struct member offsets.
    • TEXT_HOVER

      public static final int TEXT_HOVER
      The struct member offsets.
    • TEXT_ACTIVE

      public static final int TEXT_ACTIVE
      The struct member offsets.
    • SELECTED_NORMAL

      public static final int SELECTED_NORMAL
      The struct member offsets.
    • SELECTED_HOVER

      public static final int SELECTED_HOVER
      The struct member offsets.
    • SELECTED_TEXT_NORMAL

      public static final int SELECTED_TEXT_NORMAL
      The struct member offsets.
    • SELECTED_TEXT_HOVER

      public static final int SELECTED_TEXT_HOVER
      The struct member offsets.
    • BORDER

      public static final int BORDER
      The struct member offsets.
    • ROUNDING

      public static final int ROUNDING
      The struct member offsets.
    • CURSOR_SIZE

      public static final int CURSOR_SIZE
      The struct member offsets.
    • SCROLLBAR_SIZE

      public static final int SCROLLBAR_SIZE
      The struct member offsets.
    • PADDING

      public static final int PADDING
      The struct member offsets.
    • ROW_PADDING

      public static final int ROW_PADDING
      The struct member offsets.
    • COLOR_FACTOR

      public static final int COLOR_FACTOR
      The struct member offsets.
    • DISABLED_FACTOR

      public static final int DISABLED_FACTOR
      The struct member offsets.
  • Constructor Details

    • NkStyleEdit

      public NkStyleEdit(ByteBuffer container)
      Creates a NkStyleEdit 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NkStyleEdit>
    • normal

      public NkStyleItem normal()
      Returns:
      a NkStyleItem view of the normal field.
    • hover

      public NkStyleItem hover()
      Returns:
      a NkStyleItem view of the hover field.
    • active

      public NkStyleItem active()
      Returns:
      a NkStyleItem view of the active field.
    • border_color

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

      public NkStyleScrollbar scrollbar()
      Returns:
      a NkStyleScrollbar view of the scrollbar field.
    • cursor_normal

      public NkColor cursor_normal()
      Returns:
      a NkColor view of the cursor_normal field.
    • cursor_hover

      public NkColor cursor_hover()
      Returns:
      a NkColor view of the cursor_hover field.
    • cursor_text_normal

      public NkColor cursor_text_normal()
      Returns:
      a NkColor view of the cursor_text_normal field.
    • cursor_text_hover

      public NkColor cursor_text_hover()
      Returns:
      a NkColor view of the cursor_text_hover 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.
    • selected_normal

      public NkColor selected_normal()
      Returns:
      a NkColor view of the selected_normal field.
    • selected_hover

      public NkColor selected_hover()
      Returns:
      a NkColor view of the selected_hover field.
    • selected_text_normal

      public NkColor selected_text_normal()
      Returns:
      a NkColor view of the selected_text_normal field.
    • selected_text_hover

      public NkColor selected_text_hover()
      Returns:
      a NkColor view of the selected_text_hover field.
    • border

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

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

      public float cursor_size()
      Returns:
      the value of the cursor_size field.
    • scrollbar_size

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

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

      public float row_padding()
      Returns:
      the value of the row_padding field.
    • color_factor

      public float color_factor()
      Returns:
      the value of the color_factor field.
    • disabled_factor

      public float disabled_factor()
      Returns:
      the value of the disabled_factor field.
    • normal

      public NkStyleEdit normal(NkStyleItem value)
      Copies the specified NkStyleItem to the normal field.
    • normal

      public NkStyleEdit normal(Consumer<NkStyleItem> consumer)
      Passes the normal field to the specified Consumer.
    • hover

      public NkStyleEdit hover(NkStyleItem value)
      Copies the specified NkStyleItem to the hover field.
    • hover

      public NkStyleEdit hover(Consumer<NkStyleItem> consumer)
      Passes the hover field to the specified Consumer.
    • active

      public NkStyleEdit active(NkStyleItem value)
      Copies the specified NkStyleItem to the active field.
    • active

      public NkStyleEdit active(Consumer<NkStyleItem> consumer)
      Passes the active field to the specified Consumer.
    • border_color

      public NkStyleEdit border_color(NkColor value)
      Copies the specified NkColor to the border_color field.
    • border_color

      public NkStyleEdit border_color(Consumer<NkColor> consumer)
      Passes the border_color field to the specified Consumer.
    • scrollbar

      public NkStyleEdit scrollbar(NkStyleScrollbar value)
      Copies the specified NkStyleScrollbar to the scrollbar field.
    • scrollbar

      public NkStyleEdit scrollbar(Consumer<NkStyleScrollbar> consumer)
      Passes the scrollbar field to the specified Consumer.
    • cursor_normal

      public NkStyleEdit cursor_normal(NkColor value)
      Copies the specified NkColor to the cursor_normal field.
    • cursor_normal

      public NkStyleEdit cursor_normal(Consumer<NkColor> consumer)
      Passes the cursor_normal field to the specified Consumer.
    • cursor_hover

      public NkStyleEdit cursor_hover(NkColor value)
      Copies the specified NkColor to the cursor_hover field.
    • cursor_hover

      public NkStyleEdit cursor_hover(Consumer<NkColor> consumer)
      Passes the cursor_hover field to the specified Consumer.
    • cursor_text_normal

      public NkStyleEdit cursor_text_normal(NkColor value)
      Copies the specified NkColor to the cursor_text_normal field.
    • cursor_text_normal

      public NkStyleEdit cursor_text_normal(Consumer<NkColor> consumer)
      Passes the cursor_text_normal field to the specified Consumer.
    • cursor_text_hover

      public NkStyleEdit cursor_text_hover(NkColor value)
      Copies the specified NkColor to the cursor_text_hover field.
    • cursor_text_hover

      public NkStyleEdit cursor_text_hover(Consumer<NkColor> consumer)
      Passes the cursor_text_hover field to the specified Consumer.
    • text_normal

      public NkStyleEdit text_normal(NkColor value)
      Copies the specified NkColor to the text_normal field.
    • text_normal

      public NkStyleEdit text_normal(Consumer<NkColor> consumer)
      Passes the text_normal field to the specified Consumer.
    • text_hover

      public NkStyleEdit text_hover(NkColor value)
      Copies the specified NkColor to the text_hover field.
    • text_hover

      public NkStyleEdit text_hover(Consumer<NkColor> consumer)
      Passes the text_hover field to the specified Consumer.
    • text_active

      public NkStyleEdit text_active(NkColor value)
      Copies the specified NkColor to the text_active field.
    • text_active

      public NkStyleEdit text_active(Consumer<NkColor> consumer)
      Passes the text_active field to the specified Consumer.
    • selected_normal

      public NkStyleEdit selected_normal(NkColor value)
      Copies the specified NkColor to the selected_normal field.
    • selected_normal

      public NkStyleEdit selected_normal(Consumer<NkColor> consumer)
      Passes the selected_normal field to the specified Consumer.
    • selected_hover

      public NkStyleEdit selected_hover(NkColor value)
      Copies the specified NkColor to the selected_hover field.
    • selected_hover

      public NkStyleEdit selected_hover(Consumer<NkColor> consumer)
      Passes the selected_hover field to the specified Consumer.
    • selected_text_normal

      public NkStyleEdit selected_text_normal(NkColor value)
      Copies the specified NkColor to the selected_text_normal field.
    • selected_text_normal

      public NkStyleEdit selected_text_normal(Consumer<NkColor> consumer)
      Passes the selected_text_normal field to the specified Consumer.
    • selected_text_hover

      public NkStyleEdit selected_text_hover(NkColor value)
      Copies the specified NkColor to the selected_text_hover field.
    • selected_text_hover

      public NkStyleEdit selected_text_hover(Consumer<NkColor> consumer)
      Passes the selected_text_hover field to the specified Consumer.
    • border

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

      public NkStyleEdit rounding(float value)
      Sets the specified value to the rounding field.
    • cursor_size

      public NkStyleEdit cursor_size(float value)
      Sets the specified value to the cursor_size field.
    • scrollbar_size

      public NkStyleEdit scrollbar_size(NkVec2 value)
      Copies the specified NkVec2 to the scrollbar_size field.
    • scrollbar_size

      public NkStyleEdit scrollbar_size(Consumer<NkVec2> consumer)
      Passes the scrollbar_size field to the specified Consumer.
    • padding

      public NkStyleEdit padding(NkVec2 value)
      Copies the specified NkVec2 to the padding field.
    • padding

      public NkStyleEdit padding(Consumer<NkVec2> consumer)
      Passes the padding field to the specified Consumer.
    • row_padding

      public NkStyleEdit row_padding(float value)
      Sets the specified value to the row_padding field.
    • color_factor

      public NkStyleEdit color_factor(float value)
      Sets the specified value to the color_factor field.
    • disabled_factor

      public NkStyleEdit disabled_factor(float value)
      Sets the specified value to the disabled_factor field.
    • set

      public NkStyleEdit set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkStyleScrollbar scrollbar, NkColor cursor_normal, NkColor cursor_hover, NkColor cursor_text_normal, NkColor cursor_text_hover, NkColor text_normal, NkColor text_hover, NkColor text_active, NkColor selected_normal, NkColor selected_hover, NkColor selected_text_normal, NkColor selected_text_hover, float border, float rounding, float cursor_size, NkVec2 scrollbar_size, NkVec2 padding, float row_padding, float color_factor, float disabled_factor)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static NkStyleEdit mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleEdit callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleEdit mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleEdit callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleEdit.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleEdit.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleEdit.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleEdit.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static NkStyleEdit malloc(MemoryStack stack)
      Returns a new NkStyleEdit instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

      public static NkStyleEdit.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new NkStyleEdit.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static NkStyleEdit.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new NkStyleEdit.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nnormal

      public static NkStyleItem nnormal(long struct)
      Unsafe version of normal().
    • nhover

      public static NkStyleItem nhover(long struct)
      Unsafe version of hover().
    • nactive

      public static NkStyleItem nactive(long struct)
      Unsafe version of active().
    • nborder_color

      public static NkColor nborder_color(long struct)
      Unsafe version of border_color().
    • nscrollbar

      public static NkStyleScrollbar nscrollbar(long struct)
      Unsafe version of scrollbar().
    • ncursor_normal

      public static NkColor ncursor_normal(long struct)
      Unsafe version of cursor_normal().
    • ncursor_hover

      public static NkColor ncursor_hover(long struct)
      Unsafe version of cursor_hover().
    • ncursor_text_normal

      public static NkColor ncursor_text_normal(long struct)
      Unsafe version of cursor_text_normal().
    • ncursor_text_hover

      public static NkColor ncursor_text_hover(long struct)
      Unsafe version of cursor_text_hover().
    • 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().
    • nselected_normal

      public static NkColor nselected_normal(long struct)
      Unsafe version of selected_normal().
    • nselected_hover

      public static NkColor nselected_hover(long struct)
      Unsafe version of selected_hover().
    • nselected_text_normal

      public static NkColor nselected_text_normal(long struct)
      Unsafe version of selected_text_normal().
    • nselected_text_hover

      public static NkColor nselected_text_hover(long struct)
      Unsafe version of selected_text_hover().
    • nborder

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

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

      public static float ncursor_size(long struct)
      Unsafe version of cursor_size().
    • nscrollbar_size

      public static NkVec2 nscrollbar_size(long struct)
      Unsafe version of scrollbar_size().
    • npadding

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

      public static float nrow_padding(long struct)
      Unsafe version of row_padding().
    • ncolor_factor

      public static float ncolor_factor(long struct)
      Unsafe version of color_factor().
    • ndisabled_factor

      public static float ndisabled_factor(long struct)
      Unsafe version of disabled_factor().
    • 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.
    • nscrollbar

      public static void nscrollbar(long struct, NkStyleScrollbar value)
      Unsafe version of scrollbar.
    • ncursor_normal

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

      public static void ncursor_hover(long struct, NkColor value)
      Unsafe version of cursor_hover.
    • ncursor_text_normal

      public static void ncursor_text_normal(long struct, NkColor value)
      Unsafe version of cursor_text_normal.
    • ncursor_text_hover

      public static void ncursor_text_hover(long struct, NkColor value)
      Unsafe version of cursor_text_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.
    • nselected_normal

      public static void nselected_normal(long struct, NkColor value)
      Unsafe version of selected_normal.
    • nselected_hover

      public static void nselected_hover(long struct, NkColor value)
      Unsafe version of selected_hover.
    • nselected_text_normal

      public static void nselected_text_normal(long struct, NkColor value)
      Unsafe version of selected_text_normal.
    • nselected_text_hover

      public static void nselected_text_hover(long struct, NkColor value)
      Unsafe version of selected_text_hover.
    • 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.
    • ncursor_size

      public static void ncursor_size(long struct, float value)
      Unsafe version of cursor_size.
    • nscrollbar_size

      public static void nscrollbar_size(long struct, NkVec2 value)
      Unsafe version of scrollbar_size.
    • npadding

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

      public static void nrow_padding(long struct, float value)
      Unsafe version of row_padding.
    • ncolor_factor

      public static void ncolor_factor(long struct, float value)
      Unsafe version of color_factor.
    • ndisabled_factor

      public static void ndisabled_factor(long struct, float value)
      Unsafe version of disabled_factor.