X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fvslider.cpp;h=6bc1553ded3ad8df6f9e5e24eeeb48f582a1f3de;hb=HEAD;hp=397713b6c7c9bda5529fa93661205f85d402aee8;hpb=8f6f543758fb1b2b17ae2db519198d420eb9982d;p=libs%2Fgltk.git diff --git a/source/vslider.cpp b/source/vslider.cpp deleted file mode 100644 index 397713b..0000000 --- a/source/vslider.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include -#include -#include "graphic.h" -#include "part.h" -#include "style.h" -#include "vslider.h" - -namespace Msp { -namespace GLtk { - -VSlider::VSlider(const Resources &r): - Slider(r), - dragging(false) -{ - update_style(); -} - -void VSlider::button_press(int x, int y, unsigned btn) -{ - if(geom.is_inside(x, y)) - { - int sh=get_slider_height(); - int sy=geom.y+static_cast((geom.h-sh)*(value-min)/(max-min)); - if(btn==1 && y>=sy && yrender(pgeom.w, pgeom.h); - GL::pop_matrix(); - } -} - -unsigned VSlider::get_slider_height() const -{ - for(PartSeq::const_iterator i=style->get_parts().begin(); i!=style->get_parts().end(); ++i) - if(i->get_name()=="slider") - return i->get_geometry().h; - - return 0; -} - -} // namespace GLtk -} // namespace Msp -