Skip to content

Commit

Permalink
Fluid treats any class name for the outer window that does not contain
Browse files Browse the repository at this point in the history
the word "Window" as a group that needs a 4-element constructor.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
spitzak committed Sep 9, 2002
1 parent f97b388 commit cf16564
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions fluid/Fl_Widget_Type.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $"
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.19 2002/09/09 02:04:46 spitzak Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -1491,11 +1491,9 @@ void Fl_Widget_Type::write_code1() {
if (varused) write_c("{ %s* o = ", t);
if (name()) write_c("%s = ", name());
if (is_window()) {
// Handle special case of Fl_Group class type within a window -
// output constructor using x, y, w, h...
if (strcmp(t, "Fl_Group") == 0 ||
strcmp(t, "Fl_Tabs") == 0 ||
strcmp(t, "Fl_Tile") == 0)
// Handle special case where user is faking a Fl_Group type as a window,
// there is no 2-argument constructor in that case:
if (!strstr(t, "Window"))
write_c("new %s(0, 0, %d, %d", t, o->w(), o->h());
else
write_c("new %s(%d, %d", t, o->w(), o->h());
Expand Down Expand Up @@ -1972,5 +1970,5 @@ int Fl_Widget_Type::read_fdesign(const char* propname, const char* value) {
}

//
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $".
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.19 2002/09/09 02:04:46 spitzak Exp $".
//
12 changes: 5 additions & 7 deletions src/Fl_Tabs.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.13 2002/09/09 02:04:46 spitzak Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -44,7 +44,7 @@
// Return value is the index of the selected item.

int Fl_Tabs::tab_positions(int* p, int* wp) {
int selected = -1;
int selected = 0;
Fl_Widget*const* a = array();
int i;
p[0] = 0;
Expand Down Expand Up @@ -78,10 +78,8 @@ int Fl_Tabs::tab_positions(int* p, int* wp) {
if (wp[i] > W) wp[i] = W;
}
// adjust edges according to visiblity:
if (selected >= 0) {
for (i = children(); i > selected; i--) {
p[i] = p[i-1]+wp[i-1];
}
for (i = children(); i > selected; i--) {
p[i] = p[i-1]+wp[i-1];
}
return selected;
}
Expand Down Expand Up @@ -302,5 +300,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}

//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.12 2002/09/04 20:33:18 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.13 2002/09/09 02:04:46 spitzak Exp $".
//

0 comments on commit cf16564

Please sign in to comment.