aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Scrollbar.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-01-30 09:42:37 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-01-30 09:42:37 +0100
commit9fa17cdc9487e3ba92ef467c0c6d5d9941530de1 (patch)
tree0ac2e35c537e132bfa16adc486e7481e166a150d /src/GraphicObjects/Scrollbar.cs
parent0bf825fce6f1946034dbea6b1f7eb8d0dacdab8a (diff)
NUnit try, renaming, debugging and uniformizating
Diffstat (limited to 'src/GraphicObjects/Scrollbar.cs')
-rw-r--r--src/GraphicObjects/Scrollbar.cs101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/GraphicObjects/Scrollbar.cs b/src/GraphicObjects/Scrollbar.cs
deleted file mode 100644
index f68bdb77..00000000
--- a/src/GraphicObjects/Scrollbar.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
-using System.Xml.Serialization;
-using OpenTK.Input;
-using System.ComponentModel;
-
-namespace Crow
-{
- [DefaultTemplate("#Crow.Templates.Scrollbar.goml")]
- public class Scrollbar : TemplatedControl, IValueChange
- {
- #region IValueChange implementation
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
- #endregion
-
- Orientation _orientation;
- Slider _slider;
- double _maximumScroll;
- double _scroll;
-
- public Scrollbar() : base()
- {
- }
-
- protected override void loadTemplate(GraphicObject template = null)
- {
- base.loadTemplate (template);
- _slider = this.child.FindByName ("Slider") as Slider;
- }
-
- [XmlAttributeAttribute()][DefaultValue(0.0)]
- public virtual double MaximumScroll
- {
- get { return _maximumScroll; }
- set {
- if (_maximumScroll == value)
- return;
- _maximumScroll = value;
- registerForGraphicUpdate ();
- ValueChanged.Raise(this, new ValueChangeEventArgs ("MaximumScroll", _maximumScroll));
- }
- }
- [XmlAttributeAttribute()][DefaultValue(0.0)]
- public virtual double Scroll
- {
- get { return _scroll; }
- set {
- if (_scroll == value)
- return;
- _scroll = value;
- if (_scroll < 0.0)
- _scroll = 0.0;
- else if (_scroll > _maximumScroll)
- _scroll = _maximumScroll;
- registerForGraphicUpdate ();
- ValueChanged.Raise(this, new ValueChangeEventArgs ("Scroll", _scroll));
- }
- }
- [XmlAttributeAttribute()][DefaultValue(Orientation.Vertical)]
- public virtual Orientation Orientation
- {
- get { return _orientation; }
- set {
- if (_orientation == value)
- return;
- _orientation = value;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("Orientation", _orientation));
- registerForGraphicUpdate ();
- }
- }
- public void onScrollBack (object sender, MouseButtonEventArgs e)
- {
- Scroll -= _slider.LargeIncrement;
- }
- public void onScrollForth (object sender, MouseButtonEventArgs e)
- {
- Scroll += _slider.LargeIncrement;
-
- }
-
- public void onSliderValueChange(object sender, ValueChangeEventArgs e){
- Scroll = Convert.ToDouble(e.NewValue);
- }
-
- public override void OnLayoutChanges (LayoutingType layoutType)
- {
- OpenTKGameWindow.currentWindow.CursorVisible = true;
- base.OnLayoutChanges (layoutType);
- }
- }
-}