summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-27 09:15:42 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-27 09:15:42 +0000
commitef4adc6f504d55646e8ac06ae8d77f8f1a4cc955 (patch)
tree7ebf811f04840f57503551d40fe82cdebf56cc35
parentdd609c22ecfe937ecd7d7b35747ab5b20caeee23 (diff)
downloadfpGUI-ef4adc6f504d55646e8ac06ae8d77f8f1a4cc955.tar.xz
* Applied Vladimir's button flag patch.
-rw-r--r--src/corelib/fpgfx.pas20
-rw-r--r--src/gui/gui_basegrid.pas2
-rw-r--r--src/gui/gui_button.pas8
-rw-r--r--src/gui/gui_combobox.pas2
-rw-r--r--src/gui/gui_editcombo.pas2
-rw-r--r--src/gui/gui_listview.pas4
-rw-r--r--src/gui/gui_scrollbar.pas8
-rw-r--r--src/gui/gui_trackbar.pas2
-rw-r--r--src/gui/gui_tree.pas2
9 files changed, 25 insertions, 25 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas
index d0d4001f..bc2fb866 100644
--- a/src/corelib/fpgfx.pas
+++ b/src/corelib/fpgfx.pas
@@ -29,8 +29,8 @@ type
TAnchor = (anLeft, anRight, anTop, anBottom);
TAnchors = set of TAnchor;
- TFButtonFlags = set of (btnIsEmbedded, btnIsDefault, btnIsPressed,
- btnIsSelected, btnHasFocus, btnHasParentColor);
+ TFButtonFlags = set of (btfIsEmbedded, btfIsDefault, btfIsPressed,
+ btfIsSelected, btfHasFocus, btfHasParentColor);
TFTextFlags = set of (txtLeft, txtHCenter, txtRight, txtTop, txtVCenter, txtBottom, txtWrap, txtEnabled,
txtAutoSize);
@@ -1476,13 +1476,13 @@ var
r: TfpgRect;
begin
r.SetRect(x, y, w, h);
- if btnIsDefault in AFlags then
+ if btfIsDefault in AFlags then
begin
ACanvas.SetColor(clBlack);
ACanvas.SetLineStyle(1, lsSolid);
ACanvas.DrawRectangle(r);
InflateRect(r, -1, -1);
- Exclude(AFlags, btnIsDefault);
+ Exclude(AFlags, btfIsDefault);
fpgStyle.DrawButtonFace(ACanvas, r.Left, r.Top, r.Width, r.Height, AFlags);
Exit; //==>
end;
@@ -1492,9 +1492,9 @@ begin
ACanvas.FillRectangle(x, y, w, h);
// Left and Top (outer)
- if (btnIsPressed in AFlags) then
+ if (btfIsPressed in AFlags) then
begin
- if (btnIsEmbedded in AFlags) then
+ if (btfIsEmbedded in AFlags) then
ACanvas.SetColor(clHilite2)
else
ACanvas.SetColor(clShadow2);
@@ -1513,9 +1513,9 @@ begin
//end;
// Right and Bottom (outer)
- if (btnIsPressed in AFlags) then
+ if (btfIsPressed in AFlags) then
begin
- if (btnIsEmbedded in AFlags) then
+ if (btfIsEmbedded in AFlags) then
ACanvas.SetColor(clHilite1)
else
ACanvas.SetColor(clShadow2);
@@ -1526,9 +1526,9 @@ begin
ACanvas.DrawLine(r.Right, r.Bottom, r.Left-1, r.Bottom); // bottom
// Right and Bottom (inner)
- if btnIsPressed in AFlags then
+ if btfIsPressed in AFlags then
begin
- if (btnIsEmbedded in AFlags) then
+ if (btfIsEmbedded in AFlags) then
ACanvas.SetColor(clButtonFace)
else
ACanvas.SetColor(clHilite1);
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas
index a16fd08a..4f2382f3 100644
--- a/src/gui/gui_basegrid.pas
+++ b/src/gui/gui_basegrid.pas
@@ -325,7 +325,7 @@ var
x: integer;
begin
// Here we can implement a head style check
- Canvas.DrawButtonFace(ARect, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(ARect, [btfIsEmbedded]);
r := ARect;
InflateRect(r, -2, -2);
Canvas.AddClipRect(r); // text may not overshoot header border
diff --git a/src/gui/gui_button.pas b/src/gui/gui_button.pas
index 66cd514c..b1225d50 100644
--- a/src/gui/gui_button.pas
+++ b/src/gui/gui_button.pas
@@ -261,16 +261,16 @@ begin
lBtnFlags := [];
if FDown then
- Include(lBtnFlags, btnIsPressed);
+ Include(lBtnFlags, btfIsPressed);
if FFocused and (not FEmbedded) then
- Include(lBtnFlags, btnHasFocus);
+ Include(lBtnFlags, btfHasFocus);
if FEmbedded then
- Include(lBtnFlags, btnIsEmbedded);
+ Include(lBtnFlags, btfIsEmbedded);
if FDefault then
- Include(lBtnFlags, btnIsDefault);
+ Include(lBtnFlags, btfIsDefault);
if FBackgroundColor <> clButtonFace then
begin
diff --git a/src/gui/gui_combobox.pas b/src/gui/gui_combobox.pas
index 0f251357..8452495c 100644
--- a/src/gui/gui_combobox.pas
+++ b/src/gui/gui_combobox.pas
@@ -633,7 +633,7 @@ begin
InflateRect(ar, -2, -2);
if FBtnPressed then
begin
- Include(btnflags, btnIsPressed);
+ Include(btnflags, btfIsPressed);
OffsetRect(ar, 1, 1);
end;
// paint button face
diff --git a/src/gui/gui_editcombo.pas b/src/gui/gui_editcombo.pas
index fe5b1d89..481fca0b 100644
--- a/src/gui/gui_editcombo.pas
+++ b/src/gui/gui_editcombo.pas
@@ -719,7 +719,7 @@ begin
InflateRect(ar, -2, -2);
if FBtnPressed then
begin
- Include(btnflags, btnIsPressed);
+ Include(btnflags, btfIsPressed);
OffsetRect(ar, 1, 1);
end;
// paint button face
diff --git a/src/gui/gui_listview.pas b/src/gui/gui_listview.pas
index 543d61c2..74b9bdb3 100644
--- a/src/gui/gui_listview.pas
+++ b/src/gui/gui_listview.pas
@@ -1273,8 +1273,8 @@ begin
Column := Columns.Column[I];
if Column.Visible then
begin
- Flags := [btnIsEmbedded];
- if Column.FDown then Flags := Flags + [btnIsPressed];
+ Flags := [btfIsEmbedded];
+ if Column.FDown then Flags := Flags + [btfIsPressed];
cRect.Top := cTop;
cRect.Left := cLeft;
cRect.Width := Column.Width;
diff --git a/src/gui/gui_scrollbar.pas b/src/gui/gui_scrollbar.pas
index 2668f659..49c1e9d1 100644
--- a/src/gui/gui_scrollbar.pas
+++ b/src/gui/gui_scrollbar.pas
@@ -294,13 +294,13 @@ var
begin
if Pressed then
begin
- Canvas.DrawButtonFace(x, y, w, h, [btnIsEmbedded, btnIsPressed]);
+ Canvas.DrawButtonFace(x, y, w, h, [btfIsEmbedded, btfIsPressed]);
dx := 1;
dy := 1;
end
else
begin
- Canvas.DrawButtonFace(x, y, w, h, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(x, y, w, h, [btfIsEmbedded]);
dx := 0;
dy := 0;
end;
@@ -389,12 +389,12 @@ begin
// Paint the slider button
if Orientation = orVertical then
begin
- Canvas.DrawButtonFace(0, Width + FSliderPos, Width, FSliderLength, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(0, Width + FSliderPos, Width, FSliderLength, [btfIsEmbedded]);
Canvas.EndDraw(0, Width, Width, Height - Width - Width);
end
else
begin
- Canvas.DrawButtonFace(Height + FSliderPos, 0, FSliderLength, Height, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(Height + FSliderPos, 0, FSliderLength, Height, [btfIsEmbedded]);
Canvas.EndDraw(Height, 0, Width - Height - Height, Height);
end;
end;
diff --git a/src/gui/gui_trackbar.pas b/src/gui/gui_trackbar.pas
index a4a82d69..7b3624e1 100644
--- a/src/gui/gui_trackbar.pas
+++ b/src/gui/gui_trackbar.pas
@@ -571,7 +571,7 @@ begin
if Orientation = orVertical then
begin
- Canvas.DrawButtonFace(0, Width + FSliderPos, Width, FSliderLength, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(0, Width + FSliderPos, Width, FSliderLength, [btfIsEmbedded]);
Canvas.EndDraw(0, Width, Width, Height - Width - Width);
end
else
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas
index 64bf6718..5865f50f 100644
--- a/src/gui/gui_tree.pas
+++ b/src/gui/gui_tree.pas
@@ -1470,7 +1470,7 @@ procedure TfpgTreeview.DrawHeader(ACol: integer; ARect: TfpgRect;
AFlags: integer);
begin
// Here we can implement a head style check
- Canvas.DrawButtonFace(ARect, [btnIsEmbedded]);
+ Canvas.DrawButtonFace(ARect, [btfIsEmbedded]);
end;
procedure TfpgTreeview.HandleKeyPress(var keycode: word;