mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
LazReport, published stretched property on Line objects, added popup menu item to select all objects of the same class
git-svn-id: trunk@36497 -
This commit is contained in:
parent
a314e7cf83
commit
16fed50b6e
@ -1028,6 +1028,10 @@ msgstr "Report speichern"
|
||||
msgid "Select all"
|
||||
msgstr "Alles auswählen"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Objekt auswählen"
|
||||
|
@ -5,8 +5,8 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2010-02-17 16:34+0100\n"
|
||||
"Last-Translator: javivf <javivf@gmail.com>\n"
|
||||
"PO-Revision-Date: 2012-04-01 05:10-0600\n"
|
||||
"Last-Translator: Jesus Reyes Aguilar <jesusrmx@yahoo.com.mx>\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
#: lr_const.saboutformcapt
|
||||
@ -1017,6 +1017,10 @@ msgstr "Guardar reporte"
|
||||
msgid "Select all"
|
||||
msgstr "Seleccionar todo"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr "Seleccionar objetos de la misma clase"
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Seleccionar objeto"
|
||||
|
@ -1026,6 +1026,10 @@ msgstr "Enregistrer le rapport"
|
||||
msgid "Select all"
|
||||
msgstr "Tout sélectionner"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Sélectionner l'objet"
|
||||
|
@ -1017,6 +1017,10 @@ msgstr "Simpan laporan"
|
||||
msgid "Select all"
|
||||
msgstr "Pilih semua"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Pilih obyek"
|
||||
|
@ -1018,6 +1018,10 @@ msgstr "Salva report"
|
||||
msgid "Select all"
|
||||
msgstr "Seleziona tutto"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Seleziona oggetto"
|
||||
|
@ -1018,6 +1018,10 @@ msgstr "Įrašyti pranešimą"
|
||||
msgid "Select all"
|
||||
msgstr "Pažymėti viską"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Pažymėti objektą"
|
||||
|
@ -1020,6 +1020,10 @@ msgstr "Zapisz raport"
|
||||
msgid "Select all"
|
||||
msgstr "Zaznacz wszystko"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Zaznacz obiekt"
|
||||
|
@ -1012,6 +1012,10 @@ msgstr ""
|
||||
msgid "Select all"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr ""
|
||||
|
@ -1017,6 +1017,10 @@ msgstr "Salvar relatório"
|
||||
msgid "Select all"
|
||||
msgstr "Selecionar tudo"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Selecionar objeto"
|
||||
|
@ -1017,6 +1017,10 @@ msgstr "Salvar relatório"
|
||||
msgid "Select all"
|
||||
msgstr "Selecionar tudo"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Selecionar objeto"
|
||||
|
@ -1017,6 +1017,10 @@ msgstr "Сохранить отчёт"
|
||||
msgid "Select all"
|
||||
msgstr "Выделить всё"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Выбрать объект"
|
||||
|
@ -1017,6 +1017,10 @@ msgstr "Зберегти звіт"
|
||||
msgid "Select all"
|
||||
msgstr "Вибрати все"
|
||||
|
||||
#: lr_const.sfrdesignerformselectsameclass
|
||||
msgid "Select same class objects"
|
||||
msgstr ""
|
||||
|
||||
#: lr_const.sfrdesignerformselobj
|
||||
msgid "Select object"
|
||||
msgstr "Вибрати об'єкт"
|
||||
|
@ -511,7 +511,6 @@ type
|
||||
constructor Create; override;
|
||||
|
||||
procedure Draw(aCanvas: TCanvas); override;
|
||||
procedure DefinePopupMenu({%H-}Popup: TPopupMenu); override;
|
||||
function GetClipRgn(rt: TfrRgnType): HRGN; override;
|
||||
function PointInView(aX,aY: Integer): Boolean; override;
|
||||
|
||||
@ -519,6 +518,7 @@ type
|
||||
property FrameColor;
|
||||
property FrameStyle;
|
||||
property FrameWidth;
|
||||
property Stretched;
|
||||
end;
|
||||
|
||||
TfrRect = Class(TPersistent)
|
||||
@ -4620,6 +4620,7 @@ begin
|
||||
Typ := gtLine;
|
||||
fFrames:=[frbLeft];
|
||||
BaseName := 'Line';
|
||||
SetBit(Flags, false, flStretched);
|
||||
end;
|
||||
|
||||
procedure TfrLineView.Draw(aCanvas: TCanvas);
|
||||
@ -4631,11 +4632,6 @@ begin
|
||||
RestoreCoord;
|
||||
end;
|
||||
|
||||
procedure TfrLineView.DefinePopupMenu(Popup: TPopupMenu);
|
||||
begin
|
||||
// no specific items in popup menu
|
||||
end;
|
||||
|
||||
function TfrLineView.GetClipRgn(rt: TfrRgnType): HRGN;
|
||||
var
|
||||
bx, by, bx1, by1, dd: Integer;
|
||||
|
@ -485,6 +485,7 @@ resourcestring
|
||||
sFRDesignerFormBackColor = 'Background color';
|
||||
sFRDesignerFormFrameColor = 'Frame color';
|
||||
sFRDesignerFormFrameWidth = 'Frame width';
|
||||
sFRDesignerFormSelectSameClass = 'Select same class objects';
|
||||
// 53131 = 'Frame width';
|
||||
sFRDesignerFormSelObj = 'Select object';
|
||||
sFRDesignerFormInsRect = 'Insert rectangle object';
|
||||
|
@ -8,7 +8,7 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
VertScrollBar.Page = 413
|
||||
VertScrollBar.Range = 149
|
||||
Caption = 'Designer'
|
||||
ClientHeight = 407
|
||||
ClientHeight = 414
|
||||
ClientWidth = 695
|
||||
KeyPreview = True
|
||||
Menu = MainMenu1
|
||||
@ -25,8 +25,8 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
WindowState = wsMaximized
|
||||
object StatusBar1: TStatusBar[0]
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 386
|
||||
Height = 23
|
||||
Top = 391
|
||||
Width = 695
|
||||
Panels = <
|
||||
item
|
||||
@ -1914,10 +1914,10 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
object C3: TComboBox
|
||||
Tag = 8
|
||||
Left = 161
|
||||
Height = 27
|
||||
Height = 21
|
||||
Top = 2
|
||||
Width = 67
|
||||
ItemHeight = 0
|
||||
ItemHeight = 13
|
||||
Items.Strings = (
|
||||
'5'
|
||||
'6'
|
||||
@ -1946,10 +1946,10 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
object C2: TComboBox
|
||||
Tag = 7
|
||||
Left = 1
|
||||
Height = 27
|
||||
Height = 21
|
||||
Top = 2
|
||||
Width = 155
|
||||
ItemHeight = 0
|
||||
ItemHeight = 13
|
||||
OnChange = DoClick
|
||||
OnDrawItem = C2DrawItem
|
||||
OnGetItems = C2GetItems
|
||||
@ -2349,7 +2349,7 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
object E1: TEdit
|
||||
Tag = 6
|
||||
Left = 4
|
||||
Height = 25
|
||||
Height = 21
|
||||
Top = 1
|
||||
Width = 31
|
||||
TabOrder = 0
|
||||
@ -2416,21 +2416,21 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object frDock2: TPanel[2]
|
||||
Left = 0
|
||||
Height = 303
|
||||
Height = 308
|
||||
Top = 83
|
||||
Width = 27
|
||||
Align = alLeft
|
||||
ClientHeight = 303
|
||||
ClientHeight = 308
|
||||
ClientWidth = 27
|
||||
FullRepaint = False
|
||||
TabOrder = 1
|
||||
object Panel4: TPanel
|
||||
Left = 1
|
||||
Height = 301
|
||||
Height = 306
|
||||
Top = 1
|
||||
Width = 25
|
||||
Align = alClient
|
||||
ClientHeight = 301
|
||||
ClientHeight = 306
|
||||
ClientWidth = 25
|
||||
FullRepaint = False
|
||||
TabOrder = 0
|
||||
@ -2734,11 +2734,11 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object panForDlg: TPanel
|
||||
Left = 1
|
||||
Height = 301
|
||||
Height = 306
|
||||
Top = 1
|
||||
Width = 25
|
||||
Align = alClient
|
||||
ClientHeight = 301
|
||||
ClientHeight = 306
|
||||
ClientWidth = 25
|
||||
FullRepaint = False
|
||||
TabOrder = 1
|
||||
@ -2805,7 +2805,7 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object Tab1: TTabControl[3]
|
||||
Left = 27
|
||||
Height = 303
|
||||
Height = 308
|
||||
Top = 83
|
||||
Width = 641
|
||||
TabStop = False
|
||||
@ -2819,14 +2819,14 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
TabOrder = 2
|
||||
object ScrollBox1: TScrollBox
|
||||
Left = 2
|
||||
Height = 271
|
||||
Height = 268
|
||||
Top = 30
|
||||
Width = 637
|
||||
HorzScrollBar.Page = 633
|
||||
VertScrollBar.Page = 267
|
||||
Width = 629
|
||||
HorzScrollBar.Page = 625
|
||||
VertScrollBar.Page = 264
|
||||
Align = alClient
|
||||
ClientHeight = 267
|
||||
ClientWidth = 633
|
||||
ClientHeight = 264
|
||||
ClientWidth = 625
|
||||
Color = clGray
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
@ -4137,12 +4137,12 @@ inherited frDesignerForm: TfrDesignerForm
|
||||
end
|
||||
object frDock4: TPanel[4]
|
||||
Left = 668
|
||||
Height = 303
|
||||
Height = 308
|
||||
Top = 83
|
||||
Width = 27
|
||||
Align = alRight
|
||||
Anchors = [akTop, akRight]
|
||||
ClientHeight = 303
|
||||
ClientHeight = 308
|
||||
ClientWidth = 27
|
||||
FullRepaint = False
|
||||
TabOrder = 3
|
||||
|
@ -13,7 +13,6 @@ unit LR_Desgn;
|
||||
interface
|
||||
|
||||
{$I lr_vers.inc}
|
||||
|
||||
{.$Define ExtOI} // External Custom Object inspector (Christian)
|
||||
{.$Define StdOI} // External Standard Object inspector (Jesus)
|
||||
{$define sbod} // status bar owner draw
|
||||
@ -529,6 +528,9 @@ type
|
||||
procedure StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel;
|
||||
const Rect: TRect);
|
||||
{$endif}
|
||||
procedure DefineExtraPopupSelected(popup: TPopupMenu);
|
||||
procedure SelectSameClassClick(Sender: TObject);
|
||||
procedure SelectSameClass(View: TfrView);
|
||||
private
|
||||
FDuplicateCount: Integer;
|
||||
FDupDeltaX,FDupDeltaY: Integer;
|
||||
@ -3608,6 +3610,56 @@ begin
|
||||
DrawStatusPanel(StatusBar.Canvas, Rect);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.DefineExtraPopupSelected(popup: TPopupMenu);
|
||||
var
|
||||
m: TMenuItem;
|
||||
begin
|
||||
m := TMenuItem.Create(Popup);
|
||||
m.Caption := '-';
|
||||
Popup.Items.Add(m);
|
||||
|
||||
m := TMenuItem.Create(Popup);
|
||||
m.Caption := sFRDesignerFormSelectSameClass;
|
||||
m.OnClick := @SelectSameClassClick;
|
||||
m.Tag := PtrInt(Objects[TopSelected]);
|
||||
Popup.Items.Add(m);
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.SelectSameClassClick(Sender: TObject);
|
||||
var
|
||||
View: TfrView;
|
||||
begin
|
||||
if Sender is TMenuItem then
|
||||
begin
|
||||
View := TfrView(TMenuItem(Sender).Tag);
|
||||
if Objects.IndexOf(View)>=0 then
|
||||
begin
|
||||
PageView.DrawPage(dmSelection);
|
||||
SelectSameClass(View);
|
||||
PageView.GetMultipleSelected;
|
||||
PageView.DrawPage(dmSelection);
|
||||
SelectionChanged;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrDesignerForm.SelectSameClass(View: TfrView);
|
||||
var
|
||||
i: Integer;
|
||||
v: TfrView;
|
||||
begin
|
||||
SelNum := 0;
|
||||
for i := 0 to Objects.Count - 1 do
|
||||
begin
|
||||
v := TfrView(Objects[i]);
|
||||
if v.ClassName=View.ClassName then
|
||||
begin
|
||||
v.Selected := True;
|
||||
Inc(SelNum);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// if AList is specified always process the list being objects selected or not
|
||||
// if AList is not specified, all objects are processed but check Selected state
|
||||
procedure TfrDesignerForm.ViewsAction(Views: TFpList; TheAction: TViewAction;
|
||||
@ -5325,9 +5377,12 @@ begin
|
||||
|
||||
while Popup1.Items.Count > 7 do
|
||||
Popup1.Items.Delete(7);
|
||||
|
||||
|
||||
if SelNum = 1 then
|
||||
TfrView(Objects[TopSelected]).DefinePopupMenu(Popup1)
|
||||
begin
|
||||
DefineExtraPopupSelected(Popup1);
|
||||
TfrView(Objects[TopSelected]).DefinePopupMenu(Popup1);
|
||||
end
|
||||
else
|
||||
if SelNum > 1 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user