Class BNDwidgetTheme

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

    public class BNDwidgetTheme
    extends Struct
    implements NativeResource
    Describes the theme used to draw a single widget or widget box; these values correspond to the same values that can be retrieved from the Theme panel in the Blender preferences.

    Member documentation

    • outlineColor – color of widget box outline
    • itemColor – color of widget item (meaning changes depending on class)
    • innerColor – fill color of widget box
    • innerSelectedColor – fill color of widget box when active
    • textColor – color of text label
    • textSelectedColor – color of text label when active
    • shadeTop – delta modifier for upper part of gradient (-100 to 100)
    • shadeDown – delta modifier for lower part of gradient (-100 to 100)

    Layout

    
     struct BNDwidgetTheme {
         NVGcolor outlineColor;
         NVGcolor itemColor;
         NVGcolor innerColor;
         NVGcolor innerSelectedColor;
         NVGcolor textColor;
         NVGcolor textSelectedColor;
         int shadeTop;
         int shadeDown;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • OUTLINECOLOR, ITEMCOLOR, INNERCOLOR, INNERSELECTEDCOLOR, TEXTCOLOR, TEXTSELECTEDCOLOR, SHADETOP, SHADEDOWN

        The struct member offsets.
    • Constructor Detail

      • BNDwidgetTheme

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

        public NVGColor outlineColor()
        Returns a NVGColor view of the outlineColor field.
      • itemColor

        public NVGColor itemColor()
        Returns a NVGColor view of the itemColor field.
      • innerColor

        public NVGColor innerColor()
        Returns a NVGColor view of the innerColor field.
      • innerSelectedColor

        public NVGColor innerSelectedColor()
        Returns a NVGColor view of the innerSelectedColor field.
      • textColor

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

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

        public int shadeTop()
        Returns the value of the shadeTop field.
      • shadeDown

        public int shadeDown()
        Returns the value of the shadeDown field.
      • outlineColor

        public BNDwidgetTheme outlineColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the outlineColor field to the specified Consumer.
      • itemColor

        public BNDwidgetTheme itemColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the itemColor field to the specified Consumer.
      • innerColor

        public BNDwidgetTheme innerColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the innerColor field to the specified Consumer.
      • innerSelectedColor

        public BNDwidgetTheme innerSelectedColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the innerSelectedColor field to the specified Consumer.
      • textColor

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

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

        public BNDwidgetTheme shadeTop​(int value)
        Sets the specified value to the shadeTop field.
      • shadeDown

        public BNDwidgetTheme shadeDown​(int value)
        Sets the specified value to the shadeDown field.
      • set

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

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

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

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

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

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

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

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

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

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

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

        public static NVGColor nitemColor​(long struct)
        Unsafe version of itemColor().
      • ntextColor

        public static NVGColor ntextColor​(long struct)
        Unsafe version of textColor().
      • nshadeTop

        public static int nshadeTop​(long struct)
        Unsafe version of shadeTop().
      • nshadeDown

        public static int nshadeDown​(long struct)
        Unsafe version of shadeDown().
      • noutlineColor

        public static void noutlineColor​(long struct,
                                         NVGColor value)
        Unsafe version of outlineColor.
      • nitemColor

        public static void nitemColor​(long struct,
                                      NVGColor value)
        Unsafe version of itemColor.
      • ninnerColor

        public static void ninnerColor​(long struct,
                                       NVGColor value)
        Unsafe version of innerColor.
      • ninnerSelectedColor

        public static void ninnerSelectedColor​(long struct,
                                               NVGColor value)
        Unsafe version of innerSelectedColor.
      • ntextColor

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

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

        public static void nshadeTop​(long struct,
                                     int value)
        Unsafe version of shadeTop.
      • nshadeDown

        public static void nshadeDown​(long struct,
                                      int value)
        Unsafe version of shadeDown.