summaryrefslogtreecommitdiff
path: root/src/Fl_Tabs.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Tabs.cxx')
-rw-r--r--src/Fl_Tabs.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index 7d48d78d1..96ad87f90 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -260,7 +260,8 @@ int Fl_Tabs::tab_height() {
int H = h();
int H2 = y();
Fl_Widget*const* a = array();
- for (int i=children(); i--;) {
+ int i;
+ for (i =children(); i--;) {
Fl_Widget* o = *a++;
if (o->y() < y()+H) H = o->y()-y();
if (o->y()+o->h() > H2) H2 = o->y()+o->h();
@@ -292,7 +293,8 @@ Fl_Widget *Fl_Tabs::which(int event_x, int event_y) {
Fl_Widget *ret = 0L;
const int nc = children();
tab_positions();
- for (int i=0; i<nc; i++) {
+ int i;
+ for (i =0; i<nc; i++) {
if (event_x < x()+tab_pos[i+1]+tab_offset) {
ret = child(i);
break;
@@ -314,7 +316,8 @@ Fl_Widget *Fl_Tabs::which(int event_x, int event_y) {
*/
int Fl_Tabs::hit_close(Fl_Widget *o, int event_x, int event_y) {
(void)event_y;
- for (int i=0; i<children(); i++) {
+ int i;
+ for (i =0; i<children(); i++) {
if (child(i)==o) {
// never hit the "close" button on a compressed tab unless it's the active one
if (tab_flags[i] & 1)
@@ -721,7 +724,8 @@ int Fl_Tabs::push(Fl_Widget *o) {
Fl_Widget* Fl_Tabs::value() {
Fl_Widget* v = 0;
Fl_Widget*const* a = array();
- for (int i=children(); i--;) {
+ int i;
+ for (i =children(); i--;) {
Fl_Widget* o = *a++;
if (v) o->hide();
else if (o->visible()) v = o;
@@ -746,7 +750,8 @@ int Fl_Tabs::value(Fl_Widget *newvalue) {
Fl_Widget*const* a = array();
int ret = 0;
int selected = -1;
- for (int i=children(); i--;) {
+ int i;
+ for (i =children(); i--;) {
Fl_Widget* o = *a++;
if (o == newvalue) {
if (!o->visible()) ret = 1;