Class NkEditState

  • All Implemented Interfaces:

    public class NkEditState
    extends Struct


     struct nk_edit_state {
         nk_hash name;
         unsigned int seq;
         unsigned int old;
         int active;
         int prev;
         int cursor;
         int sel_start;
         int sel_end;
         struct nk_scroll scrollbar;
         unsigned char mode;
         bool single_line;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • NkEditState

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

        public int name()
        Returns the value of the name field.
      • seq

        public int seq()
        Returns the value of the seq field.
      • old

        public int old()
        Returns the value of the old field.
      • active

        public int active()
        Returns the value of the active field.
      • prev

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

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

        public int sel_start()
        Returns the value of the sel_start field.
      • sel_end

        public int sel_end()
        Returns the value of the sel_end field.
      • scrollbar

        public NkScroll scrollbar()
        Returns a NkScroll view of the scrollbar field.
      • mode

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

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

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

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

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

        public static NkEditState.Buffer createSafe​(long address,
                                                    int capacity)
        Like create, but returns null if address is NULL.
      • nname

        public static int nname​(long struct)
        Unsafe version of name().
      • nseq

        public static int nseq​(long struct)
        Unsafe version of seq().
      • nold

        public static int nold​(long struct)
        Unsafe version of old().
      • nactive

        public static int nactive​(long struct)
        Unsafe version of active().
      • nprev

        public static int nprev​(long struct)
        Unsafe version of prev().
      • ncursor

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

        public static int nsel_start​(long struct)
        Unsafe version of sel_start().
      • nsel_end

        public static int nsel_end​(long struct)
        Unsafe version of sel_end().
      • nscrollbar

        public static NkScroll nscrollbar​(long struct)
        Unsafe version of scrollbar().
      • nmode

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

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