nux-1.16.0
|
A User Interface component hosting a 4x4 Matrix. More...
#include <Nux/Matrix4Editor.h>
Public Member Functions | |
Matrix4Editor (Matrix4 matrix=Matrix4::IDENTITY(), NUX_FILE_LINE_PROTO) | |
Area * | FindAreaUnderMouse (const Point &mouse_position, NuxEventType event_type) |
virtual void | Draw (GraphicsEngine &GfxContext, bool force_draw) |
virtual void | DrawContent (GraphicsEngine &GfxContext, bool force_draw) |
virtual void | PostDraw (GraphicsEngine &GfxContext, bool force_draw) |
void | SetParameterName (const char *parameter_name) |
void | EmitButtonPress () |
void | EmitIncrementComponent (int index) |
void | EmitDecrementComponent (int index) |
void | EmitComponentValue (float f, int index) |
void | SetMatrix (Matrix4 matrix) |
Set the UI matrix. | |
Matrix4 | GetMatrix () const |
Get the UI matrix. | |
Public Attributes | |
sigc::signal< void, int, char * > | sigValidateKeyboarEntry |
sigc::signal< void, Matrix4Editor * > | sigMatrixChanged |
A User Interface component hosting a 4x4 Matrix.
Matrix4Editor is a UI component representing a 4x4 matrix. All elements of the matrix are writeable through the UI. The Matrix4Editor API provides access to the embeded matrix through the member functions getMatrix() and setMatrix().
Definition at line 85 of file Matrix4Editor.h.
Area * nux::Matrix4Editor::FindAreaUnderMouse | ( | const Point & | mouse_position, |
NuxEventType | event_type | ||
) | [virtual] |
Return the area under the mouse pointer.
Reimplemented from nux::View.
Definition at line 270 of file Matrix4Editor.cpp.
{ return View::FindAreaUnderMouse(mouse_position, event_type); }
Matrix4 nux::Matrix4Editor::GetMatrix | ( | ) | const |
Get the UI matrix.
Get the matrix hosted by the UI.
NULL. |
Definition at line 241 of file Matrix4Editor.cpp.
{
return m_Matrix;
}
void nux::Matrix4Editor::SetMatrix | ( | Matrix4 | matrix | ) |
Set the UI matrix.
Set each component of the 4x4 matrix UI to the ones provided by the input matrix.
matrix | a 4x4 matrix of type Matrix4. |
Definition at line 228 of file Matrix4Editor.cpp.
{ m_Matrix = matrix; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { m_MtxInput[i][j]->SetText (NString::Printf (TEXT ("%.3f"), m_Matrix.m[i][j]) ); } } }