Package org.lwjgl.nanovg
Class BNDwidgetTheme
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.BNDwidgetTheme
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class BNDwidgetTheme extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes 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.Layout
struct BNDwidgetTheme {NVGcoloroutlineColor();NVGcoloritemColor();NVGcolorinnerColor();NVGcolorinnerSelectedColor();NVGcolortextColor();NVGcolortextSelectedColor(); intshadeTop(); intshadeDown(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBNDwidgetTheme.BufferAn array ofBNDwidgetThemestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intINNERCOLOR
INNERSELECTEDCOLOR
ITEMCOLOR
OUTLINECOLOR
SHADEDOWN
SHADETOPThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTEXTCOLOR
TEXTSELECTEDCOLORThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BNDwidgetTheme(java.nio.ByteBuffer container)Creates aBNDwidgetThemeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BNDwidgetThemecalloc()Returns a newBNDwidgetThemeinstance allocated withmemCalloc.static BNDwidgetTheme.Buffercalloc(int capacity)Returns a newBNDwidgetTheme.Bufferinstance allocated withmemCalloc.static BNDwidgetTheme.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBNDwidgetTheme.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BNDwidgetThemecalloc(org.lwjgl.system.MemoryStack stack)Returns a newBNDwidgetThemeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static BNDwidgetThemecallocStack()Deprecated.static BNDwidgetTheme.BuffercallocStack(int capacity)Deprecated.static BNDwidgetTheme.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BNDwidgetThemecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static BNDwidgetThemecreate()Returns a newBNDwidgetThemeinstance allocated withBufferUtils.static BNDwidgetTheme.Buffercreate(int capacity)Returns a newBNDwidgetTheme.Bufferinstance allocated withBufferUtils.static BNDwidgetThemecreate(long address)Returns a newBNDwidgetThemeinstance for the specified memory address.static BNDwidgetTheme.Buffercreate(long address, int capacity)Create aBNDwidgetTheme.Bufferinstance at the specified memory.static BNDwidgetThemecreateSafe(long address)static BNDwidgetTheme.BuffercreateSafe(long address, int capacity)NVGColorinnerColor()fill color of widget boxBNDwidgetThemeinnerColor(java.util.function.Consumer<NVGColor> consumer)Passes theinnerColor()field to the specifiedConsumer.BNDwidgetThemeinnerColor(NVGColor value)Copies the specifiedNVGColorto theinnerColor()field.NVGColorinnerSelectedColor()fill color of widget box when activeBNDwidgetThemeinnerSelectedColor(java.util.function.Consumer<NVGColor> consumer)Passes theinnerSelectedColor()field to the specifiedConsumer.BNDwidgetThemeinnerSelectedColor(NVGColor value)Copies the specifiedNVGColorto theinnerSelectedColor()field.NVGColoritemColor()color of widget item (meaning changes depending on class)BNDwidgetThemeitemColor(java.util.function.Consumer<NVGColor> consumer)Passes theitemColor()field to the specifiedConsumer.BNDwidgetThemeitemColor(NVGColor value)Copies the specifiedNVGColorto theitemColor()field.static BNDwidgetThememalloc()Returns a newBNDwidgetThemeinstance allocated withmemAlloc.static BNDwidgetTheme.Buffermalloc(int capacity)Returns a newBNDwidgetTheme.Bufferinstance allocated withmemAlloc.static BNDwidgetTheme.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newBNDwidgetTheme.Bufferinstance allocated on the specifiedMemoryStack.static BNDwidgetThememalloc(org.lwjgl.system.MemoryStack stack)Returns a newBNDwidgetThemeinstance allocated on the specifiedMemoryStack.static BNDwidgetThememallocStack()Deprecated.static BNDwidgetTheme.BuffermallocStack(int capacity)Deprecated.static BNDwidgetTheme.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static BNDwidgetThememallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static NVGColorninnerColor(long struct)Unsafe version ofinnerColor().static voidninnerColor(long struct, NVGColor value)Unsafe version ofinnerColor.static NVGColorninnerSelectedColor(long struct)Unsafe version ofinnerSelectedColor().static voidninnerSelectedColor(long struct, NVGColor value)Unsafe version ofinnerSelectedColor.static NVGColornitemColor(long struct)Unsafe version ofitemColor().static voidnitemColor(long struct, NVGColor value)Unsafe version ofitemColor.static NVGColornoutlineColor(long struct)Unsafe version ofoutlineColor().static voidnoutlineColor(long struct, NVGColor value)Unsafe version ofoutlineColor.static intnshadeDown(long struct)Unsafe version ofshadeDown().static voidnshadeDown(long struct, int value)Unsafe version ofshadeDown.static intnshadeTop(long struct)Unsafe version ofshadeTop().static voidnshadeTop(long struct, int value)Unsafe version ofshadeTop.static NVGColorntextColor(long struct)Unsafe version oftextColor().static voidntextColor(long struct, NVGColor value)Unsafe version oftextColor.static NVGColorntextSelectedColor(long struct)Unsafe version oftextSelectedColor().static voidntextSelectedColor(long struct, NVGColor value)Unsafe version oftextSelectedColor.NVGColoroutlineColor()color of widget box outlineBNDwidgetThemeoutlineColor(java.util.function.Consumer<NVGColor> consumer)Passes theoutlineColor()field to the specifiedConsumer.BNDwidgetThemeoutlineColor(NVGColor value)Copies the specifiedNVGColorto theoutlineColor()field.BNDwidgetThemeset(BNDwidgetTheme src)Copies the specified struct data to this struct.BNDwidgetThemeset(NVGColor outlineColor, NVGColor itemColor, NVGColor innerColor, NVGColor innerSelectedColor, NVGColor textColor, NVGColor textSelectedColor, int shadeTop, int shadeDown)Initializes this struct with the specified values.intshadeDown()delta modifier for lower part of gradient (-100 to 100)BNDwidgetThemeshadeDown(int value)Sets the specified value to theshadeDown()field.intshadeTop()delta modifier for upper part of gradient (-100 to 100)BNDwidgetThemeshadeTop(int value)Sets the specified value to theshadeTop()field.intsizeof()NVGColortextColor()color of text labelBNDwidgetThemetextColor(java.util.function.Consumer<NVGColor> consumer)Passes thetextColor()field to the specifiedConsumer.BNDwidgetThemetextColor(NVGColor value)Copies the specifiedNVGColorto thetextColor()field.NVGColortextSelectedColor()color of text label when activeBNDwidgetThemetextSelectedColor(java.util.function.Consumer<NVGColor> consumer)Passes thetextSelectedColor()field to the specifiedConsumer.BNDwidgetThemetextSelectedColor(NVGColor value)Copies the specifiedNVGColorto thetextSelectedColor()field.
-
-
-
Constructor Detail
-
BNDwidgetTheme
public BNDwidgetTheme(java.nio.ByteBuffer container)
Creates aBNDwidgetThemeinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
outlineColor
public NVGColor outlineColor()
color of widget box outline
-
itemColor
public NVGColor itemColor()
color of widget item (meaning changes depending on class)
-
innerColor
public NVGColor innerColor()
fill color of widget box
-
innerSelectedColor
public NVGColor innerSelectedColor()
fill color of widget box when active
-
textColor
public NVGColor textColor()
color of text label
-
textSelectedColor
public NVGColor textSelectedColor()
color of text label when active
-
shadeTop
public int shadeTop()
delta modifier for upper part of gradient (-100 to 100)
-
shadeDown
public int shadeDown()
delta modifier for lower part of gradient (-100 to 100)
-
outlineColor
public BNDwidgetTheme outlineColor(NVGColor value)
Copies the specifiedNVGColorto theoutlineColor()field.
-
outlineColor
public BNDwidgetTheme outlineColor(java.util.function.Consumer<NVGColor> consumer)
Passes theoutlineColor()field to the specifiedConsumer.
-
itemColor
public BNDwidgetTheme itemColor(NVGColor value)
Copies the specifiedNVGColorto theitemColor()field.
-
itemColor
public BNDwidgetTheme itemColor(java.util.function.Consumer<NVGColor> consumer)
Passes theitemColor()field to the specifiedConsumer.
-
innerColor
public BNDwidgetTheme innerColor(NVGColor value)
Copies the specifiedNVGColorto theinnerColor()field.
-
innerColor
public BNDwidgetTheme innerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theinnerColor()field to the specifiedConsumer.
-
innerSelectedColor
public BNDwidgetTheme innerSelectedColor(NVGColor value)
Copies the specifiedNVGColorto theinnerSelectedColor()field.
-
innerSelectedColor
public BNDwidgetTheme innerSelectedColor(java.util.function.Consumer<NVGColor> consumer)
Passes theinnerSelectedColor()field to the specifiedConsumer.
-
textColor
public BNDwidgetTheme textColor(NVGColor value)
Copies the specifiedNVGColorto thetextColor()field.
-
textColor
public BNDwidgetTheme textColor(java.util.function.Consumer<NVGColor> consumer)
Passes thetextColor()field to the specifiedConsumer.
-
textSelectedColor
public BNDwidgetTheme textSelectedColor(NVGColor value)
Copies the specifiedNVGColorto thetextSelectedColor()field.
-
textSelectedColor
public BNDwidgetTheme textSelectedColor(java.util.function.Consumer<NVGColor> consumer)
Passes thetextSelectedColor()field to the specifiedConsumer.
-
shadeTop
public BNDwidgetTheme shadeTop(int value)
Sets the specified value to theshadeTop()field.
-
shadeDown
public BNDwidgetTheme shadeDown(int value)
Sets the specified value to theshadeDown()field.
-
set
public BNDwidgetTheme set(NVGColor outlineColor, NVGColor itemColor, NVGColor innerColor, NVGColor innerSelectedColor, NVGColor textColor, NVGColor textSelectedColor, int shadeTop, int shadeDown)
Initializes this struct with the specified values.
-
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 newBNDwidgetThemeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static BNDwidgetTheme calloc()
Returns a newBNDwidgetThemeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static BNDwidgetTheme create()
Returns a newBNDwidgetThemeinstance allocated withBufferUtils.
-
create
public static BNDwidgetTheme create(long address)
Returns a newBNDwidgetThemeinstance for the specified memory address.
-
createSafe
@Nullable public static BNDwidgetTheme createSafe(long address)
-
malloc
public static BNDwidgetTheme.Buffer malloc(int capacity)
Returns a newBNDwidgetTheme.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static BNDwidgetTheme.Buffer calloc(int capacity)
Returns a newBNDwidgetTheme.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static BNDwidgetTheme.Buffer create(int capacity)
Returns a newBNDwidgetTheme.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static BNDwidgetTheme.Buffer create(long address, int capacity)
Create aBNDwidgetTheme.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static BNDwidgetTheme.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static BNDwidgetTheme mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BNDwidgetTheme callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BNDwidgetTheme mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static BNDwidgetTheme callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static BNDwidgetTheme.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BNDwidgetTheme.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static BNDwidgetTheme.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static BNDwidgetTheme.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static BNDwidgetTheme malloc(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetThemeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static BNDwidgetTheme calloc(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetThemeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static BNDwidgetTheme.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static BNDwidgetTheme.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
noutlineColor
public static NVGColor noutlineColor(long struct)
Unsafe version ofoutlineColor().
-
nitemColor
public static NVGColor nitemColor(long struct)
Unsafe version ofitemColor().
-
ninnerColor
public static NVGColor ninnerColor(long struct)
Unsafe version ofinnerColor().
-
ninnerSelectedColor
public static NVGColor ninnerSelectedColor(long struct)
Unsafe version ofinnerSelectedColor().
-
ntextColor
public static NVGColor ntextColor(long struct)
Unsafe version oftextColor().
-
ntextSelectedColor
public static NVGColor ntextSelectedColor(long struct)
Unsafe version oftextSelectedColor().
-
nshadeTop
public static int nshadeTop(long struct)
Unsafe version ofshadeTop().
-
nshadeDown
public static int nshadeDown(long struct)
Unsafe version ofshadeDown().
-
noutlineColor
public static void noutlineColor(long struct, NVGColor value)Unsafe version ofoutlineColor.
-
ninnerColor
public static void ninnerColor(long struct, NVGColor value)Unsafe version ofinnerColor.
-
ninnerSelectedColor
public static void ninnerSelectedColor(long struct, NVGColor value)Unsafe version ofinnerSelectedColor.
-
ntextSelectedColor
public static void ntextSelectedColor(long struct, NVGColor value)Unsafe version oftextSelectedColor.
-
nshadeTop
public static void nshadeTop(long struct, int value)Unsafe version ofshadeTop.
-
nshadeDown
public static void nshadeDown(long struct, int value)Unsafe version ofshadeDown.
-
-