JX Application Framework
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | List of all members
JSliderBase Class Referenceabstract

#include <JSliderBase.h>

Inheritance diagram for JSliderBase:
[legend]

Classes

class  Moved
 

Public Member Functions

 JSliderBase (const JCoordinate thumbHalfSize, const JCoordinate w, const JCoordinate h)
 
 ~JSliderBase () override
 
JFloat GetValue () const
 
JFloat GetMinValue () const
 
JFloat GetMaxValue () const
 
JFloat GetStepSize () const
 
void SetValue (const JFloat value)
 
void SetMinValue (const JFloat minValue)
 
void SetMaxValue (const JFloat maxValue)
 
void SetRange (const JFloat minValue, const JFloat maxValue)
 
void SetStepSize (const JFloat step)
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
virtual JString ToString () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 

Static Public Attributes

static const JUtf8BytekMoved = "Moved::JSliderBase"
 

Protected Types

enum  SliderOrientation {
  kVertical ,
  kHorizontal
}
 

Protected Member Functions

SliderOrientation GetOrientation () const
 
JCoordinate GetThumbPosition () const
 
JFloat ClickToValue (const JPoint &pt) const
 
JCoordinate ValueToPixel (const JFloat value) const
 
virtual void SliderRedraw () const =0
 
virtual JCoordinate SliderGetWidth () const =0
 
virtual JCoordinate SliderGetHeight () const =0
 
- Protected Member Functions inherited from JBroadcaster
 JBroadcaster (const JBroadcaster &source)
 
void ListenTo (const JBroadcaster *sender)
 
void StopListening (const JBroadcaster *sender)
 
void ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember)
 
void StopListening (const JBroadcaster *sender, const std::type_info &messageType)
 
template<class T >
void Send (JBroadcaster *recipient, const T &message)
 
template<class T >
void Broadcast (const T &message)
 
virtual void Receive (JBroadcaster *sender, const Message &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Detailed Description

Interface for the JSliderBase class

Abstract base class for all types of sliders.  A slider is an object that
lets the user graphically set a value within some range.  Each slider is
either horizontal or vertical and can have a thumb for the user to
grab.

Member Enumeration Documentation

◆ SliderOrientation

Enumerator
kVertical 
kHorizontal 

Constructor & Destructor Documentation

◆ JSliderBase()

JSliderBase::JSliderBase ( const JCoordinate  thumbHalfSize,
const JCoordinate  w,
const JCoordinate  h 
)

◆ ~JSliderBase()

JSliderBase::~JSliderBase ( )
override

Member Function Documentation

◆ ClickToValue()

JFloat JSliderBase::ClickToValue ( const JPoint pt) const
protected

Convert a pixel value to a slider value.

◆ GetMaxValue()

JFloat JSliderBase::GetMaxValue ( ) const
inline

◆ GetMinValue()

JFloat JSliderBase::GetMinValue ( ) const
inline

◆ GetOrientation()

JSliderBase::SliderOrientation JSliderBase::GetOrientation ( ) const
inlineprotected

◆ GetStepSize()

JFloat JSliderBase::GetStepSize ( ) const
inline

◆ GetThumbPosition()

JCoordinate JSliderBase::GetThumbPosition ( ) const
inlineprotected

◆ GetValue()

JFloat JSliderBase::GetValue ( ) const
inline

◆ SetMaxValue()

void JSliderBase::SetMaxValue ( const JFloat  maxValue)

◆ SetMinValue()

void JSliderBase::SetMinValue ( const JFloat  minValue)

◆ SetRange()

void JSliderBase::SetRange ( const JFloat  minValue,
const JFloat  maxValue 
)

◆ SetStepSize()

void JSliderBase::SetStepSize ( const JFloat  step)

◆ SetValue()

void JSliderBase::SetValue ( const JFloat  value)

◆ SliderGetHeight()

virtual JCoordinate JSliderBase::SliderGetHeight ( ) const
protectedpure virtual

Implemented in JXSliderBase.

◆ SliderGetWidth()

virtual JCoordinate JSliderBase::SliderGetWidth ( ) const
protectedpure virtual

Implemented in JXSliderBase.

◆ SliderRedraw()

virtual void JSliderBase::SliderRedraw ( ) const
protectedpure virtual

Implemented in JXSliderBase.

◆ ValueToPixel()

JCoordinate JSliderBase::ValueToPixel ( const JFloat  value) const
protected

Convert a slider value to a pixel value in local coordinates.

Member Data Documentation

◆ kMoved

const JUtf8Byte * JSliderBase::kMoved = "Moved::JSliderBase"
static

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