istereo2
diff libs/goatkit/widget.cc @ 14:018f997dc646
button done
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 29 Sep 2015 01:11:54 +0300 |
parents | 3bccfc7d10fe |
children | 7bd4264bf74a |
line diff
1.1 --- a/libs/goatkit/widget.cc Mon Sep 28 19:04:50 2015 +0300 1.2 +++ b/libs/goatkit/widget.cc Tue Sep 29 01:11:54 2015 +0300 1.3 @@ -124,6 +124,16 @@ 1.4 return widget->visible.get_state(); 1.5 } 1.6 1.7 +void Widget::set_visibility_transition(long msec) 1.8 +{ 1.9 + widget->visible.set_transition_duration(msec); 1.10 +} 1.11 + 1.12 +long Widget::get_visibility_transition() const 1.13 +{ 1.14 + return widget->visible.get_transition_duration(); 1.15 +} 1.16 + 1.17 void Widget::activate() 1.18 { 1.19 widget->active.change(true); 1.20 @@ -144,6 +154,16 @@ 1.21 return widget->active.get_state(); 1.22 } 1.23 1.24 +void Widget::set_active_transition(long msec) 1.25 +{ 1.26 + widget->active.set_transition_duration(msec); 1.27 +} 1.28 + 1.29 +long Widget::get_active_transition() const 1.30 +{ 1.31 + widget->active.get_transition_duration(); 1.32 +} 1.33 + 1.34 void Widget::press() 1.35 { 1.36 widget->press.change(true); 1.37 @@ -164,6 +184,16 @@ 1.38 return widget->press.get_state(); 1.39 } 1.40 1.41 +void Widget::set_press_transition(long msec) 1.42 +{ 1.43 + widget->press.set_transition_duration(msec); 1.44 +} 1.45 + 1.46 +long Widget::get_press_transition() const 1.47 +{ 1.48 + return widget->press.get_transition_duration(); 1.49 +} 1.50 + 1.51 void Widget::mousein() 1.52 { 1.53 widget->hover.change(true); 1.54 @@ -187,6 +217,16 @@ 1.55 return widget->hover.get_state(); 1.56 } 1.57 1.58 +void Widget::set_hover_transition(long msec) 1.59 +{ 1.60 + widget->hover.set_transition_duration(msec); 1.61 +} 1.62 + 1.63 +long Widget::get_hover_transition() const 1.64 +{ 1.65 + return widget->hover.get_transition_duration(); 1.66 +} 1.67 + 1.68 bool Widget::can_focus() const 1.69 { 1.70 return false; 1.71 @@ -212,6 +252,16 @@ 1.72 return widget->focus.get_state(); 1.73 } 1.74 1.75 +void Widget::set_focus_transition(long msec) 1.76 +{ 1.77 + widget->focus.set_transition_duration(msec); 1.78 +} 1.79 + 1.80 +long Widget::get_focus_transition() const 1.81 +{ 1.82 + return widget->focus.get_transition_duration(); 1.83 +} 1.84 + 1.85 void Widget::set_position(float x, float y) 1.86 { 1.87 set_position(Vec2(x, y));