Class NkStyleTab

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkStyleTab extends Struct<NkStyleTab> implements NativeResource

 struct nk_style_tab {
     {@link NkStyleItem struct nk_style_item} background;
     {@link NkColor struct nk_color} border_color;
     {@link NkColor struct nk_color} text;
     {@link NkStyleButton struct nk_style_button} tab_maximize_button;
     {@link NkStyleButton struct nk_style_button} tab_minimize_button;
     {@link NkStyleButton struct nk_style_button} node_maximize_button;
     {@link NkStyleButton struct nk_style_button} node_minimize_button;
     enum nk_symbol_type sym_minimize;
     enum nk_symbol_type sym_maximize;
     float border;
     float rounding;
     float indent;
     {@link NkVec2 struct nk_vec2} padding;
     {@link NkVec2 struct nk_vec2} spacing;
     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.
    • BACKGROUND

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

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

      public static final int TEXT
      The struct member offsets.
    • TAB_MAXIMIZE_BUTTON

      public static final int TAB_MAXIMIZE_BUTTON
      The struct member offsets.
    • TAB_MINIMIZE_BUTTON

      public static final int TAB_MINIMIZE_BUTTON
      The struct member offsets.
    • NODE_MAXIMIZE_BUTTON

      public static final int NODE_MAXIMIZE_BUTTON
      The struct member offsets.
    • NODE_MINIMIZE_BUTTON

      public static final int NODE_MINIMIZE_BUTTON
      The struct member offsets.
    • SYM_MINIMIZE

      public static final int SYM_MINIMIZE
      The struct member offsets.
    • SYM_MAXIMIZE

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

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

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

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

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

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

    • NkStyleTab

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

      public NkColor text()
      Returns:
      a NkColor view of the text field.
    • tab_maximize_button

      public NkStyleButton tab_maximize_button()
      Returns:
      a NkStyleButton view of the tab_maximize_button field.
    • tab_minimize_button

      public NkStyleButton tab_minimize_button()
      Returns:
      a NkStyleButton view of the tab_minimize_button field.
    • node_maximize_button

      public NkStyleButton node_maximize_button()
      Returns:
      a NkStyleButton view of the node_maximize_button field.
    • node_minimize_button

      public NkStyleButton node_minimize_button()
      Returns:
      a NkStyleButton view of the node_minimize_button field.
    • sym_minimize

      public int sym_minimize()
      Returns:
      the value of the sym_minimize field.
    • sym_maximize

      public int sym_maximize()
      Returns:
      the value of the sym_maximize field.
    • border

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

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

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

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

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

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

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

      public NkStyleTab text(NkColor value)
      Copies the specified NkColor to the text field.
    • text

      public NkStyleTab text(Consumer<NkColor> consumer)
      Passes the text field to the specified Consumer.
    • tab_maximize_button

      public NkStyleTab tab_maximize_button(NkStyleButton value)
      Copies the specified NkStyleButton to the tab_maximize_button field.
    • tab_maximize_button

      public NkStyleTab tab_maximize_button(Consumer<NkStyleButton> consumer)
      Passes the tab_maximize_button field to the specified Consumer.
    • tab_minimize_button

      public NkStyleTab tab_minimize_button(NkStyleButton value)
      Copies the specified NkStyleButton to the tab_minimize_button field.
    • tab_minimize_button

      public NkStyleTab tab_minimize_button(Consumer<NkStyleButton> consumer)
      Passes the tab_minimize_button field to the specified Consumer.
    • node_maximize_button

      public NkStyleTab node_maximize_button(NkStyleButton value)
      Copies the specified NkStyleButton to the node_maximize_button field.
    • node_maximize_button

      public NkStyleTab node_maximize_button(Consumer<NkStyleButton> consumer)
      Passes the node_maximize_button field to the specified Consumer.
    • node_minimize_button

      public NkStyleTab node_minimize_button(NkStyleButton value)
      Copies the specified NkStyleButton to the node_minimize_button field.
    • node_minimize_button

      public NkStyleTab node_minimize_button(Consumer<NkStyleButton> consumer)
      Passes the node_minimize_button field to the specified Consumer.
    • sym_minimize

      public NkStyleTab sym_minimize(int value)
      Sets the specified value to the sym_minimize field.
    • sym_maximize

      public NkStyleTab sym_maximize(int value)
      Sets the specified value to the sym_maximize field.
    • border

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

      public NkStyleTab rounding(float value)
      Sets the specified value to the rounding field.
    • indent

      public NkStyleTab indent(float value)
      Sets the specified value to the indent field.
    • padding

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

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

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

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

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

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

      public NkStyleTab set(NkStyleItem background, NkColor border_color, NkColor text, NkStyleButton tab_maximize_button, NkStyleButton tab_minimize_button, NkStyleButton node_maximize_button, NkStyleButton node_minimize_button, int sym_minimize, int sym_maximize, float border, float rounding, float indent, NkVec2 padding, NkVec2 spacing, float color_factor, float disabled_factor)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static NkColor ntext(long struct)
      Unsafe version of text().
    • ntab_maximize_button

      public static NkStyleButton ntab_maximize_button(long struct)
      Unsafe version of tab_maximize_button().
    • ntab_minimize_button

      public static NkStyleButton ntab_minimize_button(long struct)
      Unsafe version of tab_minimize_button().
    • nnode_maximize_button

      public static NkStyleButton nnode_maximize_button(long struct)
      Unsafe version of node_maximize_button().
    • nnode_minimize_button

      public static NkStyleButton nnode_minimize_button(long struct)
      Unsafe version of node_minimize_button().
    • nsym_minimize

      public static int nsym_minimize(long struct)
      Unsafe version of sym_minimize().
    • nsym_maximize

      public static int nsym_maximize(long struct)
      Unsafe version of sym_maximize().
    • nborder

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

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

      public static float nindent(long struct)
      Unsafe version of indent().
    • npadding

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

      public static NkVec2 nspacing(long struct)
      Unsafe version of spacing().
    • 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().
    • 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.
    • ntext

      public static void ntext(long struct, NkColor value)
      Unsafe version of text.
    • ntab_maximize_button

      public static void ntab_maximize_button(long struct, NkStyleButton value)
      Unsafe version of tab_maximize_button.
    • ntab_minimize_button

      public static void ntab_minimize_button(long struct, NkStyleButton value)
      Unsafe version of tab_minimize_button.
    • nnode_maximize_button

      public static void nnode_maximize_button(long struct, NkStyleButton value)
      Unsafe version of node_maximize_button.
    • nnode_minimize_button

      public static void nnode_minimize_button(long struct, NkStyleButton value)
      Unsafe version of node_minimize_button.
    • nsym_minimize

      public static void nsym_minimize(long struct, int value)
      Unsafe version of sym_minimize.
    • nsym_maximize

      public static void nsym_maximize(long struct, int value)
      Unsafe version of sym_maximize.
    • 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.
    • nindent

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