ALBA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaGUIRangeSlider Class Reference

#include <albaGUIRangeSlider.h>

Inheritance diagram for albaGUIRangeSlider:
Inheritance graph
[legend]
Collaboration diagram for albaGUIRangeSlider:
Collaboration graph
[legend]

Public Member Functions

 albaGUIRangeSlider (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
 
void SetListener (albaObserver *listener)
 
double GetValue (int i) const
 
void SetValue (int i, double value)
 
const double * GetRange () const
 
void SetRange (double *range)
 
void SetRange (double minR, double maxR)
 
void SetNumberOfWidgets (int num)
 
void EnableCenterWidget (bool enable)
 
void EnableBoundaryHandles (bool enable)
 
bool IsDragging () const
 

Protected Member Functions

void Initialize ()
 
void OnPaint (wxPaintEvent &event)
 
void OnMouse (wxMouseEvent &event)
 
void OnRangeModified (wxCommandEvent &event)
 
void RedrawWidgets (wxDC &dc, bool eraseWidgets=false)
 
void DrawLabel (int x, int y, double val)
 

Protected Attributes

double m_Range [2]
 
double m_Value [3]
 
int m_NumberOfWidgets
 
albaObserverm_Listener
 

Detailed Description

class name: albaGUIRangeSlider Class that handles a slider for visualising or changing range.

Definition at line 27 of file albaGUIRangeSlider.h.

Constructor & Destructor Documentation

◆ albaGUIRangeSlider()

albaGUIRangeSlider::albaGUIRangeSlider ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
const wxString &  name = wxPanelNameStr 
)

constructor

Member Function Documentation

◆ SetListener()

void albaGUIRangeSlider::SetListener ( albaObserver listener)
inline

function for setting the listener of events coming from another object

Definition at line 34 of file albaGUIRangeSlider.h.

References m_Listener.

◆ GetValue()

double albaGUIRangeSlider::GetValue ( int  i) const
inline

Get the 'min', 'max' or 'mid' value according to 'i'.

Definition at line 37 of file albaGUIRangeSlider.h.

References m_Value.

◆ SetValue()

void albaGUIRangeSlider::SetValue ( int  i,
double  value 
)

Set the 'min', 'max' or 'mid' value according to 'i'.

◆ GetRange()

const double * albaGUIRangeSlider::GetRange ( ) const
inline

Get the range of the slider.

Definition at line 43 of file albaGUIRangeSlider.h.

References m_Range.

◆ SetRange() [1/2]

void albaGUIRangeSlider::SetRange ( double *  range)

Set the range for the slider.

◆ SetRange() [2/2]

void albaGUIRangeSlider::SetRange ( double  minR,
double  maxR 
)
inline

Set the range for the slider.

Definition at line 49 of file albaGUIRangeSlider.h.

References SetRange().

Referenced by SetRange().

Here is the call graph for this function:

◆ SetNumberOfWidgets()

void albaGUIRangeSlider::SetNumberOfWidgets ( int  num)
inline

Set the number of widgets for the slider.

Definition at line 52 of file albaGUIRangeSlider.h.

References m_NumberOfWidgets.

◆ EnableCenterWidget()

void albaGUIRangeSlider::EnableCenterWidget ( bool  enable)
inline

Enable/Disable the center cursor for the slider.

Definition at line 55 of file albaGUIRangeSlider.h.

References m_NumberOfWidgets.

◆ EnableBoundaryHandles()

void albaGUIRangeSlider::EnableBoundaryHandles ( bool  enable)
inline

Hide / show the circles on the boundary of the slider.

Definition at line 58 of file albaGUIRangeSlider.h.

◆ IsDragging()

bool albaGUIRangeSlider::IsDragging ( ) const
inline

Return true if one of the cursors are moving.

Definition at line 61 of file albaGUIRangeSlider.h.

◆ Initialize()

void albaGUIRangeSlider::Initialize ( )
protected

Initialize the values for the slider.

◆ OnPaint()

void albaGUIRangeSlider::OnPaint ( wxPaintEvent &  event)
protected

Refresh the slider shape.

◆ OnMouse()

void albaGUIRangeSlider::OnMouse ( wxMouseEvent &  event)
protected

Move the cursors on mouse event.

◆ OnRangeModified()

void albaGUIRangeSlider::OnRangeModified ( wxCommandEvent &  event)
protected

Intercept slider events and forward to the listener.

◆ RedrawWidgets()

void albaGUIRangeSlider::RedrawWidgets ( wxDC &  dc,
bool  eraseWidgets = false 
)
protected

Redraw the widgets in the new position.

◆ DrawLabel()

void albaGUIRangeSlider::DrawLabel ( int  x,
int  y,
double  val 
)
protected

Draw a label according to the mouse position.

Member Data Documentation

◆ m_Range

double albaGUIRangeSlider::m_Range[2]
protected

Definition at line 82 of file albaGUIRangeSlider.h.

Referenced by GetRange().

◆ m_Value

double albaGUIRangeSlider::m_Value[3]
protected

Definition at line 83 of file albaGUIRangeSlider.h.

Referenced by GetValue().

◆ m_NumberOfWidgets

int albaGUIRangeSlider::m_NumberOfWidgets
protected

Definition at line 85 of file albaGUIRangeSlider.h.

Referenced by EnableCenterWidget(), and SetNumberOfWidgets().

◆ m_Listener

albaObserver* albaGUIRangeSlider::m_Listener
protected

Definition at line 86 of file albaGUIRangeSlider.h.

Referenced by SetListener().


The documentation for this class was generated from the following file: