Class NkTextUndoState

  • All Implemented Interfaces:
    Pointer

    public class NkTextUndoState
    extends Struct

    Layout

    
     struct nk_text_undo_state {
         struct nk_text_undo_record undo_rec[99];
         nk_rune undo_char[999];
         short undo_point;
         short redo_point;
         short undo_char_point;
         short redo_char_point;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • UNDO_REC, UNDO_CHAR, UNDO_POINT, REDO_POINT, UNDO_CHAR_POINT, REDO_CHAR_POINT

        The struct member offsets.
    • Constructor Detail

      • NkTextUndoState

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

        public java.nio.IntBuffer undo_char()
        Returns a IntBuffer view of the undo_char field.
      • undo_char

        public int undo_char​(int index)
        Returns the value at the specified index of the undo_char field.
      • undo_point

        public short undo_point()
        Returns the value of the undo_point field.
      • redo_point

        public short redo_point()
        Returns the value of the redo_point field.
      • undo_char_point

        public short undo_char_point()
        Returns the value of the undo_char_point field.
      • redo_char_point

        public short redo_char_point()
        Returns the value of the redo_char_point field.
      • create

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

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

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

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

        public static java.nio.IntBuffer nundo_char​(long struct)
        Unsafe version of undo_char().
      • nundo_char

        public static int nundo_char​(long struct,
                                     int index)
        Unsafe version of undo_char.
      • nundo_point

        public static short nundo_point​(long struct)
        Unsafe version of undo_point().
      • nredo_point

        public static short nredo_point​(long struct)
        Unsafe version of redo_point().
      • nundo_char_point

        public static short nundo_char_point​(long struct)
        Unsafe version of undo_char_point().
      • nredo_char_point

        public static short nredo_char_point​(long struct)
        Unsafe version of redo_char_point().