summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-06 14:59:52 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-06 14:59:52 +0000
commitfbea5019fb1a778c89ab60ae98272fcdca528f50 (patch)
tree17668fa0f0fafad59c3f9ea79cdb27fcec86d268
parente907ce4a11e1258760eea39f4c81cce1d197d9fc (diff)
Replaced all occurrences of the deprecated fl_clip() function by
fl_push_clip(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/forms.H2
-rw-r--r--src/Fl_Browser_.cxx2
-rw-r--r--src/Fl_Choice.cxx2
-rw-r--r--src/Fl_Color_Chooser.cxx4
-rw-r--r--src/Fl_Input_.cxx2
-rw-r--r--src/Fl_Progress.cxx4
-rw-r--r--src/Fl_Scroll.cxx4
-rw-r--r--src/Fl_Tabs.cxx8
-rw-r--r--src/Fl_Tiled_Image.cxx2
-rw-r--r--src/fl_draw.cxx2
-rw-r--r--src/fl_engraved_label.cxx2
-rw-r--r--test/arc.cxx2
-rw-r--r--test/curve.cxx2
13 files changed, 19 insertions, 19 deletions
diff --git a/FL/forms.H b/FL/forms.H
index 8f6cec10f..c70959dbd 100644
--- a/FL/forms.H
+++ b/FL/forms.H
@@ -376,7 +376,7 @@ inline void fl_set_font_name(Fl_Font n,const char* s) {Fl::set_font(n,s);}
inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);}
-#define fl_set_clipping(x,y,w,h) fl_clip(x,y,w,h)
+#define fl_set_clipping(x,y,w,h) fl_push_clip(x,y,w,h)
#define fl_unset_clipping() fl_pop_clip()
////////////////////////////////////////////////////////////////
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index d1f83882f..32f2431d4 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -399,7 +399,7 @@ J1:
bbox(X, Y, W, H);
- fl_clip(X, Y, W, H);
+ fl_push_clip(X, Y, W, H);
// for each line, draw it if full redraw or scrolled. Erase background
// if not a full redraw or if it is selected:
void* l = top();
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx
index 243fe83e9..c750a0587 100644
--- a/src/Fl_Choice.cxx
+++ b/src/Fl_Choice.cxx
@@ -83,7 +83,7 @@ void Fl_Choice::draw() {
// ERCO
int xx = x() + dx, yy = y() + dy + 1, ww = w() - W, hh = H - 2;
- fl_clip(xx, yy, ww, hh);
+ fl_push_clip(xx, yy, ww, hh);
if ( Fl::scheme()) {
Fl_Label l;
diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx
index 7537ab137..0fd4270ce 100644
--- a/src/Fl_Color_Chooser.cxx
+++ b/src/Fl_Color_Chooser.cxx
@@ -316,7 +316,7 @@ void Flcc_HueBox::draw() {
int yy1 = y()+Fl::box_dy(box());
int w1 = w()-Fl::box_dw(box());
int h1 = h()-Fl::box_dh(box());
- if (damage() == FL_DAMAGE_EXPOSE) fl_clip(x1+px,yy1+py,6,6);
+ if (damage() == FL_DAMAGE_EXPOSE) fl_push_clip(x1+px,yy1+py,6,6);
fl_draw_image(generate_image, this, x1, yy1, w1, h1);
if (damage() == FL_DAMAGE_EXPOSE) fl_pop_clip();
Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
@@ -390,7 +390,7 @@ void Flcc_ValueBox::draw() {
int yy1 = y()+Fl::box_dy(box());
int w1 = w()-Fl::box_dw(box());
int h1 = h()-Fl::box_dh(box());
- if (damage() == FL_DAMAGE_EXPOSE) fl_clip(x1,yy1+py,w1,6);
+ if (damage() == FL_DAMAGE_EXPOSE) fl_push_clip(x1,yy1+py,w1,6);
fl_draw_image(generate_vimage, this, x1, yy1, w1, h1);
if (damage() == FL_DAMAGE_EXPOSE) fl_pop_clip();
int Y = int((1-c->value()) * (h1-6));
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index 62495e15a..b65223df1 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -247,7 +247,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
yscroll_ = -(H-height)/2;
}
- fl_clip(X, Y, W, H);
+ fl_push_clip(X, Y, W, H);
Fl_Color tc = active_r() ? textcolor() : fl_inactive(textcolor());
p = value();
diff --git a/src/Fl_Progress.cxx b/src/Fl_Progress.cxx
index c80d091c2..e63db214f 100644
--- a/src/Fl_Progress.cxx
+++ b/src/Fl_Progress.cxx
@@ -78,7 +78,7 @@ void Fl_Progress::draw()
Fl_Color c = labelcolor();
labelcolor(fl_contrast(labelcolor(), color2()));
- fl_clip(x(), y(), progress + bx, h());
+ fl_push_clip(x(), y(), progress + bx, h());
draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2()));
draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
@@ -86,7 +86,7 @@ void Fl_Progress::draw()
labelcolor(c);
if (progress<w()) {
- fl_clip(tx + progress, y(), w() - progress, h());
+ fl_push_clip(tx + progress, y(), w() - progress, h());
draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fl_inactive(color()));
draw_label(tx, y() + by, tw, h() - bh);
fl_pop_clip();
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx
index 29c4c3d33..dfa5a0679 100644
--- a/src/Fl_Scroll.cxx
+++ b/src/Fl_Scroll.cxx
@@ -53,7 +53,7 @@ void Fl_Scroll::fix_scrollbar_order() {
}
void Fl_Scroll::draw_clip(void* v,int X, int Y, int W, int H) {
- fl_clip(X,Y,W,H);
+ fl_push_clip(X,Y,W,H);
Fl_Scroll* s = (Fl_Scroll*)v;
// erase background as needed...
switch (s->box()) {
@@ -140,7 +140,7 @@ void Fl_Scroll::draw() {
if (B < (Y + H)) draw_clip(this, X, B, W, Y + H - B);
}
if (d & FL_DAMAGE_CHILD) { // draw damaged children
- fl_clip(X, Y, W, H);
+ fl_push_clip(X, Y, W, H);
Fl_Widget*const* a = array();
for (int i=children()-2; i--;) update_child(**a++);
fl_pop_clip();
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index 886524875..fac59eef7 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -345,8 +345,8 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
if ((x2 < x1+W) && what == RIGHT) x1 = x2 - W;
if (H >= 0) {
- if (sel) fl_clip(x1, y(), x2 - x1, H + dh - dy);
- else fl_clip(x1, y(), x2 - x1, H);
+ if (sel) fl_push_clip(x1, y(), x2 - x1, H + dh - dy);
+ else fl_push_clip(x1, y(), x2 - x1, H);
H += dh;
@@ -371,8 +371,8 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
} else {
H = -H;
- if (sel) fl_clip(x1, y() + h() - H - dy, x2 - x1, H + dy);
- else fl_clip(x1, y() + h() - H, x2 - x1, H);
+ if (sel) fl_push_clip(x1, y() + h() - H - dy, x2 - x1, H + dy);
+ else fl_push_clip(x1, y() + h() - H, x2 - x1, H);
H += dh;
diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx
index 1d7c1743e..eca6ae0de 100644
--- a/src/Fl_Tiled_Image.cxx
+++ b/src/Fl_Tiled_Image.cxx
@@ -111,7 +111,7 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
if (W == 0) W = Fl::w();
if (H == 0) H = Fl::h();
- fl_clip(X, Y, W, H);
+ fl_push_clip(X, Y, W, H);
X += cx;
Y += cy;
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx
index 142d72d5e..cbdc2cc7d 100644
--- a/src/fl_draw.cxx
+++ b/src/fl_draw.cxx
@@ -347,7 +347,7 @@ void fl_draw(
int draw_symbols) {
if ((!str || !*str) && !img) return;
if (w && h && !fl_not_clipped(x, y, w, h) && (align & FL_ALIGN_INSIDE)) return;
- if (align & FL_ALIGN_CLIP) fl_clip(x, y, w, h);
+ if (align & FL_ALIGN_CLIP) fl_push_clip(x, y, w, h);
fl_draw(str, x, y, w, h, align, fl_draw, img, draw_symbols);
if (align & FL_ALIGN_CLIP) fl_pop_clip();
}
diff --git a/src/fl_engraved_label.cxx b/src/fl_engraved_label.cxx
index 87757d3b1..50458d13c 100644
--- a/src/fl_engraved_label.cxx
+++ b/src/fl_engraved_label.cxx
@@ -39,7 +39,7 @@ static void innards(
{
Fl_Align a1 = align;
if (a1 & FL_ALIGN_CLIP) {
- fl_clip(X, Y, W, H); a1 = (Fl_Align)(a1&~FL_ALIGN_CLIP);}
+ fl_push_clip(X, Y, W, H); a1 = (Fl_Align)(a1&~FL_ALIGN_CLIP);}
fl_font((Fl_Font)o->font, o->size);
for (int i = 0; i < n; i++) {
fl_color((Fl_Color)(i < n-1 ? data[i][2] : o->color));
diff --git a/test/arc.cxx b/test/arc.cxx
index 6a950d619..e8ae1c6cb 100644
--- a/test/arc.cxx
+++ b/test/arc.cxx
@@ -35,7 +35,7 @@ const char* name[6] = {"X", "Y", "R", "start", "end", "rotate"};
class Drawing : public Fl_Widget {
void draw() {
- fl_clip(x(),y(),w(),h());
+ fl_push_clip(x(),y(),w(),h());
fl_color(FL_DARK3);
fl_rectf(x(),y(),w(),h());
fl_push_matrix();
diff --git a/test/curve.cxx b/test/curve.cxx
index f3e6623c0..73ba5fa69 100644
--- a/test/curve.cxx
+++ b/test/curve.cxx
@@ -40,7 +40,7 @@ int points;
class Drawing : public Fl_Widget {
void draw() {
- fl_clip(x(),y(),w(),h());
+ fl_push_clip(x(),y(),w(),h());
fl_color(FL_DARK3);
fl_rectf(x(),y(),w(),h());
fl_push_matrix();