Class BNDnodeTheme

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class BNDnodeTheme
    extends Struct
    implements NativeResource
    Describes the theme used to draw nodes.

    Member documentation

    • nodeSelectedColor – inner color of selected node (and downarrow)
    • wiresColor – outline of wires
    • textSelectedColor – color of text label when active
    • activeNodeColor – inner color of active node (and dragged wire)
    • wireSelectColor – color of selected wire
    • nodeBackdropColor – color of background of node
    • noodleCurving – how much a noodle curves (0 to 10)

    Layout

    
     struct BNDnodeTheme {
         NVGcolor nodeSelectedColor;
         NVGcolor wiresColor;
         NVGcolor textSelectedColor;
         NVGcolor activeNodeColor;
         NVGcolor wireSelectColor;
         NVGcolor nodeBackdropColor;
         int noodleCurving;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NODESELECTEDCOLOR, WIRESCOLOR, TEXTSELECTEDCOLOR, ACTIVENODECOLOR, WIRESELECTCOLOR, NODEBACKDROPCOLOR, NOODLECURVING

        The struct member offsets.
    • Constructor Detail

      • BNDnodeTheme

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

        public NVGColor nodeSelectedColor()
        Returns a NVGColor view of the nodeSelectedColor field.
      • wiresColor

        public NVGColor wiresColor()
        Returns a NVGColor view of the wiresColor field.
      • textSelectedColor

        public NVGColor textSelectedColor()
        Returns a NVGColor view of the textSelectedColor field.
      • activeNodeColor

        public NVGColor activeNodeColor()
        Returns a NVGColor view of the activeNodeColor field.
      • wireSelectColor

        public NVGColor wireSelectColor()
        Returns a NVGColor view of the wireSelectColor field.
      • nodeBackdropColor

        public NVGColor nodeBackdropColor()
        Returns a NVGColor view of the nodeBackdropColor field.
      • noodleCurving

        public int noodleCurving()
        Returns the value of the noodleCurving field.
      • nodeSelectedColor

        public BNDnodeTheme nodeSelectedColor​(NVGColor value)
        Copies the specified NVGColor to the nodeSelectedColor field.
      • nodeSelectedColor

        public BNDnodeTheme nodeSelectedColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the nodeSelectedColor field to the specified Consumer.
      • wiresColor

        public BNDnodeTheme wiresColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the wiresColor field to the specified Consumer.
      • textSelectedColor

        public BNDnodeTheme textSelectedColor​(NVGColor value)
        Copies the specified NVGColor to the textSelectedColor field.
      • textSelectedColor

        public BNDnodeTheme textSelectedColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the textSelectedColor field to the specified Consumer.
      • activeNodeColor

        public BNDnodeTheme activeNodeColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the activeNodeColor field to the specified Consumer.
      • wireSelectColor

        public BNDnodeTheme wireSelectColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the wireSelectColor field to the specified Consumer.
      • nodeBackdropColor

        public BNDnodeTheme nodeBackdropColor​(NVGColor value)
        Copies the specified NVGColor to the nodeBackdropColor field.
      • nodeBackdropColor

        public BNDnodeTheme nodeBackdropColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the nodeBackdropColor field to the specified Consumer.
      • noodleCurving

        public BNDnodeTheme noodleCurving​(int value)
        Sets the specified value to the noodleCurving field.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static int nnoodleCurving​(long struct)
        Unsafe version of noodleCurving().
      • nnodeSelectedColor

        public static void nnodeSelectedColor​(long struct,
                                              NVGColor value)
        Unsafe version of nodeSelectedColor.
      • nwiresColor

        public static void nwiresColor​(long struct,
                                       NVGColor value)
        Unsafe version of wiresColor.
      • ntextSelectedColor

        public static void ntextSelectedColor​(long struct,
                                              NVGColor value)
        Unsafe version of textSelectedColor.
      • nactiveNodeColor

        public static void nactiveNodeColor​(long struct,
                                            NVGColor value)
        Unsafe version of activeNodeColor.
      • nwireSelectColor

        public static void nwireSelectColor​(long struct,
                                            NVGColor value)
        Unsafe version of wireSelectColor.
      • nnodeBackdropColor

        public static void nnodeBackdropColor​(long struct,
                                              NVGColor value)
        Unsafe version of nodeBackdropColor.
      • nnoodleCurving

        public static void nnoodleCurving​(long struct,
                                          int value)
        Unsafe version of noodleCurving.