Class NkTextUndoState

All Implemented Interfaces:
Pointer

public class NkTextUndoState extends Struct<NkTextUndoState>

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 Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • UNDO_REC

      public static final int UNDO_REC
      The struct member offsets.
    • UNDO_CHAR

      public static final int UNDO_CHAR
      The struct member offsets.
    • UNDO_POINT

      public static final int UNDO_POINT
      The struct member offsets.
    • REDO_POINT

      public static final int REDO_POINT
      The struct member offsets.
    • UNDO_CHAR_POINT

      public static final int UNDO_CHAR_POINT
      The struct member offsets.
    • REDO_CHAR_POINT

      public static final int REDO_CHAR_POINT
      The struct member offsets.
  • Constructor Details

    • NkTextUndoState

      public NkTextUndoState(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NkTextUndoState>
    • undo_rec

      public NkTextUndoRecord.Buffer undo_rec()
      Returns:
      a NkTextUndoRecord.Buffer view of the undo_rec field.
    • undo_rec

      public NkTextUndoRecord undo_rec(int index)
      Returns:
      a NkTextUndoRecord view of the struct at the specified index of the undo_rec field.
    • undo_char

      public 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_rec

      public static NkTextUndoRecord.Buffer nundo_rec(long struct)
      Unsafe version of undo_rec().
    • nundo_rec

      public static NkTextUndoRecord nundo_rec(long struct, int index)
      Unsafe version of undo_rec.
    • nundo_char

      public static 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().