Class NkStyleChart

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkStyleChart extends Struct<NkStyleChart> implements NativeResource

 struct nk_style_chart {
     {@link NkStyleItem struct nk_style_item} background;
     {@link NkColor struct nk_color} border_color;
     {@link NkColor struct nk_color} selected_color;
     {@link NkColor struct nk_color} color;
     float border;
     float rounding;
     {@link NkVec2 struct nk_vec2} padding;
     float color_factor;
     float disabled_factor;
     nk_bool show_markers;
 }
  • Field Details

    • SIZEOF

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

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

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

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

      public static final int SELECTED_COLOR
      The struct member offsets.
    • COLOR

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

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

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

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

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

    • NkStyleChart

      public NkStyleChart(ByteBuffer container)
      Creates a NkStyleChart 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<NkStyleChart>
    • background

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

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

      public NkColor selected_color()
      Returns:
      a NkColor view of the selected_color field.
    • color

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

      public boolean show_markers()
      Returns:
      the value of the show_markers field.
    • background

      public NkStyleChart background(NkStyleItem value)
      Copies the specified NkStyleItem to the background field.
    • background

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

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

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

      public NkStyleChart selected_color(NkColor value)
      Copies the specified NkColor to the selected_color field.
    • selected_color

      public NkStyleChart selected_color(Consumer<NkColor> consumer)
      Passes the selected_color field to the specified Consumer.
    • color

      public NkStyleChart color(NkColor value)
      Copies the specified NkColor to the color field.
    • color

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

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

      public NkStyleChart rounding(float value)
      Sets the specified value to the rounding field.
    • padding

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

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

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

      public NkStyleChart disabled_factor(float value)
      Sets the specified value to the disabled_factor field.
    • show_markers

      public NkStyleChart show_markers(boolean value)
      Sets the specified value to the show_markers field.
    • set

      public NkStyleChart set(NkStyleItem background, NkColor border_color, NkColor selected_color, NkColor color, float border, float rounding, NkVec2 padding, float color_factor, float disabled_factor, boolean show_markers)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static NkStyleItem nbackground(long struct)
      Unsafe version of background().
    • nborder_color

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

      public static NkColor nselected_color(long struct)
      Unsafe version of selected_color().
    • ncolor

      public static NkColor ncolor(long struct)
      Unsafe version of color().
    • 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().
    • 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().
    • nshow_markers

      public static boolean nshow_markers(long struct)
      Unsafe version of show_markers().
    • nbackground

      public static void nbackground(long struct, NkStyleItem value)
      Unsafe version of background.
    • nborder_color

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

      public static void nselected_color(long struct, NkColor value)
      Unsafe version of selected_color.
    • ncolor

      public static void ncolor(long struct, NkColor value)
      Unsafe version of color.
    • 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.
    • 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.
    • nshow_markers

      public static void nshow_markers(long struct, boolean value)
      Unsafe version of show_markers.