Code formatting only. No significant changes.

In preparation of adding Fl_Scroll_Tabs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2017-06-21 20:00:28 +00:00
parent 93a99431ed
commit 51ed4e2162
2 changed files with 13 additions and 11 deletions

View File

@ -219,7 +219,7 @@ protected:
public:
Fl_Tabs(int,int,int,int,const char * = 0);
Fl_Tabs(int X, int Y, int W, int H, const char *L = 0);
virtual ~Fl_Tabs();
int handle(int);

View File

@ -168,13 +168,15 @@ int Fl_Tabs::handle(int event) {
switch (event) {
case FL_PUSH: {
int H = tab_height();
if (H >= 0) {
if (Fl::event_y() > y()+H) return Fl_Group::handle(event);
} else {
if (Fl::event_y() < y()+h()+H) return Fl_Group::handle(event);
}}
case FL_PUSH:
{
int H = tab_height();
if (H >= 0) {
if (Fl::event_y() > y()+H) return Fl_Group::handle(event);
} else {
if (Fl::event_y() < y()+h()+H) return Fl_Group::handle(event);
}
}
/* FALLTHROUGH */
case FL_DRAG:
case FL_RELEASE:
@ -464,8 +466,8 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
can be automatic (local) variables, but you must declare the
Fl_Tabs widget <I>first</I> so that it is destroyed last.
*/
Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
Fl_Group(X,Y,W,H,l)
Fl_Tabs::Fl_Tabs(int X, int Y, int W, int H, const char *L) :
Fl_Group(X,Y,W,H,L)
{
box(FL_THIN_UP_BOX);
push_ = 0;
@ -518,7 +520,7 @@ void Fl_Tabs::client_area(int &rx, int &ry, int &rw, int &rh, int tabh) {
if (tabh == 0) // use default (at top)
y_offset = label_height;
else if (tabh == -1) // use default (at bottom)
else if (tabh == -1) // use default (at bottom)
y_offset = -label_height;
else
y_offset = tabh; // user given value