Class NkPanel

All Implemented Interfaces:
Pointer

public class NkPanel extends Struct<NkPanel>

Layout


 struct nk_panel {
     enum nk_panel_type type();
     nk_flags flags;
     struct nk_rect bounds;
     nk_uint * offset_x;
     nk_uint * offset_y;
     float at_x;
     float at_y;
     float max_x;
     float footer_height;
     float header_height;
     float border;
     unsigned int has_scrolling;
     struct nk_rect clip;
     struct nk_menu_state menu;
     struct nk_row_layout row;
     struct nk_chart chart;
     struct nk_command_buffer * buffer;
     struct nk_panel * parent;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • BOUNDS

      public static final int BOUNDS
      The struct member offsets.
    • OFFSET_X

      public static final int OFFSET_X
      The struct member offsets.
    • OFFSET_Y

      public static final int OFFSET_Y
      The struct member offsets.
    • AT_X

      public static final int AT_X
      The struct member offsets.
    • AT_Y

      public static final int AT_Y
      The struct member offsets.
    • MAX_X

      public static final int MAX_X
      The struct member offsets.
    • HEADER_HEIGHT

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

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

      public static final int HAS_SCROLLING
      The struct member offsets.
    • CLIP

      public static final int CLIP
      The struct member offsets.
    • ROW

      public static final int ROW
      The struct member offsets.
    • CHART

      public static final int CHART
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • PARENT

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

    • NkPanel

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

      public int type()
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • bounds

      public NkRect bounds()
      Returns:
      a NkRect view of the bounds field.
    • offset_x

      public IntBuffer offset_x(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      a IntBuffer view of the data pointed to by the offset_x field.
    • offset_y

      public IntBuffer offset_y(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      a IntBuffer view of the data pointed to by the offset_y field.
    • at_x

      public float at_x()
      Returns:
      the value of the at_x field.
    • at_y

      public float at_y()
      Returns:
      the value of the at_y field.
    • max_x

      public float max_x()
      Returns:
      the value of the max_x field.
    • header_height

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

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

      public int has_scrolling()
      Returns:
      the value of the has_scrolling field.
    • clip

      public NkRect clip()
      Returns:
      a NkRect view of the clip field.
    • row

      public NkRowLayout row()
      Returns:
      a NkRowLayout view of the row field.
    • chart

      public NkChart chart()
      Returns:
      a NkChart view of the chart field.
    • buffer

      public NkCommandBuffer buffer()
      Returns:
      a NkCommandBuffer view of the struct pointed to by the buffer field.
    • parent

      public NkPanel parent()
      Returns:
      a NkPanel view of the struct pointed to by the parent field.
    • create

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

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nbounds

      public static NkRect nbounds(long struct)
      Unsafe version of bounds().
    • noffset_x

      public static IntBuffer noffset_x(long struct, int capacity)
      Unsafe version of offset_x.
    • noffset_y

      public static IntBuffer noffset_y(long struct, int capacity)
      Unsafe version of offset_y.
    • nat_x

      public static float nat_x(long struct)
      Unsafe version of at_x().
    • nat_y

      public static float nat_y(long struct)
      Unsafe version of at_y().
    • nmax_x

      public static float nmax_x(long struct)
      Unsafe version of max_x().
    • nfooter_height

      public static float nfooter_height(long struct)
      Unsafe version of footer_height().
    • nheader_height

      public static float nheader_height(long struct)
      Unsafe version of header_height().
    • nborder

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

      public static int nhas_scrolling(long struct)
      Unsafe version of has_scrolling().
    • nclip

      public static NkRect nclip(long struct)
      Unsafe version of clip().
    • nmenu

      public static NkMenuState nmenu(long struct)
      Unsafe version of menu().
    • nrow

      public static NkRowLayout nrow(long struct)
      Unsafe version of row().
    • nchart

      public static NkChart nchart(long struct)
      Unsafe version of chart().
    • nbuffer

      public static NkCommandBuffer nbuffer(long struct)
      Unsafe version of buffer().
    • nparent

      public static NkPanel nparent(long struct)
      Unsafe version of parent().