Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

View File

@@ -0,0 +1,531 @@
{ rxswitch unit
Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team
original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version with the following modification:
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a
module which is not derived from or based on this library. If you modify
this library, you may extend this exception to your version of the library,
but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit rxswitch;
{$I rx.inc}
interface
uses SysUtils, LCLType, LCLProc, LCLIntf, LMessages, Classes, Graphics,
Controls, Forms, ExtCtrls, Menus;
type
{ TRxSwitch }
TTextPos = (tpNone, tpLeft, tpRight, tpAbove, tpBelow);
TSwithState = (sw_off, sw_on);
TSwitchBitmaps = set of TSwithState;
TRxSwitch = class(TCustomControl)
private
FActive: Boolean;
FBitmaps: array [TSwithState] of TBitmap;
FDisableBitmaps: array [TSwithState] of TBitmap;
FOnOn: TNotifyEvent;
FOnOff: TNotifyEvent;
FStateOn: TSwithState;
FTextPosition: TTextPos;
FBorderStyle: TBorderStyle;
FToggleKey: TShortCut;
FShowFocus: Boolean;
FUserBitmaps: TSwitchBitmaps;
function GetSwitchGlyphOff: TBitmap;
function GetSwitchGlyphOn: TBitmap;
procedure GlyphChanged(Sender: TObject);
procedure SetStateOn(Value: TSwithState);
procedure SetSwitchGlyphOff(const AValue: TBitmap);
procedure SetSwitchGlyphOn(const AValue: TBitmap);
procedure SetTextPosition(Value: TTextPos);
procedure SetBorderStyle(Value: TBorderStyle);
function GetSwitchGlyph(Index: TSwithState): TBitmap;
procedure SetSwitchGlyph(Index: TSwithState; Value: TBitmap);
function StoreBitmap(Index: TSwithState): Boolean;
procedure SetShowFocus(Value: Boolean);
procedure CreateDisabled(Index: TSwithState);
procedure ReadBinaryData(Stream: TStream);
function StoreBitmapOff: boolean;
function StoreBitmapOn: boolean;
procedure WriteBinaryData(Stream: TStream);
procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
procedure CMFocusChanged(var Message: TLMessage); message CM_FOCUSCHANGED;
procedure CMTextChanged(var Message: TLMessage); message CM_TEXTCHANGED;
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure DefineProperties(Filer: TFiler); override;
function GetPalette: HPALETTE; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure Paint; override;
procedure DoOn; dynamic;
procedure DoOff; dynamic;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ToggleSwitch;
published
property Align;
property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle
default bsNone;
property Caption;
property Color;
property Cursor;
property DragMode;
property DragCursor;
property Enabled;
property Font;
property GlyphOff: TBitmap read GetSwitchGlyphOff write SetSwitchGlyphOff
stored StoreBitmapOff;
property GlyphOn: TBitmap read GetSwitchGlyphOn write SetSwitchGlyphOn
stored StoreBitmapOn;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowFocus: Boolean read FShowFocus write SetShowFocus default True;
property ToggleKey: TShortCut read FToggleKey write FToggleKey
default VK_SPACE;
property ShowHint;
property StateOn: TSwithState read FStateOn write SetStateOn default sw_off;
property TabOrder;
property TabStop default True;
property TextPosition: TTextPos read FTextPosition write SetTextPosition
default tpNone;
property Anchors;
property Constraints;
property DragKind;
property Visible;
property OnClick;
property OnDblClick;
property OnEnter;
property OnExit;
property OnMouseMove;
property OnMouseDown;
property OnMouseUp;
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
property OnKeyDown;
property OnKeyUp;
property OnKeyPress;
property OnDragOver;
property OnDragDrop;
property OnEndDrag;
property OnStartDrag;
property OnContextPopup;
property OnEndDock;
property OnStartDock;
property OnOn: TNotifyEvent read FOnOn write FOnOn;
property OnOff: TNotifyEvent read FOnOff write FOnOff;
end;
{$R rxswitch.res}
implementation
uses rxlclutils;
const
BorderStyles: array[TBorderStyle] of Longint = (0, WS_BORDER);
{ TRxSwitch component }
constructor TRxSwitch.Create(AOwner: TComponent);
var
I : TSwithState;
begin
inherited Create(AOwner);
ControlStyle := [csClickEvents, csSetCaption, csCaptureMouse,
csOpaque, csDoubleClicks];
Width := 50;
Height := 60;
for I := sw_off to sw_on do
begin
FBitmaps[I] := TBitmap.Create;
SetSwitchGlyph(I, nil);
FBitmaps[I].OnChange := @GlyphChanged;
end;
FUserBitmaps := [];
FShowFocus := True;
FStateOn := sw_off;
FTextPosition := tpNone;
FBorderStyle := bsNone;
FToggleKey := VK_SPACE;
TabStop := True;
end;
destructor TRxSwitch.Destroy;
var
I: Byte;
begin
for I := 0 to 1 do
begin
FBitmaps[TSwithState(I)].OnChange := nil;
FDisableBitmaps[TSwithState(I)].Free;
FBitmaps[TSwithState(I)].Free;
end;
inherited Destroy;
end;
procedure TRxSwitch.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do begin
WindowClass.Style := WindowClass.Style or CS_HREDRAW or CS_VREDRAW;
Style := Style or Longword(BorderStyles[FBorderStyle]);
end;
end;
procedure TRxSwitch.DefineProperties(Filer: TFiler);
function DoWrite: Boolean;
begin
if Assigned(Filer.Ancestor) then
Result := FUserBitmaps <> TRxSwitch(Filer.Ancestor).FUserBitmaps
else Result := FUserBitmaps <> [];
end;
begin
inherited DefineProperties(Filer);
Filer.DefineBinaryProperty('Data', @ReadBinaryData, @WriteBinaryData,
DoWrite);
end;
function TRxSwitch.GetPalette: HPALETTE;
begin
if Enabled then Result := FBitmaps[FStateOn].Palette else Result := 0;
end;
procedure TRxSwitch.ReadBinaryData(Stream: TStream);
begin
Stream.ReadBuffer(FUserBitmaps, SizeOf(FUserBitmaps));
end;
function TRxSwitch.StoreBitmapOff: boolean;
begin
Result:=StoreBitmap(sw_off);
end;
function TRxSwitch.StoreBitmapOn: boolean;
begin
Result:=StoreBitmap(sw_on);
end;
procedure TRxSwitch.WriteBinaryData(Stream: TStream);
begin
Stream.WriteBuffer(FUserBitmaps, SizeOf(FUserBitmaps));
end;
function TRxSwitch.StoreBitmap(Index: TSwithState): Boolean;
begin
Result := Index in FUserBitmaps;
end;
function TRxSwitch.GetSwitchGlyph(Index: TSwithState): TBitmap;
begin
if csLoading in ComponentState then Include(FUserBitmaps, Index);
Result := FBitmaps[Index]
end;
procedure TRxSwitch.CreateDisabled(Index: TSwithState);
begin
if FDisableBitmaps[Index] <> nil then
FDisableBitmaps[Index].Free;
try
FDisableBitmaps[Index] :=nil;
// CreateDisabledBitmap(FBitmaps[Index], clBlack);
except
FDisableBitmaps[Index] := nil;
raise;
end;
end;
procedure TRxSwitch.GlyphChanged(Sender: TObject);
var
I: TSwithState;
begin
for I := sw_off to sw_on do
if Sender = FBitmaps[I] then
begin
CreateDisabled(I);
end;
Invalidate;
end;
function TRxSwitch.GetSwitchGlyphOff: TBitmap;
begin
Result:=GetSwitchGlyph(sw_off);
end;
function TRxSwitch.GetSwitchGlyphOn: TBitmap;
begin
Result:=GetSwitchGlyph(sw_on);
end;
procedure TRxSwitch.SetSwitchGlyph(Index: TSwithState; Value: TBitmap);
var
S: String;
B: TBitmap;
begin
FBitmaps[Index].Clear;
if Value <> nil then
begin
FBitmaps[Index].Assign(Value);
Include(FUserBitmaps, Index);
end
else
begin
case Index of
{ sw_off: FBitmaps[Index].Handle:=CreatePixmapIndirect(@RXSWITCH_OFF[0], GetSysColor(COLOR_BTNFACE));
sw_on: FBitmaps[Index].Handle:=CreatePixmapIndirect(@RXSWITCH_ON[0],
GetSysColor(COLOR_BTNFACE));}
sw_off:S:='rxswitch_off';
sw_on:S:='rxswitch_on';
else
Exit;
end;
B:=CreateResBitmap(S);
FBitmaps[Index].Assign(B);
B.Free;
Exclude(FUserBitmaps, Index);
end;
end;
procedure TRxSwitch.CMFocusChanged(var Message: TLMessage);
var
Active: Boolean;
begin
{ with Message do Active := (Sender = Self);
if Active <> FActive then
begin
FActive := Active;
if FShowFocus then Invalidate;
end;}
inherited;
end;
procedure TRxSwitch.CMEnabledChanged(var Message: TLMessage);
begin
inherited;
Invalidate;
end;
procedure TRxSwitch.CMTextChanged(var Message: TLMessage);
begin
inherited;
Invalidate;
end;
procedure TRxSwitch.CMDialogChar(var Message: TCMDialogChar);
begin
if IsAccel(Message.CharCode, Caption) and CanFocus then begin
SetFocus;
Message.Result := 1;
end;
end;
procedure TRxSwitch.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbLeft then
begin
if TabStop and CanFocus then SetFocus;
ToggleSwitch;
end;
inherited MouseDown(Button, Shift, X, Y);
end;
procedure TRxSwitch.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if FToggleKey = ShortCut(Key, Shift) then begin
ToggleSwitch;
Key := 0;
end;
end;
procedure TRxSwitch.Paint;
var
ARect: TRect;
Text1: array[0..255] of Char;
FontHeight: Integer;
procedure DrawBitmap(Bmp: TBitmap);
var
TmpImage: TBitmap;
IWidth, IHeight, X, Y: Integer;
IRect: TRect;
begin
IWidth := Bmp.Width;
IHeight := Bmp.Height;
IRect := Rect(0, 0, IWidth, IHeight);
TmpImage := TBitmap.Create;
try
TmpImage.Width := IWidth;
TmpImage.Height := IHeight;
TmpImage.Canvas.Brush.Color := Self.Brush.Color;
// TmpImage.Canvas.BrushCopy(IRect, Bmp, IRect, Bmp.TransparentColor);
X := 0; Y := 0;
case FTextPosition of
tpNone:
begin
X := ((Width - IWidth) div 2);
Y := ((Height - IHeight) div 2);
end;
tpLeft:
begin
X := Width - IWidth;
Y := ((Height - IHeight) div 2);
Dec(ARect.Right, IWidth);
end;
tpRight:
begin
X := 0;
Y := ((Height - IHeight) div 2);
Inc(ARect.Left, IWidth);
end;
tpAbove:
begin
X := ((Width - IWidth) div 2);
Y := Height - IHeight;
Dec(ARect.Bottom, IHeight);
end;
tpBelow:
begin
X := ((Width - IWidth) div 2);
Y := 0;
Inc(ARect.Top, IHeight);
end;
end;
// Canvas.Draw(X, Y, TmpImage);
Canvas.Draw(X, Y, Bmp);
// if Focused and FShowFocus and TabStop and not (csDesigning in ComponentState) then
// Canvas.DrawFocusRect(Rect(X, Y, X + IWidth, Y + IHeight));
// Canvas.FrameRect(Rect(X, Y, X + IWidth, Y + IHeight));
finally
TmpImage.Free;
end;
end;
begin
ARect := GetClientRect;
with Canvas do
begin
Font := Self.Font;
Brush.Color := Self.Color;
FillRect(ARect);
if not Enabled and (FDisableBitmaps[FStateOn] <> nil) then
DrawBitmap(FDisableBitmaps[FStateOn])
else
DrawBitmap(FBitmaps[FStateOn]);
if FTextPosition <> tpNone then
begin
FontHeight := TextHeight('W');
with ARect do
begin
Top := ((Bottom + Top) - FontHeight) shr 1;
Bottom := Top + FontHeight;
end;
StrPCopy(Text1, Caption);
DrawText(Handle, Text1, StrLen(Text1), ARect, {DT_EXPANDTABS or }DT_VCENTER or DT_CENTER);
end;
end;
end;
procedure TRxSwitch.DoOn;
begin
if Assigned(FOnOn) then FOnOn(Self);
end;
procedure TRxSwitch.DoOff;
begin
if Assigned(FOnOff) then FOnOff(Self);
end;
procedure TRxSwitch.ToggleSwitch;
begin
StateOn := TSwithState(not boolean(StateOn));
end;
procedure TRxSwitch.SetBorderStyle(Value: TBorderStyle);
begin
if FBorderStyle <> Value then
begin
FBorderStyle := Value;
RecreateWnd(Self);
end;
end;
procedure TRxSwitch.SetStateOn(Value: TSwithState);
begin
if FStateOn <> Value then
begin
FStateOn := Value;
Invalidate;
if Value = sw_on then
DoOn
else
DoOff;
end;
end;
procedure TRxSwitch.SetSwitchGlyphOff(const AValue: TBitmap);
begin
SetSwitchGlyph(sw_off, AValue);
end;
procedure TRxSwitch.SetSwitchGlyphOn(const AValue: TBitmap);
begin
SetSwitchGlyph(sw_on, AValue);
end;
procedure TRxSwitch.SetTextPosition(Value: TTextPos);
begin
if FTextPosition <> Value then
begin
FTextPosition := Value;
Invalidate;
end;
end;
procedure TRxSwitch.SetShowFocus(Value: Boolean);
begin
if FShowFocus <> Value then
begin
FShowFocus := Value;
if not (csDesigning in ComponentState) then Invalidate;
end;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,230 @@
object Form1: TForm1
Left = 585
Height = 610
Top = 311
Width = 874
Caption = 'Form1'
ClientHeight = 610
ClientWidth = 874
OnCreate = FormCreate
LCLVersion = '1.9.0.0'
object RxDBGrid1: TRxDBGrid
Left = 0
Height = 560
Top = 50
Width = 874
ColumnDefValues.BlobText = '(данные)'
TitleButtons = False
AutoSort = True
Columns = <
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'ID'
Width = 60
FieldName = 'ID'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Пусто)'
Filter.AllValue = '(Все значения)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Value = 'Current:'
Footer.ValueType = fvtStaticText
Footers = <>
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'NAME'
Width = 350
FieldName = 'NAME'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Пусто)'
Filter.AllValue = '(Все значения)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.FieldName = 'NAME'
Footer.ValueType = fvtFieldValue
Footers = <>
WordWrap = True
end
item
Title.Alignment = taCenter
Title.Orientation = toHorizontal
Title.Caption = 'CODE'
Width = 90
FieldName = 'CODE'
EditButtons = <>
Filter.DropDownRows = 0
Filter.EmptyValue = '(Пусто)'
Filter.AllValue = '(Все значения)'
Filter.EmptyFont.Style = [fsItalic]
Filter.ItemIndex = -1
Footer.Alignment = taRightJustify
Footer.FieldName = 'CODE'
Footer.ValueType = fvtSum
Footers = <>
end>
KeyStrokes = <
item
Command = rxgcShowFindDlg
ShortCut = 16454
Enabled = True
end
item
Command = rxgcShowColumnsDlg
ShortCut = 16471
Enabled = True
end
item
Command = rxgcShowFilterDlg
ShortCut = 16468
Enabled = True
end
item
Command = rxgcShowSortDlg
ShortCut = 16467
Enabled = True
end
item
Command = rxgcShowQuickFilter
ShortCut = 16465
Enabled = True
end
item
Command = rxgcHideQuickFilter
ShortCut = 16456
Enabled = True
end
item
Command = rxgcSelectAll
ShortCut = 16449
Enabled = True
end
item
Command = rxgcDeSelectAll
ShortCut = 16429
Enabled = True
end
item
Command = rxgcInvertSelection
ShortCut = 16426
Enabled = True
end
item
Command = rxgcOptimizeColumnsWidth
ShortCut = 16427
Enabled = True
end
item
Command = rxgcCopyCellValue
ShortCut = 16451
Enabled = True
end>
FooterOptions.Active = True
FooterOptions.Color = clYellow
FooterOptions.RowCount = 1
FooterOptions.DrawFullLine = True
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
SearchOptions.FromStart = False
OnCalcRowHeight = RxDBGrid1CalcRowHeight
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgFooterRows, rdgAllowQuickFilter]
FooterColor = clYellow
FooterRowCount = 1
Align = alClient
Color = clWindow
DrawFullLine = True
FocusColor = clRed
SelectedColor = clHighlight
GridLineStyle = psSolid
DataSource = DataSource1
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
ReadOnly = True
TabOrder = 0
end
object Panel1: TPanel
Left = 0
Height = 50
Top = 0
Width = 874
Align = alTop
Caption = 'Panel1'
ClientHeight = 50
ClientWidth = 874
TabOrder = 1
object CheckBox1: TCheckBox
Left = 16
Height = 24
Top = 8
Width = 96
Caption = 'Word wrap'
Checked = True
OnChange = CheckBox1Change
State = cbChecked
TabOrder = 0
end
object CheckBox2: TCheckBox
Left = 152
Height = 24
Top = 8
Width = 105
Caption = 'Show footer'
OnChange = CheckBox1Change
TabOrder = 1
end
end
object DataSource1: TDataSource
DataSet = RxMemoryData1
Left = 328
Top = 134
end
object RxMemoryData1: TRxMemoryData
FieldDefs = <
item
Name = 'ID'
DataType = ftInteger
end
item
Name = 'NAME'
DataType = ftString
Size = 500
end
item
Name = 'CODE'
DataType = ftInteger
end>
PacketRecords = 0
Left = 360
Top = 134
object RxMemoryData1ID: TLongintField
FieldKind = fkData
FieldName = 'ID'
Index = 0
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object RxMemoryData1NAME: TStringField
FieldKind = fkData
FieldName = 'NAME'
Index = 1
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 500
end
object RxMemoryData1CODE: TLongintField
FieldKind = fkData
FieldName = 'CODE'
Index = 2
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
end
end

