Panda3D
|
Public Types | |
enum | Type { T_none, T_flat, T_bevel_out, T_bevel_in, T_groove, T_ridge, T_texture_border } |
Public Member Functions | |
PGFrameStyle (const PGFrameStyle ©) | |
void | clear_texture () |
Removes the texture from the frame. More... | |
NodePath | generate_into (const NodePath &parent, const LVecBase4 &frame, int sort=0) |
Generates geometry representing a frame of the indicated size, and parents it to the indicated node, with the indicated scene graph sort order. More... | |
LColor | get_color () const |
Returns the dominant color of the frame. More... | |
LVecBase4 | get_internal_frame (const LVecBase4 &frame) const |
Computes the size of the internal frame, given the indicated external frame, appropriate for this kind of frame style. More... | |
Texture * | get_texture () const |
Returns the texture that has been applied to the frame, or NULL if no texture has been applied. More... | |
Type | get_type () const |
Returns the basic type of frame. More... | |
const LVecBase2 & | get_uv_width () const |
See set_uv_width(). More... | |
const LVecBase2 & | get_visible_scale () const |
Returns the scale factor on the visible representation of the frame, in the X and Y directions. More... | |
const LVecBase2 & | get_width () const |
Returns the width parameter, which has meaning only for certain frame types. More... | |
bool | has_texture () const |
Returns true if a texture has been applied to the frame. More... | |
void | operator= (const PGFrameStyle ©) |
void | output (ostream &out) const |
void | set_color (PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) |
Sets the dominant color of the frame. More... | |
void | set_color (const LColor &color) |
Sets the dominant color of the frame. More... | |
void | set_texture (Texture *texture) |
Specifies a texture that should be applied to the frame. More... | |
void | set_type (Type type) |
Sets the basic type of frame. More... | |
void | set_uv_width (PN_stdfloat u, PN_stdfloat v) |
Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width. More... | |
void | set_uv_width (const LVecBase2 &uv_width) |
Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width. More... | |
void | set_visible_scale (PN_stdfloat x, PN_stdfloat y) |
Sets a scale factor on the visible representation of the frame, in the X and Y directions. More... | |
void | set_visible_scale (const LVecBase2 &visible_scale) |
Sets a scale factor on the visible representation of the frame, in the X and Y directions. More... | |
void | set_width (PN_stdfloat x, PN_stdfloat y) |
Sets the width parameter, which has meaning only for certain frame types. More... | |
void | set_width (const LVecBase2 &width) |
Sets the width parameter, which has meaning only for certain frame types. More... | |
bool | xform (const LMatrix4 &mat) |
Applies the indicated transform to the FrameStyle. More... | |
Definition at line 31 of file pgFrameStyle.h.
|
inline |
Removes the texture from the frame.
Definition at line 159 of file pgFrameStyle.I.
References set_width().
Referenced by get_texture().
NodePath PGFrameStyle::generate_into | ( | const NodePath & | parent, |
const LVecBase4 & | frame, | ||
int | sort = 0 |
||
) |
Generates geometry representing a frame of the indicated size, and parents it to the indicated node, with the indicated scene graph sort order.
The return value is the generated NodePath, if any, or an empty NodePath if nothing is generated.
Definition at line 163 of file pgFrameStyle.cxx.
References GeomVertexWriter::add_data2(), GeomVertexWriter::add_data3(), GeomVertexWriter::add_data4(), NodePath::attach_new_node(), get_texture(), has_texture(), and LPoint3f::rfu().
Referenced by xform().
|
inline |
Returns the dominant color of the frame.
Definition at line 116 of file pgFrameStyle.I.
References set_texture().
Referenced by set_color().
Computes the size of the internal frame, given the indicated external frame, appropriate for this kind of frame style.
This simply subtracts the border width for those frame styles that include a border.
Definition at line 72 of file pgFrameStyle.cxx.
References get_texture(), get_visible_scale(), has_texture(), and xform().
Referenced by PGScrollFrame::remanage().
|
inline |
Returns the texture that has been applied to the frame, or NULL if no texture has been applied.
Definition at line 149 of file pgFrameStyle.I.
References clear_texture().
Referenced by generate_into(), get_internal_frame(), and has_texture().
|
inline |
Returns the basic type of frame.
Definition at line 86 of file pgFrameStyle.I.
References set_color().
Referenced by set_type().
|
inline |
See set_uv_width().
Definition at line 234 of file pgFrameStyle.I.
References set_visible_scale().
Referenced by set_uv_width().
|
inline |
Returns the scale factor on the visible representation of the frame, in the X and Y directions.
If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.
Definition at line 276 of file pgFrameStyle.I.
Referenced by get_internal_frame(), and set_visible_scale().
|
inline |
Returns the width parameter, which has meaning only for certain frame types.
For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.
Definition at line 198 of file pgFrameStyle.I.
References set_uv_width().
Referenced by set_width().
|
inline |
Returns true if a texture has been applied to the frame.
Definition at line 138 of file pgFrameStyle.I.
References get_texture().
Referenced by generate_into(), get_internal_frame(), and set_texture().
|
inline |
Sets the dominant color of the frame.
Definition at line 96 of file pgFrameStyle.I.
Referenced by get_type(), WindowFramework::make_camera(), PGWaitBar::setup(), PGScrollFrame::setup(), PGButton::setup(), PGVirtualFrame::setup(), PGEntry::setup(), PGSliderBar::setup_scroll_bar(), and PGSliderBar::setup_slider().
|
inline |
Sets the dominant color of the frame.
Definition at line 106 of file pgFrameStyle.I.
References get_color().
|
inline |
Specifies a texture that should be applied to the frame.
Definition at line 127 of file pgFrameStyle.I.
References has_texture().
Referenced by get_color().
|
inline |
Sets the basic type of frame.
Definition at line 76 of file pgFrameStyle.I.
References get_type().
Referenced by WindowFramework::make_camera(), PGWaitBar::setup(), PGScrollFrame::setup(), PGButton::setup(), PGVirtualFrame::setup(), PGEntry::setup(), PGSliderBar::setup_scroll_bar(), and PGSliderBar::setup_slider().
|
inline |
Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width.
Definition at line 211 of file pgFrameStyle.I.
Referenced by get_width().
|
inline |
Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width.
Definition at line 224 of file pgFrameStyle.I.
References get_uv_width().
|
inline |
Sets a scale factor on the visible representation of the frame, in the X and Y directions.
If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.
Definition at line 248 of file pgFrameStyle.I.
Referenced by get_uv_width(), and PGSliderBar::setup_slider().
|
inline |
Sets a scale factor on the visible representation of the frame, in the X and Y directions.
If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.
Definition at line 262 of file pgFrameStyle.I.
References get_visible_scale().
|
inline |
Sets the width parameter, which has meaning only for certain frame types.
For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.
Definition at line 172 of file pgFrameStyle.I.
Referenced by clear_texture(), WindowFramework::make_camera(), PGWaitBar::setup(), PGScrollFrame::setup(), PGButton::setup(), PGVirtualFrame::setup(), PGEntry::setup(), PGSliderBar::setup_scroll_bar(), and PGSliderBar::setup_slider().
|
inline |
Sets the width parameter, which has meaning only for certain frame types.
For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.
Definition at line 185 of file pgFrameStyle.I.
References get_width().
bool PGFrameStyle::xform | ( | const LMatrix4 & | mat | ) |
Applies the indicated transform to the FrameStyle.
The return value is true if the frame style is transformed, or false if it was not affected by the transform.
Definition at line 121 of file pgFrameStyle.cxx.
References generate_into(), LMatrix4f::get_row3(), and LVecBase3f::length().
Referenced by get_internal_frame().