Class NkStyleKnob

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkStyleKnob extends Struct<NkStyleKnob> implements NativeResource

 struct nk_style_knob {
     {@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 NkColor struct nk_color} knob_normal;
     {@link NkColor struct nk_color} knob_hover;
     {@link NkColor struct nk_color} knob_active;
     {@link NkColor struct nk_color} knob_border_color;
     {@link NkColor struct nk_color} cursor_normal;
     {@link NkColor struct nk_color} cursor_hover;
     {@link NkColor struct nk_color} cursor_active;
     float border;
     float knob_border;
     {@link NkVec2 struct nk_vec2} padding;
     {@link NkVec2 struct nk_vec2} spacing;
     float cursor_width;
     float color_factor;
     float disabled_factor;
     {@link NkHandle nk_handle} userdata;
     {@link NkDrawBeginCallbackI nk_draw_begin} draw_begin;
     {@link NkDrawEndCallbackI nk_draw_end} draw_end;
 }
  • 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.
    • KNOB_NORMAL

      public static final int KNOB_NORMAL
      The struct member offsets.
    • KNOB_HOVER

      public static final int KNOB_HOVER
      The struct member offsets.
    • KNOB_ACTIVE

      public static final int KNOB_ACTIVE
      The struct member offsets.
    • KNOB_BORDER_COLOR

      public static final int KNOB_BORDER_COLOR
      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_ACTIVE

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

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

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

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

      public static final int SPACING
      The struct member offsets.
    • CURSOR_WIDTH

      public static final int CURSOR_WIDTH
      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.
    • USERDATA

      public static final int USERDATA
      The struct member offsets.
    • DRAW_BEGIN

      public static final int DRAW_BEGIN
      The struct member offsets.
    • DRAW_END

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

    • NkStyleKnob

      public NkStyleKnob(ByteBuffer container)
      Creates a NkStyleKnob 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<NkStyleKnob>
    • 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.
    • knob_normal

      public NkColor knob_normal()
      Returns:
      a NkColor view of the knob_normal field.
    • knob_hover

      public NkColor knob_hover()
      Returns:
      a NkColor view of the knob_hover field.
    • knob_active

      public NkColor knob_active()
      Returns:
      a NkColor view of the knob_active field.
    • knob_border_color

      public NkColor knob_border_color()
      Returns:
      a NkColor view of the knob_border_color 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_active

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

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

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

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

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

      public float cursor_width()
      Returns:
      the value of the cursor_width 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.
    • userdata

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

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

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

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

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

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

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

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

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

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

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

      public NkStyleKnob knob_normal(NkColor value)
      Copies the specified NkColor to the knob_normal field.
    • knob_normal

      public NkStyleKnob knob_normal(Consumer<NkColor> consumer)
      Passes the knob_normal field to the specified Consumer.
    • knob_hover

      public NkStyleKnob knob_hover(NkColor value)
      Copies the specified NkColor to the knob_hover field.
    • knob_hover

      public NkStyleKnob knob_hover(Consumer<NkColor> consumer)
      Passes the knob_hover field to the specified Consumer.
    • knob_active

      public NkStyleKnob knob_active(NkColor value)
      Copies the specified NkColor to the knob_active field.
    • knob_active

      public NkStyleKnob knob_active(Consumer<NkColor> consumer)
      Passes the knob_active field to the specified Consumer.
    • knob_border_color

      public NkStyleKnob knob_border_color(NkColor value)
      Copies the specified NkColor to the knob_border_color field.
    • knob_border_color

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

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

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

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

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

      public NkStyleKnob cursor_active(NkColor value)
      Copies the specified NkColor to the cursor_active field.
    • cursor_active

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

      public NkStyleKnob border(float value)
      Sets the specified value to the border field.
    • knob_border

      public NkStyleKnob knob_border(float value)
      Sets the specified value to the knob_border field.
    • padding

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

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

      public NkStyleKnob spacing(NkVec2 value)
      Copies the specified NkVec2 to the spacing field.
    • spacing

      public NkStyleKnob spacing(Consumer<NkVec2> consumer)
      Passes the spacing field to the specified Consumer.
    • cursor_width

      public NkStyleKnob cursor_width(float value)
      Sets the specified value to the cursor_width field.
    • color_factor

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

      public NkStyleKnob disabled_factor(float value)
      Sets the specified value to the disabled_factor field.
    • userdata

      public NkStyleKnob userdata(NkHandle value)
      Copies the specified NkHandle to the userdata field.
    • userdata

      public NkStyleKnob userdata(Consumer<NkHandle> consumer)
      Passes the userdata field to the specified Consumer.
    • draw_begin

      public NkStyleKnob draw_begin(@Nullable NkDrawBeginCallbackI value)
      Sets the specified value to the draw_begin field.
    • draw_end

      public NkStyleKnob draw_end(@Nullable NkDrawEndCallbackI value)
      Sets the specified value to the draw_end field.
    • set

      public NkStyleKnob set(NkStyleItem normal, NkStyleItem hover, NkStyleItem active, NkColor border_color, NkColor knob_normal, NkColor knob_hover, NkColor knob_active, NkColor knob_border_color, NkColor cursor_normal, NkColor cursor_hover, NkColor cursor_active, float border, float knob_border, NkVec2 padding, NkVec2 spacing, float cursor_width, float color_factor, float disabled_factor, NkHandle userdata, NkDrawBeginCallbackI draw_begin, NkDrawEndCallbackI draw_end)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static NkStyleKnob.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new NkStyleKnob.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().
    • nknob_normal

      public static NkColor nknob_normal(long struct)
      Unsafe version of knob_normal().
    • nknob_hover

      public static NkColor nknob_hover(long struct)
      Unsafe version of knob_hover().
    • nknob_active

      public static NkColor nknob_active(long struct)
      Unsafe version of knob_active().
    • nknob_border_color

      public static NkColor nknob_border_color(long struct)
      Unsafe version of knob_border_color().
    • 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_active

      public static NkColor ncursor_active(long struct)
      Unsafe version of cursor_active().
    • nborder

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

      public static float nknob_border(long struct)
      Unsafe version of knob_border().
    • npadding

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

      public static NkVec2 nspacing(long struct)
      Unsafe version of spacing().
    • ncursor_width

      public static float ncursor_width(long struct)
      Unsafe version of cursor_width().
    • 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().
    • nuserdata

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

      public static @Nullable NkDrawBeginCallback ndraw_begin(long struct)
      Unsafe version of draw_begin().
    • ndraw_end

      public static @Nullable NkDrawEndCallback ndraw_end(long struct)
      Unsafe version of draw_end().
    • 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.
    • nknob_normal

      public static void nknob_normal(long struct, NkColor value)
      Unsafe version of knob_normal.
    • nknob_hover

      public static void nknob_hover(long struct, NkColor value)
      Unsafe version of knob_hover.
    • nknob_active

      public static void nknob_active(long struct, NkColor value)
      Unsafe version of knob_active.
    • nknob_border_color

      public static void nknob_border_color(long struct, NkColor value)
      Unsafe version of knob_border_color.
    • 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_active

      public static void ncursor_active(long struct, NkColor value)
      Unsafe version of cursor_active.
    • nborder

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

      public static void nknob_border(long struct, float value)
      Unsafe version of knob_border.
    • npadding

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

      public static void nspacing(long struct, NkVec2 value)
      Unsafe version of spacing.
    • ncursor_width

      public static void ncursor_width(long struct, float value)
      Unsafe version of cursor_width.
    • 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.
    • nuserdata

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

      public static void ndraw_begin(long struct, @Nullable NkDrawBeginCallbackI value)
      Unsafe version of draw_begin.
    • ndraw_end

      public static void ndraw_end(long struct, @Nullable NkDrawEndCallbackI value)
      Unsafe version of draw_end.