/*
 SLIDER.DOX

 License CC0 PUBLIC DOMAIN

 To the extent possible under law, Mark J. Olesen has waived all copyright
 and related or neighboring rights to FDOSTUI Library. This work is published
 from: United States.
*/

/*! \file slider.hpp
\brief contains slider class
*/

/*! \class slider slider.hpp
\brief Allows user to select a value by moving a thumb within a defined
range of the slider.

The slider class is also the base class for other widgets such as
scrollbar.
*/

/*!
\enum slider::orientation
\brief indicator of the orientation of the widget. The defualt orientation
is \a HORIZONTAL.

\var slider::orienatation  slider::HORIZONTAL,
	horizontal orientation

\var slider::orienatation  slider::VERTICAL 
	vertical orinetation
*/


/*!
\fn slider::slider(
        int const                       i_pos_x,
        int const                       i_pos_y,
        unsigned int const              i_len_x,
        unsigned int const              i_len_y)
\brief constructor 
\param[in] i_pos_x x position to place widget
\param[in] i_pos_y y position to place widget
\param[in] i_len_x x length of widget
\param[in] i_len_y y length of widget
\returns none
*/
    
/*!
\fn virtual slider::~slider()
\brief destructor
\returns none
*/

/*!
\fn virtual void slider::draw() const
\brief draws the widget

This method should not be called directly. 
\see widget::draw for details.
*/

/*!
\fn virtual enum event_response slider::event_key(
        struct event_key const&         i_event)
\brief handle key event
\param[in] i_event key event to handle    
\returns response how event was handled
*/

/*!
\fn virtual enum event_response slider::event_mouse(
        struct event_mouse const&       i_event)
\brief handle mouse event
\param[in] i_event mouse event to handle
\returns response how event was handled
*/

/*!
\fn void slider::set_orientation(
        enum orientation const          i_orientation)
\brief sets the orientation

This does not redraw. In addition, it does not resize the
widget to fit the new data type.
*/

/*!
\var slider::m_orientation
	orientation of the slider
*/

/*!
\fn double slider::value2pct(
        double const                    i_value) const
\brief converts value to percentage 
\param[in] i_value value to convert
\returns percentage
*/

/*!
\fn int slider::value2screen(
        double const                    i_value,
        int const                       i_len) const
\brief converts value to screen units
\param[in] i_value value to convert
\param[in] i_len if horizontal, length in the x direction. Otherwise, length in the y direction.
\returns position
*/

/*!
\fn double slider::screen2value(
        int const                       i_pos,
        int const                       i_len) const
\brief convert position to value
\param[in] i_pos position to convert
\param[in] i_len i_len if horizontal, length in the x direction. Otherwise, length in the y direction.
\returns value

/*!
\fn void slider::draw(
        struct box const&               i_box) const
\brief draw the widget within teh bounding box boundries 
\param[in] i_box bounding box
*/

/*!
\fn enum event_response slider::event_mouse(
        struct event_mouse const&       i_event,
        struct box const&               i_box)
\brief test event according to a boundbox
\param[in] i_event mouse event
\param[in] i_box bounding box
\returns response 
*/

/*!
\fn enum event_response slider::event_key_horizontal(
        struct event_key const&         i_event)
\brief handle event for horizontal slider
\param[in] i_event keyboard event
\returns response
*/

/*!
\fn enum event_response slider::event_key_vertical(
        struct event_key const&         i_event)
\brief handle key even for vertical slider
\param[in] i_event keyboard event
\returns response
*/
