Class NkStyleText

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • COLOR, PADDING

        The struct member offsets.
    • Constructor Detail

      • NkStyleText

        public NkStyleText​(java.nio.ByteBuffer container)
        Creates a NkStyleText 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • color

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

        public NkStyleText color​(java.util.function.Consumer<NkColor> consumer)
        Passes the color field to the specified Consumer.
      • padding

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

        public NkStyleText padding​(java.util.function.Consumer<NkVec2> consumer)
        Passes the padding field to the specified Consumer.
      • set

        public NkStyleText set​(NkStyleText src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

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

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

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

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

        public static NkStyleText callocStack()
        Returns a new NkStyleText instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • callocStack

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

        public static NkStyleText.Buffer callocStack​(int capacity)
        Returns a new NkStyleText.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

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

        public static NkColor ncolor​(long struct)
        Unsafe version of color().
      • npadding

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

        public static void ncolor​(long struct,
                                  NkColor value)
        Unsafe version of color.
      • npadding

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