View File

@@ -0,0 +1,71 @@
/* XPM */
static char *DICE4[]={
"64 64 4 1",
". c None",
"# c #000000",
"b c #c0c0c0",
"a c #ffffff",
"................................................................",
".............................######.............................",
"...........................##########...........................",
".........................####aaaaaa####.........................",
".......................####aaaaaaaaaa####.......................",
".....................####aaaaa####aaaaa####.....................",
"...................####aaaaa########aaaaa####...................",
".................####aaaaaa##########aaaaaa####.................",
"...............####aaaaaaaa##########aaaaaaaa####...............",
".............####aaaaaaaaaaa########aaaaaaaaaaa####.............",
"...........####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####...........",
".........####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.........",
".......####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####.......",
".....####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####.....",
"...####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####...",
".####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa####.",
"#####aaaaaa##########aaaaaaaaaaaaaaaaaaaaaa##########aaaaaa#####",
"##b####aaaaa########aaaaaaaaaaaaaaaaaaaaaaaa########aaaaa####a##",
"##bbb####aaaaa####aaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa####aaa##",
"##bbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbb####aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa####aaaaaaa##",
"##bbbbbbbbb####aaaaaaaaaaaaaaa####aaaaaaaaaaaaaaa####aaaaaaaaa##",
"##bbbb###bbbb####aaaaaaaaaaa########aaaaaaaaaaa####aaaa###aaaa##",
"##bbb######bbbb####aaaaaaaa##########aaaaaaaa####aaaa######aaa##",
"##bbb######bbbbbb####aaaaaa##########aaaaaa####aaaaaa######aaa##",
"##bbb#######bbbbbbb####aaaaa########aaaaa####aaaaaaa#######aaa##",
"##bbb#######bbbbbbbbb####aaaaa####aaaaa####aaaaaaaaa#######aaa##",
"##bbb#######bbbbbbbbbbb####aaaaaaaaaa####aaaaaaaaaaa#######aaa##",
"##bbbb######bbbbbbbbbbbbb####aaaaaa####aaaaaaaaaaaaa######aaaa##",
"##bbbbb####bbbbbbbbbbbbbbbb####aa####aaaaaaaaaaaaaaaa####aaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbb######aaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbbbbbbbbbbbbbbbbbb###bbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb###bbbbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb######bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb######bbbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbb#######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbb#######bbbbbbbbbb######bbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"##bbbb######bbbbbbbbbbb####bbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaaa##",
"###bbbb####bbbbbbbbbbbbbbbbbbbb##aaaaaaaaaaaaaaaaaaaaaaaaaaaa###",
".####bbbbbbbbbbbbbbbbb###bbbbbb##aaaaaa###aaaaaaaaaaaaaaaaa####.",
"...####bbbbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaaaa####...",
".....####bbbbbbbbbbbb######bbbb##aaaa######aaaaaaaaaaaa####.....",
".......####bbbbbbbbbb#######bbb##aaa#######aaaaaaaaaa####.......",
".........####bbbbbbbb#######bbb##aaa#######aaaaaaaa####.........",
"...........####bbbbbb#######bbb##aaa#######aaaaaa####...........",
".............####bbbbb######bbb##aaa######aaaaa####.............",
"...............####bbbb####bbbb##aaaa####aaaa####...............",
".................####bbbbbbbbbb##aaaaaaaaaa####.................",
"...................####bbbbbbbb##aaaaaaaa####...................",
".....................####bbbbbb##aaaaaa####.....................",
".......................####bbbb##aaaa####.......................",
".........................####bb##aa####.........................",
"...........................##########...........................",
"..............................####..............................",
"................................................................"};

