Class NkTextEdit

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • CLIP, STRING, FILTER, SCROLLBAR, CURSOR, SELECT_START, SELECT_END, MODE, CURSOR_AT_END_OF_LINE, INITIALIZED, HAS_PREFERRED_X, SINGLE_LINE, ACTIVE, PREFERRED_X, UNDO

        The struct member offsets.
    • Constructor Detail

      • NkTextEdit

        public NkTextEdit​(java.nio.ByteBuffer container)
        Creates a NkTextEdit 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
      • string

        public NkStr string()
        Returns a NkStr view of the string field.
      • filter

        @Nullable
        public NkPluginFilter filter()
        Returns the value of the filter field.
      • scrollbar

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

        public int cursor()
        Returns the value of the cursor field.
      • select_start

        public int select_start()
        Returns the value of the select_start field.
      • select_end

        public int select_end()
        Returns the value of the select_end field.
      • mode

        public byte mode()
        Returns the value of the mode field.
      • cursor_at_end_of_line

        public boolean cursor_at_end_of_line()
        Returns the value of the cursor_at_end_of_line field.
      • initialized

        public boolean initialized()
        Returns the value of the initialized field.
      • has_preferred_x

        public boolean has_preferred_x()
        Returns the value of the has_preferred_x field.
      • single_line

        public boolean single_line()
        Returns the value of the single_line field.
      • active

        public boolean active()
        Returns the value of the active field.
      • preferred_x

        public float preferred_x()
        Returns the value of the preferred_x field.
      • malloc

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

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

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

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

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

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

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

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

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

        public static NkTextEdit mallocStack()
        Returns a new NkTextEdit instance allocated on the thread-local MemoryStack.
      • callocStack

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

        public static NkTextEdit mallocStack​(MemoryStack stack)
        Returns a new NkTextEdit instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

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

        public static NkTextEdit.Buffer callocStack​(int capacity,
                                                    MemoryStack stack)
        Returns a new NkTextEdit.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
      • nstring

        public static NkStr nstring​(long struct)
        Unsafe version of string().
      • nscrollbar

        public static NkVec2 nscrollbar​(long struct)
        Unsafe version of scrollbar().
      • ncursor

        public static int ncursor​(long struct)
        Unsafe version of cursor().
      • nselect_start

        public static int nselect_start​(long struct)
        Unsafe version of select_start().
      • nselect_end

        public static int nselect_end​(long struct)
        Unsafe version of select_end().
      • nmode

        public static byte nmode​(long struct)
        Unsafe version of mode().
      • ncursor_at_end_of_line

        public static boolean ncursor_at_end_of_line​(long struct)
        Unsafe version of cursor_at_end_of_line().
      • ninitialized

        public static boolean ninitialized​(long struct)
        Unsafe version of initialized().
      • nhas_preferred_x

        public static boolean nhas_preferred_x​(long struct)
        Unsafe version of has_preferred_x().
      • nsingle_line

        public static boolean nsingle_line​(long struct)
        Unsafe version of single_line().
      • nactive

        public static boolean nactive​(long struct)
        Unsafe version of active().
      • npreferred_x

        public static float npreferred_x​(long struct)
        Unsafe version of preferred_x().