mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
remove obsoleted splitter drawing code
git-svn-id: trunk@13464 -
This commit is contained in:
parent
67df237d33
commit
4db415b23b
@ -111,7 +111,6 @@ type
|
|||||||
function DrawCGImage(X, Y, Width, Height: Integer; CGImage: CGImageRef): Boolean;
|
function DrawCGImage(X, Y, Width, Height: Integer; CGImage: CGImageRef): Boolean;
|
||||||
public
|
public
|
||||||
procedure DrawFocusRect(const ARect: TRect);
|
procedure DrawFocusRect(const ARect: TRect);
|
||||||
procedure DrawSplitter(const ARect: TRect);
|
|
||||||
|
|
||||||
procedure Ellipse(X1, Y1, X2, Y2: Integer);
|
procedure Ellipse(X1, Y1, X2, Y2: Integer);
|
||||||
procedure ExcludeClipRect(Left, Top, Right, Bottom: Integer);
|
procedure ExcludeClipRect(Left, Top, Right, Bottom: Integer);
|
||||||
@ -745,25 +744,6 @@ begin
|
|||||||
Self, 'DrawFocusRect', 'HIThemeDrawFocusRect');
|
Self, 'DrawFocusRect', 'HIThemeDrawFocusRect');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: TCarbonDeviceContext.DrawSplitter
|
|
||||||
Params: ARect - Bounding rectangle
|
|
||||||
|
|
||||||
Draws a splitter
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
procedure TCarbonDeviceContext.DrawSplitter(const ARect: TRect);
|
|
||||||
var
|
|
||||||
DrawInfo: HIThemeSplitterDrawInfo;
|
|
||||||
begin
|
|
||||||
DrawInfo.version := 0;
|
|
||||||
DrawInfo.adornment := kHIThemeSplitterAdornmentNone;
|
|
||||||
DrawInfo.state := kThemeStateActive;
|
|
||||||
|
|
||||||
OSError(
|
|
||||||
HIThemeDrawPaneSplitter(RectToCGRect(ARect), DrawInfo, CGContext, kHIThemeOrientationNormal),
|
|
||||||
Self, 'DrawSplitter', 'HIThemeDrawPaneSplitter');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCarbonDeviceContext.Ellipse
|
Method: TCarbonDeviceContext.Ellipse
|
||||||
Params:
|
Params:
|
||||||
|
@ -102,7 +102,6 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
class procedure DrawSplitter(const ASplitter: TCustomSplitter); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCarbonWSSplitter }
|
{ TCarbonWSSplitter }
|
||||||
@ -355,19 +354,6 @@ begin
|
|||||||
TCarbonTabsControl(ANotebook.Handle).ShowTabs(AShowTabs);
|
TCarbonTabsControl(ANotebook.Handle).ShowTabs(AShowTabs);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCarbonWSCustomSplitter }
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: TCarbonWSCustomSplitter.DrawSplitter
|
|
||||||
Params: ASplitter - LCL custom splitter
|
|
||||||
|
|
||||||
Draws a splitter in Carbon interface
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
class procedure TCarbonWSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter);
|
|
||||||
begin
|
|
||||||
TCarbonDeviceContext(ASplitter.Canvas.Handle).DrawSplitter(ASplitter.ClientRect);
|
|
||||||
end;
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
@ -381,7 +367,7 @@ initialization
|
|||||||
// RegisterWSComponent(TPage, TCarbonWSPage);
|
// RegisterWSComponent(TPage, TCarbonWSPage);
|
||||||
// RegisterWSComponent(TNotebook, TCarbonWSNotebook);
|
// RegisterWSComponent(TNotebook, TCarbonWSNotebook);
|
||||||
// RegisterWSComponent(TShape, TCarbonWSShape);
|
// RegisterWSComponent(TShape, TCarbonWSShape);
|
||||||
RegisterWSComponent(TCustomSplitter, TCarbonWSCustomSplitter);
|
// RegisterWSComponent(TCustomSplitter, TCarbonWSCustomSplitter);
|
||||||
// RegisterWSComponent(TSplitter, TCarbonWSSplitter);
|
// RegisterWSComponent(TSplitter, TCarbonWSSplitter);
|
||||||
// RegisterWSComponent(TPaintBox, TCarbonWSPaintBox);
|
// RegisterWSComponent(TPaintBox, TCarbonWSPaintBox);
|
||||||
// RegisterWSComponent(TCustomImage, TCarbonWSCustomImage);
|
// RegisterWSComponent(TCustomImage, TCarbonWSCustomImage);
|
||||||
|
@ -102,7 +102,6 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
class procedure DrawSplitter(const ASplitter: TCustomSplitter); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtkWSSplitter }
|
{ TGtkWSSplitter }
|
||||||
@ -510,86 +509,6 @@ begin
|
|||||||
gtk_notebook_set_show_tabs(PGtkNotebook(ANotebook.Handle), AShowTabs);
|
gtk_notebook_set_show_tabs(PGtkNotebook(ANotebook.Handle), AShowTabs);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtkWSCustomSplitter }
|
|
||||||
|
|
||||||
class procedure TGtkWSCustomSplitter.DrawSplitter(
|
|
||||||
const ASplitter: TCustomSplitter);
|
|
||||||
var
|
|
||||||
Widget: PGtkWidget;
|
|
||||||
ClientWidget: Pointer;
|
|
||||||
DCOrigin: TPoint;
|
|
||||||
Area: TGdkRectangle;
|
|
||||||
Style: PGtkStyle;
|
|
||||||
AWindow: PGdkWindow;
|
|
||||||
DevContext: TGtkDeviceContext;
|
|
||||||
ARect: TRect;
|
|
||||||
{$IFDEF Gtk1}
|
|
||||||
Detail: PChar;
|
|
||||||
{$ELSE}
|
|
||||||
Orientation: TGtkOrientation;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
|
||||||
if not ASplitter.HandleAllocated then exit;
|
|
||||||
DevContext:=TGtkDeviceContext(ASplitter.Canvas.Handle);
|
|
||||||
Widget:=PGtkWidget(ASplitter.Handle);
|
|
||||||
ClientWidget:=GetFixedWidget(Widget);
|
|
||||||
if ClientWidget<>nil then
|
|
||||||
Widget:=ClientWidget;
|
|
||||||
AWindow:=DevContext.Drawable;
|
|
||||||
|
|
||||||
Style := gtk_widget_get_style(Widget);
|
|
||||||
if Style = nil then
|
|
||||||
Style:=GetStyle(lgsButton);
|
|
||||||
|
|
||||||
DCOrigin := DevContext.Offset;
|
|
||||||
Area.X:=DCOrigin.X;
|
|
||||||
Area.Y:=DCOrigin.Y;
|
|
||||||
Area.Width:=ASplitter.Width;
|
|
||||||
Area.Height:=ASplitter.Height;
|
|
||||||
|
|
||||||
if ASplitter.Beveled then begin
|
|
||||||
ARect:=Bounds(Area.x,Area.y,Area.Width,Area.Height);
|
|
||||||
DrawEdge(HDC(DevContext),ARect,BDR_RAISEDOUTER,BF_ADJUST+BF_RECT);
|
|
||||||
Area.X:=ARect.Left;
|
|
||||||
Area.Y:=ARect.Top;
|
|
||||||
Area.Width:=ARect.Right-ARect.Left;
|
|
||||||
Area.Height:=ARect.Bottom-ARect.Top;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$IFDEF Gtk1}
|
|
||||||
if ASplitter.ResizeAnchor in [akTop,akBottom] then
|
|
||||||
Detail:='vpaned'
|
|
||||||
else
|
|
||||||
Detail:='hpaned';
|
|
||||||
|
|
||||||
gtk_paint_box(Style, AWindow,
|
|
||||||
GTK_WIDGET_STATE(Widget),
|
|
||||||
GTK_SHADOW_NONE,
|
|
||||||
@Area, Widget, Detail,
|
|
||||||
Area.X,Area.Y,Area.Width,Area.Height);
|
|
||||||
{$ELSE}
|
|
||||||
if ASplitter.ResizeAnchor in [akTop,akBottom] then
|
|
||||||
Orientation := GTK_ORIENTATION_HORIZONTAL
|
|
||||||
else
|
|
||||||
Orientation := GTK_ORIENTATION_VERTICAL;
|
|
||||||
|
|
||||||
// fill area
|
|
||||||
gtk_paint_flat_box(Style, AWindow,
|
|
||||||
GTK_WIDGET_STATE(Widget),
|
|
||||||
GTK_SHADOW_NONE,
|
|
||||||
@Area, Widget, 'paned',
|
|
||||||
Area.X, Area.Y, Area.Width, Area.Height);
|
|
||||||
|
|
||||||
// draw size grip
|
|
||||||
gtk_paint_handle(Style, AWindow,
|
|
||||||
GTK_WIDGET_STATE(Widget),
|
|
||||||
GTK_SHADOW_NONE,
|
|
||||||
@Area, Widget, 'paned',
|
|
||||||
Area.X, Area.Y, Area.Width, Area.Height,
|
|
||||||
Orientation);
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
|
||||||
|
|
||||||
class function TGtkWSCustomPanel.CreateHandle(const AWinControl: TWinControl;
|
class function TGtkWSCustomPanel.CreateHandle(const AWinControl: TWinControl;
|
||||||
const AParams: TCreateParams): TLCLIntfHandle;
|
const AParams: TCreateParams): TLCLIntfHandle;
|
||||||
var
|
var
|
||||||
@ -660,7 +579,7 @@ initialization
|
|||||||
// RegisterWSComponent(TPage, TGtkWSPage);
|
// RegisterWSComponent(TPage, TGtkWSPage);
|
||||||
// RegisterWSComponent(TNotebook, TGtkWSNotebook);
|
// RegisterWSComponent(TNotebook, TGtkWSNotebook);
|
||||||
// RegisterWSComponent(TShape, TGtkWSShape);
|
// RegisterWSComponent(TShape, TGtkWSShape);
|
||||||
RegisterWSComponent(TCustomSplitter, TGtkWSCustomSplitter);
|
// RegisterWSComponent(TCustomSplitter, TGtkWSCustomSplitter);
|
||||||
// RegisterWSComponent(TSplitter, TGtkWSSplitter);
|
// RegisterWSComponent(TSplitter, TGtkWSSplitter);
|
||||||
// RegisterWSComponent(TPaintBox, TGtkWSPaintBox);
|
// RegisterWSComponent(TPaintBox, TGtkWSPaintBox);
|
||||||
// RegisterWSComponent(TCustomImage, TGtkWSCustomImage);
|
// RegisterWSComponent(TCustomImage, TGtkWSCustomImage);
|
||||||
|
@ -109,7 +109,6 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
class procedure DrawSplitter(const ASplitter: TCustomSplitter); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSSplitter }
|
{ TWin32WSSplitter }
|
||||||
@ -705,20 +704,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ TWin32WSCustomSplitter }
|
|
||||||
|
|
||||||
class procedure TWin32WSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter);
|
|
||||||
var
|
|
||||||
ARect: TRect;
|
|
||||||
begin
|
|
||||||
if ASplitter.Beveled then
|
|
||||||
begin
|
|
||||||
ARect := Rect(0, 0, ASplitter.Width, ASplitter.Height);
|
|
||||||
Frame3D(ASplitter.Canvas.Handle, ARect, 1, bvRaised);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$include win32trayicon.inc}
|
{$include win32trayicon.inc}
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
@ -734,7 +719,7 @@ initialization
|
|||||||
// RegisterWSComponent(TPage, TWin32WSPage);
|
// RegisterWSComponent(TPage, TWin32WSPage);
|
||||||
// RegisterWSComponent(TNotebook, TWin32WSNotebook);
|
// RegisterWSComponent(TNotebook, TWin32WSNotebook);
|
||||||
// RegisterWSComponent(TShape, TWin32WSShape);
|
// RegisterWSComponent(TShape, TWin32WSShape);
|
||||||
RegisterWSComponent(TCustomSplitter, TWin32WSCustomSplitter);
|
// RegisterWSComponent(TCustomSplitter, TWin32WSCustomSplitter);
|
||||||
// RegisterWSComponent(TSplitter, TWin32WSSplitter);
|
// RegisterWSComponent(TSplitter, TWin32WSSplitter);
|
||||||
// RegisterWSComponent(TPaintBox, TWin32WSPaintBox);
|
// RegisterWSComponent(TPaintBox, TWin32WSPaintBox);
|
||||||
// RegisterWSComponent(TCustomImage, TWin32WSCustomImage);
|
// RegisterWSComponent(TCustomImage, TWin32WSCustomImage);
|
||||||
|
@ -107,7 +107,6 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
class procedure DrawSplitter(const ASplitter: TCustomSplitter); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWinCEWSSplitter }
|
{ TWinCEWSSplitter }
|
||||||
@ -598,20 +597,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ TWinCEWSCustomSplitter }
|
|
||||||
|
|
||||||
class procedure TWinCEWSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter);
|
|
||||||
var
|
|
||||||
ARect: TRect;
|
|
||||||
begin
|
|
||||||
if ASplitter.Beveled then
|
|
||||||
begin
|
|
||||||
ARect := Rect(0, 0, ASplitter.Width, ASplitter.Height);
|
|
||||||
Frame3D(ASplitter.Canvas.Handle, ARect, 1, bvRaised);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
@ -625,7 +610,7 @@ initialization
|
|||||||
// RegisterWSComponent(TPage, TWinCEWSPage);
|
// RegisterWSComponent(TPage, TWinCEWSPage);
|
||||||
// RegisterWSComponent(TNotebook, TWinCEWSNotebook);
|
// RegisterWSComponent(TNotebook, TWinCEWSNotebook);
|
||||||
// RegisterWSComponent(TShape, TWinCEWSShape);
|
// RegisterWSComponent(TShape, TWinCEWSShape);
|
||||||
RegisterWSComponent(TCustomSplitter, TWinCEWSCustomSplitter);
|
// RegisterWSComponent(TCustomSplitter, TWinCEWSCustomSplitter);
|
||||||
// RegisterWSComponent(TSplitter, TWinCEWSSplitter);
|
// RegisterWSComponent(TSplitter, TWinCEWSSplitter);
|
||||||
// RegisterWSComponent(TPaintBox, TWinCEWSPaintBox);
|
// RegisterWSComponent(TPaintBox, TWinCEWSPaintBox);
|
||||||
// RegisterWSComponent(TCustomImage, TWinCEWSCustomImage);
|
// RegisterWSComponent(TCustomImage, TWinCEWSCustomImage);
|
||||||
|
@ -94,9 +94,7 @@ type
|
|||||||
|
|
||||||
TWSCustomSplitter = class(TWSCustomControl)
|
TWSCustomSplitter = class(TWSCustomControl)
|
||||||
public
|
public
|
||||||
class procedure DrawSplitter(const ASplitter: TCustomSplitter); virtual;
|
|
||||||
end;
|
end;
|
||||||
TWSCustomSplitterClass = class of TWSCustomSplitter;
|
|
||||||
|
|
||||||
{ TWSSplitter }
|
{ TWSSplitter }
|
||||||
|
|
||||||
@ -289,14 +287,6 @@ class procedure TWSCustomNotebook.ShowTabs(const ANotebook: TCustomNotebook;
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWSCustomSplitter }
|
|
||||||
|
|
||||||
class procedure TWSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter
|
|
||||||
);
|
|
||||||
begin
|
|
||||||
debugln('TWSCustomSplitter.DrawSplitter TODO');
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TWSCustomTrayIcon }
|
{ TWSCustomTrayIcon }
|
||||||
|
|
||||||
class function TWSCustomTrayIcon.Hide(const ATrayIcon: TCustomTrayIcon): Boolean;
|
class function TWSCustomTrayIcon.Hide(const ATrayIcon: TCustomTrayIcon): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user