View File

@@ -0,0 +1,334 @@
object ToolPanelSetupForm: TToolPanelSetupForm
Left = 383
Height = 487
Top = 176
Width = 657
ActiveControl = PageControl1
Caption = 'Tool panel setup'
ClientHeight = 487
ClientWidth = 657
FormStyle = fsStayOnTop
OnClose = FormClose
OnDestroy = FormDestroy
OnResize = FormResize
Position = poScreenCenter
LCLVersion = '1.7'
object PageControl1: TPageControl
Left = 0
Height = 433
Top = 0
Width = 657
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'Visible buttons'
ClientHeight = 395
ClientWidth = 651
object Label1: TLabel
AnchorSideLeft.Control = BitBtn3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TabSheet1
Left = 347
Height = 20
Top = 6
Width = 112
BorderSpacing.Around = 6
Caption = 'Avaliable buttons'
FocusControl = ListBtnAvaliable
ParentColor = False
end
object Label2: TLabel
AnchorSideTop.Control = TabSheet1
Left = 8
Height = 20
Top = 6
Width = 97
BorderSpacing.Around = 6
Caption = 'Visible buttons'
FocusControl = ListBtnVisible
ParentColor = False
end
object BitBtn3: TBitBtn
AnchorSideLeft.Control = BitBtn6
AnchorSideTop.Control = BitBtn4
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
Left = 309
Height = 30
Top = 160
Width = 32
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 2
Caption = '<<'
OnClick = BitBtn3Click
TabOrder = 0
end
object BitBtn4: TBitBtn
AnchorSideLeft.Control = BitBtn6
AnchorSideTop.Control = BitBtn5
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
Left = 309
Height = 36
Top = 118
Width = 32
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 2
Caption = '<'
OnClick = BitBtn4Click
TabOrder = 1
end
object BitBtn5: TBitBtn
AnchorSideLeft.Control = BitBtn6
AnchorSideTop.Control = BitBtn6
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideRight.Side = asrBottom
Left = 309
Height = 38
Top = 74
Width = 32
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 2
Caption = '>'
OnClick = BitBtn5Click
TabOrder = 2
end
object BitBtn6: TBitBtn
AnchorSideLeft.Control = TabSheet1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ListBtnAvaliable
Left = 309
Height = 36
Top = 32
Width = 32
AutoSize = True
BorderSpacing.InnerBorder = 2
Caption = '>>'
OnClick = BitBtn6Click
TabOrder = 3
end
object ListBtnAvaliable: TListBox
AnchorSideLeft.Control = BitBtn3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TabSheet1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cbShowCaption
Left = 347
Height = 259
Top = 32
Width = 298
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
IntegralHeight = True
Items.Strings = (
'111'
'222'
'333'
'44'
'555'
'666'
'777'
)
ItemHeight = 0
OnClick = ListBtnAvaliableClick
OnDblClick = ListBtnVisibleDblClick
OnDrawItem = ListBox1DrawItem
ScrollWidth = 296
Style = lbOwnerDrawFixed
TabOrder = 4
end
object ListBtnVisible: TListBox
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BitBtn6
AnchorSideBottom.Control = cbShowCaption
Left = 14
Height = 259
Top = 32
Width = 289
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
ItemHeight = 0
OnClick = ListBtnAvaliableClick
OnDblClick = ListBtnVisibleDblClick
OnDrawItem = ListBox1DrawItem
ScrollWidth = 287
Style = lbOwnerDrawFixed
TabOrder = 5
TopIndex = -1
end
object Panel1: TPanel
AnchorSideBottom.Control = TabSheet1
AnchorSideBottom.Side = asrBottom
Left = 3
Height = 62
Top = 327
Width = 639
Alignment = taLeftJustify
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Around = 6
BevelOuter = bvLowered
FullRepaint = False
TabOrder = 6
end
object cbShowCaption: TCheckBox
AnchorSideLeft.Control = TabSheet1
AnchorSideBottom.Control = Panel1
Left = 6
Height = 24
Top = 297
Width = 112
Anchors = [akLeft, akBottom]
BorderSpacing.Around = 6
Caption = 'Show caption'
OnChange = cbShowCaptionChange
TabOrder = 7
end
end
object TabSheet2: TTabSheet
Caption = 'Options'
ClientHeight = 395
ClientWidth = 651
object cbShowHint: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = cbTransp
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 178
Width = 90
BorderSpacing.Around = 6
Caption = 'Show hint'
TabOrder = 0
end
object cbTransp: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = cbFlatBtn
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 148
Width = 101
BorderSpacing.Around = 6
Caption = 'Transparent'
TabOrder = 1
end
object cbFlatBtn: TCheckBox
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = RadioGroup1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 118
Width = 104
BorderSpacing.Around = 6
Caption = 'Flat buttons'
TabOrder = 2
end
object RadioGroup1: TRadioGroup
AnchorSideLeft.Control = Panel2
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = TabSheet2
AnchorSideRight.Control = TabSheet2
AnchorSideRight.Side = asrBottom
Left = 333
Height = 106
Top = 6
Width = 312
Anchors = [akTop, akLeft, akRight]
AutoFill = False
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Button align'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 84
ClientWidth = 308
Items.Strings = (
'None'
'Left'
'Rignt'
)
TabOrder = 3
TabStop = True
end
object RadioGroup2: TRadioGroup
AnchorSideLeft.Control = TabSheet2
AnchorSideTop.Control = TabSheet2
AnchorSideRight.Control = Panel2
Left = 6
Height = 106
Top = 6
Width = 312
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Tool bar style'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 84
ClientWidth = 308
Items.Strings = (
'Standart'
'Windows XP'
'Native'
)
TabOrder = 4
TabStop = True
end
object Panel2: TPanel
AnchorSideLeft.Control = TabSheet2
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = TabSheet2
AnchorSideBottom.Control = TabSheet2
AnchorSideBottom.Side = asrBottom
Left = 324
Height = 383
Top = 6
Width = 3
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6
TabOrder = 5
end
end
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 42
Top = 439
Width = 645
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
ShowButtons = [pbClose, pbHelp]
end
end