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.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 outlineitemColor
– color of widget item (meaning changes depending on class)innerColor
– fill color of widget boxinnerSelectedColor
– fill color of widget box when activetextColor
– color of text labeltextSelectedColor
– color of text label when activeshadeTop
– 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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BNDwidgetTheme.Buffer
An array ofBNDwidgetTheme
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
INNERCOLOR
INNERSELECTEDCOLOR
ITEMCOLOR
OUTLINECOLOR
SHADEDOWN
SHADETOPThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TEXTCOLOR
TEXTSELECTEDCOLORThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description BNDwidgetTheme(java.nio.ByteBuffer container)
Creates aBNDwidgetTheme
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BNDwidgetTheme
calloc()
Returns a newBNDwidgetTheme
instance allocated withmemCalloc
.static BNDwidgetTheme.Buffer
calloc(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withmemCalloc
.static BNDwidgetTheme
callocStack()
Returns a newBNDwidgetTheme
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BNDwidgetTheme.Buffer
callocStack(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static BNDwidgetTheme.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BNDwidgetTheme
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static BNDwidgetTheme
create()
Returns a newBNDwidgetTheme
instance allocated withBufferUtils
.static BNDwidgetTheme.Buffer
create(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withBufferUtils
.static BNDwidgetTheme
create(long address)
Returns a newBNDwidgetTheme
instance for the specified memory address.static BNDwidgetTheme.Buffer
create(long address, int capacity)
Create aBNDwidgetTheme.Buffer
instance at the specified memory.static BNDwidgetTheme
createSafe(long address)
static BNDwidgetTheme.Buffer
createSafe(long address, int capacity)
NVGColor
innerColor()
Returns aNVGColor
view of theinnerColor
field.BNDwidgetTheme
innerColor(java.util.function.Consumer<NVGColor> consumer)
Passes theinnerColor
field to the specifiedConsumer
.BNDwidgetTheme
innerColor(NVGColor value)
Copies the specifiedNVGColor
to theinnerColor
field.NVGColor
innerSelectedColor()
Returns aNVGColor
view of theinnerSelectedColor
field.BNDwidgetTheme
innerSelectedColor(java.util.function.Consumer<NVGColor> consumer)
Passes theinnerSelectedColor
field to the specifiedConsumer
.BNDwidgetTheme
innerSelectedColor(NVGColor value)
Copies the specifiedNVGColor
to theinnerSelectedColor
field.NVGColor
itemColor()
Returns aNVGColor
view of theitemColor
field.BNDwidgetTheme
itemColor(java.util.function.Consumer<NVGColor> consumer)
Passes theitemColor
field to the specifiedConsumer
.BNDwidgetTheme
itemColor(NVGColor value)
Copies the specifiedNVGColor
to theitemColor
field.static BNDwidgetTheme
malloc()
Returns a newBNDwidgetTheme
instance allocated withmemAlloc
.static BNDwidgetTheme.Buffer
malloc(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withmemAlloc
.static BNDwidgetTheme
mallocStack()
Returns a newBNDwidgetTheme
instance allocated on the thread-localMemoryStack
.static BNDwidgetTheme.Buffer
mallocStack(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the thread-localMemoryStack
.static BNDwidgetTheme.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the specifiedMemoryStack
.static BNDwidgetTheme
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme
instance allocated on the specifiedMemoryStack
.static NVGColor
ninnerColor(long struct)
Unsafe version ofinnerColor()
.static void
ninnerColor(long struct, NVGColor value)
Unsafe version ofinnerColor
.static NVGColor
ninnerSelectedColor(long struct)
Unsafe version ofinnerSelectedColor()
.static void
ninnerSelectedColor(long struct, NVGColor value)
Unsafe version ofinnerSelectedColor
.static NVGColor
nitemColor(long struct)
Unsafe version ofitemColor()
.static void
nitemColor(long struct, NVGColor value)
Unsafe version ofitemColor
.static NVGColor
noutlineColor(long struct)
Unsafe version ofoutlineColor()
.static void
noutlineColor(long struct, NVGColor value)
Unsafe version ofoutlineColor
.static int
nshadeDown(long struct)
Unsafe version ofshadeDown()
.static void
nshadeDown(long struct, int value)
Unsafe version ofshadeDown
.static int
nshadeTop(long struct)
Unsafe version ofshadeTop()
.static void
nshadeTop(long struct, int value)
Unsafe version ofshadeTop
.static NVGColor
ntextColor(long struct)
Unsafe version oftextColor()
.static void
ntextColor(long struct, NVGColor value)
Unsafe version oftextColor
.static NVGColor
ntextSelectedColor(long struct)
Unsafe version oftextSelectedColor()
.static void
ntextSelectedColor(long struct, NVGColor value)
Unsafe version oftextSelectedColor
.NVGColor
outlineColor()
Returns aNVGColor
view of theoutlineColor
field.BNDwidgetTheme
outlineColor(java.util.function.Consumer<NVGColor> consumer)
Passes theoutlineColor
field to the specifiedConsumer
.BNDwidgetTheme
outlineColor(NVGColor value)
Copies the specifiedNVGColor
to theoutlineColor
field.BNDwidgetTheme
set(BNDwidgetTheme src)
Copies the specified struct data to this struct.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.int
shadeDown()
Returns the value of theshadeDown
field.BNDwidgetTheme
shadeDown(int value)
Sets the specified value to theshadeDown
field.int
shadeTop()
Returns the value of theshadeTop
field.BNDwidgetTheme
shadeTop(int value)
Sets the specified value to theshadeTop
field.int
sizeof()
NVGColor
textColor()
Returns aNVGColor
view of thetextColor
field.BNDwidgetTheme
textColor(java.util.function.Consumer<NVGColor> consumer)
Passes thetextColor
field to the specifiedConsumer
.BNDwidgetTheme
textColor(NVGColor value)
Copies the specifiedNVGColor
to thetextColor
field.NVGColor
textSelectedColor()
Returns aNVGColor
view of thetextSelectedColor
field.BNDwidgetTheme
textSelectedColor(java.util.function.Consumer<NVGColor> consumer)
Passes thetextSelectedColor
field to the specifiedConsumer
.BNDwidgetTheme
textSelectedColor(NVGColor value)
Copies the specifiedNVGColor
to thetextSelectedColor
field.
-
-
-
Constructor Detail
-
BNDwidgetTheme
public BNDwidgetTheme(java.nio.ByteBuffer container)
Creates aBNDwidgetTheme
instance at the current position of the specifiedByteBuffer
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
innerSelectedColor
public NVGColor innerSelectedColor()
Returns aNVGColor
view of theinnerSelectedColor
field.
-
textSelectedColor
public NVGColor textSelectedColor()
Returns aNVGColor
view of thetextSelectedColor
field.
-
shadeTop
public int shadeTop()
Returns the value of theshadeTop
field.
-
shadeDown
public int shadeDown()
Returns the value of theshadeDown
field.
-
outlineColor
public BNDwidgetTheme outlineColor(NVGColor value)
Copies the specifiedNVGColor
to 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 specifiedNVGColor
to 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 specifiedNVGColor
to 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 specifiedNVGColor
to 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 specifiedNVGColor
to 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 specifiedNVGColor
to 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 newBNDwidgetTheme
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static BNDwidgetTheme calloc()
Returns a newBNDwidgetTheme
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static BNDwidgetTheme create()
Returns a newBNDwidgetTheme
instance allocated withBufferUtils
.
-
create
public static BNDwidgetTheme create(long address)
Returns a newBNDwidgetTheme
instance for the specified memory address.
-
createSafe
@Nullable public static BNDwidgetTheme createSafe(long address)
-
malloc
public static BNDwidgetTheme.Buffer malloc(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static BNDwidgetTheme.Buffer calloc(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static BNDwidgetTheme.Buffer create(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static BNDwidgetTheme.Buffer create(long address, int capacity)
Create aBNDwidgetTheme.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static BNDwidgetTheme.Buffer createSafe(long address, int capacity)
-
mallocStack
public static BNDwidgetTheme mallocStack()
Returns a newBNDwidgetTheme
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static BNDwidgetTheme callocStack()
Returns a newBNDwidgetTheme
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static BNDwidgetTheme mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static BNDwidgetTheme callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static BNDwidgetTheme.Buffer mallocStack(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static BNDwidgetTheme.Buffer callocStack(int capacity)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static BNDwidgetTheme.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static BNDwidgetTheme.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newBNDwidgetTheme.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-