nux-0.9.46
|
#include <Nux/ColorGradient.h>
Public Types | |
enum | ColorMode { COLORMODE_GRADIENT = 0, COLORMODE_HUE } |
Public Member Functions | |
ColorGradient (float Value=0, float MinValue=0.0f, float MaxValue=1.0f, NUX_FILE_LINE_PROTO) | |
virtual | ~ColorGradient () |
virtual long | ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo) |
void | DrawMarker (GraphicsEngine &GfxContext) |
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 | SetRange (float min_value, float max_value) |
void | SetValue (float value) |
float | GetValue () const |
float | GetMinValue () const |
float | GetMaxValue () const |
void | SetBackgroundColor (const Color &color) |
const Color | GetBackgroundColor () const |
void | OnReceiveMouseDown (int x, int y, unsigned long button_flags, unsigned long key_flags) |
void | OnReceiveMouseUp (int x, int y, unsigned long button_flags, unsigned long key_flags) |
void | OnReceiveMouseDrag (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags) |
void | OnKeyboardFocus () |
void | OnLostKeyboardFocus () |
void | OnValidateKeyboardEntry (EditTextBox *textbox, const NString &text) |
bool | IsCtrlKeyPressed () const |
void | EmitFloatChangedSignal () |
void | Reset () |
int | GetNumColorMark () const |
ColorMarkGroup::ColorMark | GetColorMark (int i) const |
void | AddColorMark (DOUBLE x, Color color, bool selected=false) |
void | SetColorFormat (Color::Format cf) |
Data Fields | |
sigc::signal< void, ColorGradient * > | sigValueChanged |
sigc::signal< void, float > | sigFloatChanged |
sigc::signal< void, float > | sigMouseDown |
sigc::signal< void, float > | sigMouseUp |
sigc::signal< void, float > | sigMouseDrag |
sigc::signal< void, float > | sigSetTypedValue |
Protected Member Functions | |
void | InitializeWidgets () |
void | InitializeLayout () |
void | DestroyLayout () |
Protected Attributes | |
ColorMarkGroup | m_ColorMarkGroup |
HLayout * | hlayout |
EditTextBox * | m_ValueString |
InputArea * | m_Percentage |
Color | m_BackgroundColor |
Color::Format | m_color_format |
long | m_CTRL_KEY |
float | m_Value |
float | m_min |
float | m_max |
HexRegExpValidator | m_HexRegExp |
IntegerValidator | m_IntRegExp |
DoubleValidator | m_DoubleRegExp |
nux::ColorGradient::ColorGradient | ( | float | Value = 0 , |
float | MinValue = 0.0f , |
||
float | MaxValue = 1.0f , |
||
NUX_FILE_LINE_PROTO | |||
) |
virtual nux::ColorGradient::~ColorGradient | ( | ) | [virtual] |
void nux::ColorGradient::DestroyLayout | ( | ) | [protected] |
Reimplemented from nux::View.
virtual void nux::ColorGradient::Draw | ( | GraphicsEngine & | GfxContext, |
bool | force_draw | ||
) | [virtual] |
Implements nux::View.
virtual void nux::ColorGradient::DrawContent | ( | GraphicsEngine & | GfxContext, |
bool | force_draw | ||
) | [virtual] |
Reimplemented from nux::View.
void nux::ColorGradient::DrawMarker | ( | GraphicsEngine & | GfxContext | ) |
void nux::ColorGradient::EmitFloatChangedSignal | ( | ) |
const Color nux::ColorGradient::GetBackgroundColor | ( | ) | const |
ColorMarkGroup::ColorMark nux::ColorGradient::GetColorMark | ( | int | i | ) | const [inline] |
float nux::ColorGradient::GetMaxValue | ( | ) | const [inline] |
float nux::ColorGradient::GetMinValue | ( | ) | const [inline] |
int nux::ColorGradient::GetNumColorMark | ( | ) | const [inline] |
float nux::ColorGradient::GetValue | ( | ) | const |
void nux::ColorGradient::InitializeLayout | ( | ) | [protected] |
Reimplemented from nux::View.
void nux::ColorGradient::InitializeWidgets | ( | ) | [protected] |
Reimplemented from nux::View.
bool nux::ColorGradient::IsCtrlKeyPressed | ( | ) | const [inline] |
void nux::ColorGradient::OnKeyboardFocus | ( | ) |
void nux::ColorGradient::OnLostKeyboardFocus | ( | ) |
void nux::ColorGradient::OnReceiveMouseDown | ( | int | x, |
int | y, | ||
unsigned long | button_flags, | ||
unsigned long | key_flags | ||
) |
void nux::ColorGradient::OnReceiveMouseDrag | ( | int | x, |
int | y, | ||
int | dx, | ||
int | dy, | ||
unsigned long | button_flags, | ||
unsigned long | key_flags | ||
) |
void nux::ColorGradient::OnReceiveMouseUp | ( | int | x, |
int | y, | ||
unsigned long | button_flags, | ||
unsigned long | key_flags | ||
) |
void nux::ColorGradient::OnValidateKeyboardEntry | ( | EditTextBox * | textbox, |
const NString & | text | ||
) |
virtual void nux::ColorGradient::PostDraw | ( | GraphicsEngine & | GfxContext, |
bool | force_draw | ||
) | [virtual] |
Reimplemented from nux::View.
virtual long nux::ColorGradient::ProcessEvent | ( | IEvent & | ievent, |
long | TraverseInfo, | ||
long | ProcessEventInfo | ||
) | [virtual] |
Implements nux::View.
void nux::ColorGradient::Reset | ( | ) |
void nux::ColorGradient::SetBackgroundColor | ( | const Color & | color | ) |
void nux::ColorGradient::SetColorFormat | ( | Color::Format | cf | ) |
void nux::ColorGradient::SetRange | ( | float | min_value, |
float | max_value | ||
) |
void nux::ColorGradient::SetValue | ( | float | value | ) |
Referenced by nux::RGBAPropertyItem::SetAlpha(), nux::RGBPropertyItem::SetBlue(), nux::RGBAPropertyItem::SetBlue(), nux::RGBPropertyItem::SetColor(), nux::RGBAPropertyItem::SetColor(), nux::RGBPropertyItem::SetGreen(), nux::RGBAPropertyItem::SetGreen(), nux::RGBPropertyItem::SetRed(), and nux::RGBAPropertyItem::SetRed().
HLayout* nux::ColorGradient::hlayout [protected] |
Color nux::ColorGradient::m_BackgroundColor [protected] |
Color::Format nux::ColorGradient::m_color_format [protected] |
ColorMarkGroup nux::ColorGradient::m_ColorMarkGroup [protected] |
long nux::ColorGradient::m_CTRL_KEY [protected] |
DoubleValidator nux::ColorGradient::m_DoubleRegExp [protected] |
HexRegExpValidator nux::ColorGradient::m_HexRegExp [protected] |
IntegerValidator nux::ColorGradient::m_IntRegExp [protected] |
float nux::ColorGradient::m_max [protected] |
float nux::ColorGradient::m_min [protected] |
InputArea* nux::ColorGradient::m_Percentage [protected] |
float nux::ColorGradient::m_Value [protected] |
EditTextBox* nux::ColorGradient::m_ValueString [protected] |
sigc::signal<void, float> nux::ColorGradient::sigFloatChanged |
sigc::signal<void, float> nux::ColorGradient::sigMouseDown |
sigc::signal<void, float> nux::ColorGradient::sigMouseDrag |
sigc::signal<void, float> nux::ColorGradient::sigMouseUp |
sigc::signal<void, float> nux::ColorGradient::sigSetTypedValue |
sigc::signal<void, ColorGradient *> nux::ColorGradient::sigValueChanged |